Skip to content

Commit a0a4bf7

Browse files
committed
add modal for error of sending for late date
1 parent febddb0 commit a0a4bf7

2 files changed

Lines changed: 16 additions & 3 deletions

File tree

projects/social_platform/src/app/office/projects/edit/edit.component.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,17 @@ <h3 class="text-bold-body-16">📢 внимание!</h3>
128128
</div>
129129
</app-modal>
130130

131+
<app-modal [open]="isSendDescisionLate" (openChange)="isSendDescisionLate = !isSendDescisionLate">
132+
<div class="cancel" style="width: 605px; padding: 0px 24px">
133+
<div class="cancel__top">
134+
<i (click)="isSendDescisionLate = false" appIcon icon="cross" class="cancel__cross"></i>
135+
<p class="cancel__title text-body-14">Подача проектов завершена!</p>
136+
</div>
137+
138+
<p class="text-body-12">Срок подачи проектов в программу завершён</p>
139+
</div>
140+
</app-modal>
141+
131142
<app-modal [open]="fromProgramOpen()" (openChange)="fromProgramOpen.set(false)">
132143
<div class="cancel" style="width: 605px; padding: 0px 24px">
133144
<div class="cancel__top">

projects/social_platform/src/app/office/projects/edit/edit.component.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,6 @@ export class ProjectEditComponent implements OnInit, AfterViewInit, OnDestroy {
195195

196196
// Получение Id лидера проекта
197197
this.setupLeaderIdSubscription();
198-
199-
console.log(this.fromProgramOpen());
200198
}
201199

202200
ngAfterViewInit(): void {
@@ -239,6 +237,7 @@ export class ProjectEditComponent implements OnInit, AfterViewInit, OnDestroy {
239237

240238
// Состояние компонента
241239
isCompleted = false;
240+
isSendDescisionLate = false;
242241
isSendDescisionToPartnerProgramProject = false;
243242

244243
profile$?: Subscription;
@@ -457,9 +456,12 @@ export class ProjectEditComponent implements OnInit, AfterViewInit, OnDestroy {
457456
next: () => {
458457
this.completeSubmitedProjectForm(projectId);
459458
},
460-
error: () => {
459+
error: err => {
461460
this.setProjFormIsSubmitting(false);
462461
this.snackBarService.error("ошибка при сохранении данных");
462+
if (err.error["error"].includes("Срок подачи проектов в программу завершён.")) {
463+
this.isSendDescisionLate = true;
464+
}
463465
},
464466
});
465467
}

0 commit comments

Comments
 (0)