-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: create new form and enable update of other parts
- Loading branch information
1 parent
139a106
commit d3f148b
Showing
6 changed files
with
152 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
apps/picsa-apps/dashboard/src/app/modules/monitoring/pages/home/monitoring.page.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 37 additions & 17 deletions
54
.../dashboard/src/app/modules/monitoring/pages/update/update-monitoring-forms.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,42 @@ | ||
<div class="page-content"> | ||
<div style="display: flex; align-items: center"> | ||
@if(formID){ | ||
<h2 style="flex: 1">Update Form</h2> | ||
} @else { | ||
<h2 style="flex: 1">Add Form</h2> | ||
} | ||
</div> | ||
@if(form){ | ||
<form class="form-content"> | ||
<h2 style="flex: 1">Upload new Form excel file</h2> | ||
<picsa-supabase-upload | ||
[fileTypes]="allowedFileTypes" | ||
[autoUpload]="false" | ||
[storageBucketName]="storageBucketName" | ||
[storageFolderPath]="storageFolderPath" | ||
(uploadComplete)="handleUploadComplete($event)" | ||
> | ||
</picsa-supabase-upload> | ||
<form [formGroup]="fileForm" class="form-content"> | ||
|
||
<mat-form-field> | ||
<mat-label>Title</mat-label> | ||
<input type="text" matInput formControlName="title" style="text-align: start;" /> | ||
</mat-form-field> | ||
<mat-form-field> | ||
<mat-label>Description</mat-label> | ||
<input type="text" matInput formControlName="description" style="text-align: start;" /> | ||
</mat-form-field> | ||
<div> | ||
<h2 style="flex: 1">Upload cover image (optional)</h2> | ||
<picsa-supabase-upload [fileTypes]="allowedCoverTypes" [fileDropHeight]="128" [autoUpload]="true" | ||
[storageBucketName]="storageBucketName" [storageFolderPath]="coverImageStorageFolder" | ||
(uploadComplete)="handleCoverUploadComplete($event, 'cover_image')"></picsa-supabase-upload> | ||
</div> | ||
|
||
<div> | ||
<h2 style="flex: 1">Upload new Form excel file</h2> | ||
<picsa-supabase-upload [fileTypes]="allowedFileTypes" [autoUpload]="false" [storageBucketName]="storageBucketName" | ||
[storageFolderPath]="storageFolderPath" (uploadComplete)="handleUploadComplete($event)"> | ||
</picsa-supabase-upload> | ||
@if(convertXlsxFeedbackMessage) { | ||
<div>{{ convertXlsxFeedbackMessage }}</div> | ||
} @if(uploading===true) { | ||
<div>Uploading form...</div> | ||
} | ||
</div> | ||
|
||
<button mat-raised-button color="primary" (click)="handleSubmitForm()">{{loadingNewForm ? "saving..." : "Save Form"}}</button> | ||
|
||
</form> | ||
} @if(updateFeedbackMessage) { | ||
<div>{{ updateFeedbackMessage }}</div> | ||
} @if(uploading===true) { | ||
<div>Uploading form...</div> | ||
} | ||
</div> | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters