Skip to content

Commit 029ae18

Browse files
committed
fix naming for button modal & key naming for sections
1 parent b8b28cb commit 029ae18

3 files changed

Lines changed: 14 additions & 8 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ export class OfficeComponent implements OnInit, OnDestroy {
207207
}
208208

209209
private getRegisteredProgramSeenKey(programId: number): string {
210-
return `program_registered_modal_seen_${programId}`;
210+
return `program_${this.profile?.id}_registered_modal_seen_${programId}`;
211211
}
212212

213213
private hasSeenRegisteredProgramModal(programId: number): boolean {

projects/social_platform/src/app/office/program/detail/main/main.component.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import { AsyncPipe } from "@angular/common";
4242
import { AvatarComponent } from "@uilib";
4343
import { TruncatePipe } from "projects/core/src/lib/pipes/truncate.pipe";
4444
import { NewsCardComponent } from "@office/features/news-card/news-card.component";
45+
import { AuthService } from "@auth/services";
4546

4647
@Component({
4748
selector: "app-main",
@@ -62,19 +63,15 @@ import { NewsCardComponent } from "@office/features/news-card/news-card.componen
6263
NewsFormComponent,
6364
ModalComponent,
6465
MatProgressBarModule,
65-
AvatarComponent,
66-
TagComponent,
6766
TruncatePipe,
6867
RouterModule,
69-
NewsCardComponent,
7068
],
7169
})
7270
export class ProgramDetailMainComponent implements OnInit, OnDestroy {
7371
constructor(
74-
private readonly programService: ProgramService,
7572
private readonly programNewsService: ProgramNewsService,
76-
private readonly projectService: ProjectService,
7773
private readonly projectAdditionalService: ProjectAdditionalService,
74+
private readonly authService: AuthService,
7875
private readonly router: Router,
7976
private readonly route: ActivatedRoute,
8077
private readonly cdRef: ChangeDetectorRef,
@@ -101,6 +98,7 @@ export class ProgramDetailMainComponent implements OnInit, OnDestroy {
10198
registeredProgramModal = signal<boolean>(false);
10299

103100
programId?: number;
101+
profileId = signal<number | undefined>(undefined);
104102

105103
subscriptions$ = signal<Subscription[]>([]);
106104

@@ -131,6 +129,14 @@ export class ProgramDetailMainComponent implements OnInit, OnDestroy {
131129
}
132130
});
133131

132+
const profileIdSub$ = this.authService.profile.subscribe({
133+
next: profile => {
134+
this.profileId.set(profile.id);
135+
},
136+
});
137+
138+
this.subscriptions$().push(profileIdSub$);
139+
134140
const program$ = this.route.data
135141
.pipe(
136142
map(r => r["data"]),
@@ -328,7 +334,7 @@ export class ProgramDetailMainComponent implements OnInit, OnDestroy {
328334
}
329335

330336
private getRegisteredProgramSeenKey(programId: number): string {
331-
return `program_registered_modal_seen_${programId}`;
337+
return `program_${this.profileId()}_modal_seen_${programId}`;
332338
}
333339

334340
private hasSeenRegisteredProgramModal(programId: number): boolean {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ <h3 class="text-bold-body-16">📢 внимание!</h3>
173173
customTypographyClass="text-body-12"
174174
size="medium"
175175
(click)="fromProgramOpen.set(false)"
176-
>вперед</app-button
176+
>спасибо, понятно</app-button
177177
>
178178
</div>
179179
</app-modal>

0 commit comments

Comments
 (0)