Skip to content

Commit

Permalink
Merge pull request #148 from AurelicButter/development
Browse files Browse the repository at this point in the history
Release 1.2.1
  • Loading branch information
AurelicButter authored May 22, 2024
2 parents 3fbffa2 + 38f48f4 commit 6cff1a5
Show file tree
Hide file tree
Showing 9 changed files with 148 additions and 95 deletions.
213 changes: 127 additions & 86 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "myneworm",
"version": "1.2.0",
"version": "1.2.1",
"private": true,
"scripts": {
"ng": "ng",
Expand Down Expand Up @@ -79,7 +79,7 @@
"@angular-devkit/build-angular": "^17.3.6",
"@angular/compiler-cli": "^17.3.7",
"@types/jasmine": "^5.1.4",
"@types/node": "^20.12.10",
"@types/node": "^20.12.12",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"eslint": "^8.57.0",
Expand All @@ -92,7 +92,7 @@
"karma-coverage": "^2.2.1",
"karma-jasmine": "^5.1.0",
"karma-jasmine-html-reporter": "^2.1.0",
"lint-staged": "^15.2.2",
"lint-staged": "^15.2.4",
"prettier": "^3.2.5",
"protractor": "~7.0.0",
"ts-node": "^10.9.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
color: inherit;
}

.center-text {
text-align: center;
}

.correction-input, .old-data-display {
height: 40px;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ <h2>Correction for ISBN <a class="hidden-link" href="/book/{{correctionData.isbn
<div class="correction-comparison">
<div class="correction-field">
<label class="correction-label-inner">New</label>
<input class="form-control correction-input" type="date" name="releaseDate" [(ngModel)]="correctionData.release_date" disabled>
<input class="form-control correction-input center-text" type="date" name="releaseDate" [value]="releaseDateDisplay" [(ngModel)]="releaseDateDisplay" disabled>
</div>
<div class="correction-field" *ngIf="bookData">
<label class="correction-label-inner">Current</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export class BookCorrectionComponent implements OnInit {
formats: BookFormat[];
publishers: ImprintData[];
correctionDescription = new FormControl("");
releaseDateDisplay: string;

constructor(
private service: MynewormAPIService,
Expand All @@ -57,10 +58,16 @@ export class BookCorrectionComponent implements OnInit {

this.correctionData = correction;

if (this.correctionData.description !== undefined) {
if (this.correctionData.description) {
this.correctionDescription.setValue(this.correctionData.description);
}

if (this.correctionData.release_date) {
this.releaseDateDisplay = moment(this.correctionData.release_date.split("T")[0]).format(
"YYYY-MM-DD"
);
}

this.service.getUserByID(correction.submitter_id.toString()).subscribe((user) => {
if (user === null) {
this.submitterUsername = `Removed User (ID:${correction.submitter_id})`;
Expand Down
2 changes: 1 addition & 1 deletion src/app/models/BookCorrection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export interface BookCorrectionEntry {
cover_image?: string;
format_name?: string;
book_type?: string;
release_date?: Date;
release_date?: string;
publisher_id?: number;
series_id?: number;
comment?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ export class BookCorrectionFormComponent implements OnInit {
if (this.correction.description !== this.existingData.description) {
forSubmission.description = this.correction.description;
}
if (this.correction.cover_url) {
forSubmission.cover_url = this.correction.cover_url;
if (this.correction.cover_image) {
forSubmission.cover_image = this.correction.cover_image;
}
if (this.correction.release_date !== this.existingData.release_date.split("T")[0]) {
forSubmission.release_date = this.correction.release_date;
Expand Down
2 changes: 1 addition & 1 deletion src/app/search-bar/search-bar.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<span *ngIf="hoveredRow == null">{{element.title.substring(0, 57)}}...</span>
<span *ngIf="hoveredRow && element.isbn !== hoveredRow.isbn">{{element.title.substring(0, 57)}}...</span>
</strong>
<strong *ngIf="element.title.length < 57">{{element.title}}</strong>
<strong *ngIf="element.title.length < 57 || element.title.length === 57">{{element.title}}</strong>
</p>
<br>
<p class="search-item-format"><em>({{element.format_name | bookFormat}}, {{element.book_type_name | titlecase}})</em></p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
.modal-header {
font-size: 20px;
height: 85px;
justify-content: space-between;
}

.modal-header>h1 {
Expand Down

0 comments on commit 6cff1a5

Please sign in to comment.