Skip to content

Commit b8b28cb

Browse files
authored
Merge pull request #258 from PROCOLLAB-github/fixes-program
fix naming of program add program & modal logic from edit project
2 parents 12969e0 + 5997535 commit b8b28cb

3 files changed

Lines changed: 16 additions & 8 deletions

File tree

.github/workflows/pull_request.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_ACCESS_TOKEN }}
3434
NETLIFY_PREVIEW_APP: true # or perhaps like this
3535
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36-
NETLIFY_PR_ID: ${{ github.pr_id }}-social
36+
NETLIFY_PR_ID: ${{ github.event.pull_request.number }}-social
3737
- name: Publish preview skills
3838
uses: netlify/actions/cli@master
3939
id: publish_preview_skills
@@ -44,7 +44,7 @@ jobs:
4444
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_ACCESS_TOKEN }}
4545
NETLIFY_PREVIEW_APP: true # or perhaps like this
4646
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47-
NETLIFY_PR_ID: ${{ github.pr_id }}-skills
47+
NETLIFY_PR_ID: ${{ github.event.pull_request.number }}-skills
4848
- uses: mshick/add-pr-comment@v2
4949
with:
5050
message: |

projects/social_platform/src/app/office/features/detail/detail.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
(click)="isProjectAssigned ? null : addNewProject()"
9393
customTypographyClass="text-body-12 bar__add-project"
9494
>
95-
<span>{{ isProjectAssigned ? "вы подали проект" : "подать проект" }}</span>
95+
<span>{{ isProjectAssigned ? "вы подали проект" : "создать заявку" }}</span>
9696
<i appIcon icon="plus" appSquare="10"></i>
9797
</app-button>
9898
} @if ((isUserManager || isUserExpert) && isUserMember) {

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

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -484,21 +484,29 @@ export class ProjectEditComponent implements OnInit, AfterViewInit, OnDestroy {
484484
this.isAssignProjectToProgramModalOpen.set(false);
485485
}
486486

487-
private getFromProgramSeenKey(): string {
488-
return `project_fromProgram_modal_seen_${this.profileId}`;
487+
private getFromProgramSeenKey(type: "program" | "project"): string {
488+
if (type === "program") {
489+
return `project_fromProgram_modal_seen_${this.profileId}`;
490+
} else return `project_modal_seen_${this.profileId}`;
489491
}
490492

491493
private hasSeenFromProgramModal(): boolean {
492494
try {
493-
return !!localStorage.getItem(this.getFromProgramSeenKey());
495+
if (this.fromProgram) {
496+
return !!localStorage.getItem(this.getFromProgramSeenKey("program"));
497+
}
498+
return !!localStorage.getItem(this.getFromProgramSeenKey("project"));
494499
} catch (e) {
495500
return false;
496501
}
497502
}
498503

499504
private markSeenFromProgramModal(): void {
500505
try {
501-
localStorage.setItem(this.getFromProgramSeenKey(), "1");
506+
if (this.fromProgram) {
507+
localStorage.setItem(this.getFromProgramSeenKey("program"), "1");
508+
}
509+
localStorage.setItem(this.getFromProgramSeenKey("project"), "1");
502510
} catch (e) {}
503511
}
504512

@@ -679,7 +687,7 @@ export class ProjectEditComponent implements OnInit, AfterViewInit, OnDestroy {
679687
this.fromProgram = params["fromProgram"];
680688

681689
const seen = this.hasSeenFromProgramModal();
682-
if (this.fromProgram && !seen) {
690+
if (!seen) {
683691
this.fromProgramOpen.set(true);
684692
this.markSeenFromProgramModal();
685693
} else {

0 commit comments

Comments
 (0)