feat: add schedule files upload

This commit is contained in:
2025-02-02 22:38:05 +03:00
parent e98a0db7ca
commit 0f25d5404c
3 changed files with 98 additions and 0 deletions

View File

@ -0,0 +1,28 @@
<app-configuration-card
[title]="'Загрузка расписания Excel'"
[isSaveEnabled]="selectedFiles.length > 0"
[saveFunction]="saveFunction()"
(onSaveFunction)="onUpload($event)">
<input type="file" #fileInput (change)="onFileSelected($event)" multiple accept=".xlsx, .xls" style="display: none;">
@if (fileLoading) {
<app-data-spinner/>
} @else {
<button mat-raised-button color="primary" (click)="onFileChooseClick()">
Выберите файлы
<mat-icon>attach_file</mat-icon>
</button>
}
@if (selectedFiles.length > 0) {
<div style="margin-top: 15px;">
<p>Выбранные файлы:</p>
<ul>
@for (file of selectedFiles; track $index) {
<li>{{ file.name }}</li>
}
</ul>
</div>
}
</app-configuration-card>