Restore “Page Count” field in book edit form
This commit is contained in:
committed by
Aditya Chandel
parent
451d0b6e50
commit
6b75ea7d95
+14
-1
@@ -1,5 +1,5 @@
|
||||
@if (book$ | async; as book) {
|
||||
<form [formGroup]="metadataForm" (ngSubmit)="onSave()" class="flex flex-col h-full md:min-w-[80rem]">
|
||||
<form [formGroup]="metadataForm" (ngSubmit)="onSave()" class="flex flex-col h-full md:min-w-[85rem]">
|
||||
@if (isLoading) {
|
||||
<div class="absolute inset-0 bg-black opacity-25 z-10 "></div>
|
||||
}
|
||||
@@ -181,6 +181,19 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col gap-1 md:basis-[10%]">
|
||||
<label for="pageCount">Pages</label>
|
||||
<div class="flex justify-between items-center gap-2">
|
||||
<input pInputText id="pageCount" formControlName="pageCount" class="w-full"/>
|
||||
@if (!book.metadata!['pageCountLocked']) {
|
||||
<p-button icon="pi pi-lock-open" [outlined]="true" (onClick)="toggleLock('pageCount')" severity="success"></p-button>
|
||||
}
|
||||
@if (book.metadata!['pageCountLocked']) {
|
||||
<p-button icon="pi pi-lock" [outlined]="true" (onClick)="toggleLock('pageCount')" severity="warn"></p-button>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col gap-1 md:basis-[15%]">
|
||||
<label for="publishedDate">Publish Date</label>
|
||||
<div class="flex justify-between items-center gap-2">
|
||||
|
||||
+6
-4
@@ -153,10 +153,12 @@ export class MetadataPickerComponent implements OnInit {
|
||||
takeUntilDestroyed(this.destroyRef)
|
||||
).subscribe((metadata) => {
|
||||
|
||||
this.metadataForm.reset();
|
||||
this.copiedFields = {};
|
||||
this.savedFields = {};
|
||||
this.hoveredFields = {};
|
||||
if (this.reviewMode) {
|
||||
this.metadataForm.reset();
|
||||
this.copiedFields = {};
|
||||
this.savedFields = {};
|
||||
this.hoveredFields = {};
|
||||
}
|
||||
|
||||
if (metadata) {
|
||||
this.originalMetadata = metadata;
|
||||
|
||||
+1
-1
@@ -187,7 +187,7 @@
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="grid md:grid-cols-3 gap-y-2.5 text-sm pt-2 md:pt-4 text-gray-700 dark:text-gray-300 max-w-5xl">
|
||||
<div class="grid md:grid-cols-3 gap-y-2.5 text-sm pt-2 md:pt-4 text-gray-700 dark:text-gray-300 max-w-6xl">
|
||||
<p class="whitespace-nowrap max-w-[250px] overflow-hidden text-ellipsis">
|
||||
<span class="font-bold">Publisher: </span>
|
||||
@if (book?.metadata?.publisher) {
|
||||
|
||||
Reference in New Issue
Block a user