Skip to content

Commit

Permalink
Merge branch 'feat/two-level-qc-process-new-model' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
tsubik committed Sep 4, 2024
2 parents b9992e3 + c942817 commit a92be4e
Show file tree
Hide file tree
Showing 9 changed files with 95 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/app/pages/observations/observation-detail.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,25 @@ <h2 *ngIf="!isDisabled() && observation && !isCopied">{{'Edit observation' | tra
<button *ngIf="canAmend()" type="button" (click)="onClickAmend()" class="c-button -primary">{{'Amend' | translate}}</button>
<button *ngIf="canSave()" type="button" (click)="onSubmit()" class="c-button -primary">{{'Save' | translate}}</button>
<button *ngIf="canCreate()" type="button" (click)="onSubmit()" class="c-button -primary">{{'Create' | translate}}</button>
<button *ngIf="canStartQC()" type="button" (click)="onStartQC()" class="c-button -primary">Start QC</button>
<button *ngIf="canStartQC()" type="button" (click)="onStartQC()" class="c-button -primary">{{'Start QC' | translate}}</button>
<button *ngIf="canPublishWithoutComments()" type="button" (click)="onPublish('Published (no comments)')" class="c-button -primary">{{'Publish' | translate}}</button>
<button *ngIf="canPublishWithModification()" type="button" (click)="onPublish('Published (modified)')" class="c-button -primary">{{'Publish' | translate}}</button>
</div>
</div>

<div class="callout primary" *ngIf="observation && observation['validation-status'].includes('Ready for QC')">
<p *ngIf="!canStartQC()">{{'observation.statusNote.ReadyForQC' | translate}}</p>
<p *ngIf="canStartQC()">This observation is ready for quality control. Please click on "Start QC" button whenever you want to start QC process.</p>
<p *ngIf="canStartQC()">{{'observation.statusNote.ReadyForQC.reviewer' | translate}}</p>
</div>

<div class="callout warning" *ngIf="observation && ['QC1 in progress', 'QC2 in progress'].includes(observation['validation-status'])">
<p *ngIf="!canQC()">{{'observation.statusNote.QCInProgress' | translate}}</p>

<div *ngIf="canQC()">
<p>Please review this observation and either accept it or reject it with making a comment for a monitor.</p>
<p>{{'observation.statusNote.QCInProgress.reviewer' | translate}}</p>
<div class="c-button-container -j-start form-group" *ngIf="qcState === 'undecided'">
<button *ngIf="canQC()" type="button" (click)="onRejectQC()" class="c-button -secondary">Reject</button>
<button *ngIf="canQC()" type="button" (click)="onApproveQC()" class="c-button -primary">Accept</button>
<button *ngIf="canQC()" type="button" (click)="onRejectQC()" class="c-button -secondary">{{'Reject' | translate}}</button>
<button *ngIf="canQC()" type="button" (click)="onApproveQC()" class="c-button -primary">{{'Accept' | translate}}</button>
</div>
<div class="form-group" *ngIf="qcState === 'reject'">
<label for="explain_qc_rejection">{{'Explanation' | translate}}</label>
Expand All @@ -66,14 +66,14 @@ <h2 *ngIf="!isDisabled() && observation && !isCopied">{{'Edit observation' | tra

<div class="c-button-container -j-start">
<button type="button" (click)="onCancelRejectQC()" class="c-button -secondary">{{ 'Cancel' | translate }}</button>
<button type="button" (click)="onRejectQC()" class="c-button -primary" [disabled]="!explain_qc_rejection.valid">Submit Rejection</button>
<button type="button" (click)="onRejectQC()" class="c-button -primary" [disabled]="!explain_qc_rejection.valid">{{'Submit Rejection' | translate}}</button>
</div>
</div>
</div>
</div>

<div class="callout warning" *ngIf="observation && observation['validation-status'] === 'Rejected'">
<p>The observation has been reviewed and received some comments. Please make requested changes and submit it for review again.</p>
<p>{{'observation.statusNote.Rejected' | translate}}</p>
<p>{{ 'Comments' | translate }}</p>
<blockquote>{{latestQCComment || '−'}}</blockquote>
</div>
Expand Down
11 changes: 11 additions & 0 deletions src/assets/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,11 @@
"Currency": "Currency",
"Created": "Created",
"Ready for QC": "Ready for QC",
"Ready for QC1": "Ready for QC1",
"Ready for QC2": "Ready for QC2",
"QC in progress": "QC in progress",
"QC1 in progress": "QC1 in progress",
"QC2 in progress": "QC2 in progress",
"Needs revision": "Needs revision",
"Ready for publication": "Ready for publication",
"Published (no comments)": "Published (no comments)",
Expand All @@ -263,6 +267,10 @@
"Rejected": "Rejected",
"Approved": "Approved",
"Submit for review": "Submit for review",
"Start QC": "Start QC",
"Accept": "Accept",
"Reject": "Reject",
"Submit Rejection": "Submit Rejection",
"observationSubmitForReview": "The observation will be submitted for revision. Do you want to continue?",
"observationPublish": "Do you confirm that you reviewed the observation and certify that it contains correct information?",
"Government entity details": "Government entity details",
Expand Down Expand Up @@ -320,9 +328,12 @@
"observation.evidenceDetails.invalid": "Please add details",
"observation.evidenceDetails.note": "Please indicate where the evidence is located within the report (for example, the page number).",
"observation.statusNote.ReadyForQC": "This observation has been submitted. Once reviewed, you will be able to publish it.",
"observation.statusNote.ReadyForQC.reviewer": "This observation is ready for quality control. Please click on \"Start QC\" button whenever you want to start QC process.",
"observation.statusNote.QCInProgress": "This observation is being reviewed. Once done, you will be able to publish it.",
"observation.statusNote.QCInProgress.reviewer": "Please review this observation and either accept it or reject it with making a comment for a monitor.",
"observation.statusNote.NeedsRevision": "The observation has been reviewed and received some comments. You can either (1) publish it anyway and explain why you don't want to update it, (2) amend it and publish it or (3) amend it and send it back for review. For options (2) and (3), select the 'Amend' option. For these options, you can also explain the changes.",
"observation.statusNote.NeedsRevision.question": "What would you like to do?",
"observation.statusNote.Rejected": "The observation has been reviewed and received some comments. Please make requested changes and submit it for review again.",
"observation.scrollingNote": "In order to see all of the table's columns, you need to scroll horizontally. You can either use the scrollbar located at the bottom of the table or use your trackpad or mouse. If you use a trackpad, you can scroll horizontally when your cursor is above the table. If you use a mouse with 3 buttons, the middle one should let you do the same by holding the button down and moving the cursor to the sides or rotating the scrolling wheel sideways.",
"observation.language.note": "You are creating/editing the observation in this language.",
"observation.language.viewNote": "You are viewing the observation in this language.",
Expand Down
11 changes: 11 additions & 0 deletions src/assets/locale/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,11 @@
"Currency": "Monnaie",
"Created": "Créé",
"Ready for QC": "Prêt pour le contrôle de qualité",
"Ready for QC1": "Ready for QC1",
"Ready for QC2": "Ready for QC2",
"QC in progress": "En cours de contrôle de qualité",
"QC1 in progress": "QC1 in progress",
"QC2 in progress": "QC2 in progress",
"Needs revision": "A besoin d'une révision",
"Ready for publication": "Prêt pour la publication",
"Published (no comments)": "Publié (sans commentaire)",
Expand All @@ -263,6 +267,10 @@
"Rejected": "Rejeté",
"Approved": "Approuvé",
"Submit for review": "Soumettre pour validation",
"Start QC": "Start QC",
"Accept": "Accept",
"Reject": "Reject",
"Submit Rejection": "Submit Rejection",
"observationSubmitForReview": "L'observation sera soumise pour validation. Voulez-vous continuer?",
"observationPublish": "Confirmez-vous que vous avez passé en revue l'observation et certifiez-vous qu'elle contient des informations correctes ? ",
"Government entity details": "Détails sur l'entité gouvernementale",
Expand Down Expand Up @@ -320,9 +328,12 @@
"observation.evidenceDetails.invalid": "Ajoutez des détails SVP",
"observation.evidenceDetails.note": "Veuillez indiquer où se situe la preuve dans le rapport (par exemple avec le numéro de page)",
"observation.statusNote.ReadyForQC": "L'observation a été soumise. Une fois l'observation passée en revue, vous serez en mesure de la publier. ",
"observation.statusNote.ReadyForQC.reviewer": "This observation is ready for quality control. Please click on \"Start QC\" button whenever you want to start QC process.",
"observation.statusNote.QCInProgress": "L'observation est entrain d'être passée en revue. Une fois passée en revue, vous serez en mesure de la publier. ",
"observation.statusNote.QCInProgress.reviewer": "Please review this observation and either accept it or reject it with making a comment for a monitor.",
"observation.statusNote.NeedsRevision": "L'observation a été passée en revue et a reçu des commentaires. Vous pouvez soit : (1) publier l'observation et expliquer pourquoi vous ne voulez pas la modifier, (2) modifier l'observation et la publier ou (3) modifier l'observation et la soumettre de nouveau pour validation. Pour les options (2) et (3), veuillez sélectionner l'option 'modifier'. Pour ces options, vous pouvez aussi expliquer vos modifications. ",
"observation.statusNote.NeedsRevision.question": "Qu'aimeriez-vous faire ?",
"observation.statusNote.Rejected": "The observation has been reviewed and received some comments. Please make requested changes and submit it for review again.",
"observation.scrollingNote": "Afin de pouvoir voir toutes les colonnes du tableau, vous devez les faire défiler horizontalement. Vous pouvez soit utiliser la barre de défilement située en bas du tableau, soit votre trackpad ou votre souris. Si vous utilisez un trackpad, vous pouvez faire défiler les colonnes horizontalement lorsque votre curseur est au-dessus du tableau. Si vous utilisez une souris à 3 boutons, le bouton du milieu devrait vous permettre de faire défiler les colonnes, en maintenant le bouton enfoncé et en déplaçant le curseur ou en tournant la molette de défilement sur le côté.",
"observation.language.note": "Vous êtes en train de créér/modifier l'observation dans cette langue. ",
"observation.language.viewNote": "Vous visualisez l’observation dans cette langue.",
Expand Down
11 changes: 11 additions & 0 deletions src/assets/locale/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,11 @@
"Currency": "Currency",
"Created": "Created",
"Ready for QC": "Ready for QC",
"Ready for QC1": "Ready for QC1",
"Ready for QC2": "Ready for QC2",
"QC in progress": "QC in progress",
"QC1 in progress": "QC1 in progress",
"QC2 in progress": "QC2 in progress",
"Needs revision": "Needs revision",
"Ready for publication": "Ready for publication",
"Published (no comments)": "Published (no comments)",
Expand All @@ -263,6 +267,10 @@
"Rejected": "Rejected",
"Approved": "Approved",
"Submit for review": "Submit for review",
"Start QC": "Start QC",
"Accept": "Accept",
"Reject": "Reject",
"Submit Rejection": "Submit Rejection",
"observationSubmitForReview": "The observation will be submitted for revision. Do you want to continue?",
"observationPublish": "Do you confirm that you reviewed the observation and certify that it contains correct information?",
"Government entity details": "Government entity details",
Expand Down Expand Up @@ -320,9 +328,12 @@
"observation.evidenceDetails.invalid": "Please add details",
"observation.evidenceDetails.note": "Please indicate where the evidence is located within the report (for example, the page number).",
"observation.statusNote.ReadyForQC": "This observation has been submitted. Once reviewed, you will be able to publish it.",
"observation.statusNote.ReadyForQC.reviewer": "This observation is ready for quality control. Please click on \"Start QC\" button whenever you want to start QC process.",
"observation.statusNote.QCInProgress": "This observation is being reviewed. Once done, you will be able to publish it.",
"observation.statusNote.QCInProgress.reviewer": "Please review this observation and either accept it or reject it with making a comment for a monitor.",
"observation.statusNote.NeedsRevision": "The observation has been reviewed and received some comments. You can either (1) publish it anyway and explain why you don't want to update it, (2) amend it and publish it or (3) amend it and send it back for review. For options (2) and (3), select the 'Amend' option. For these options, you can also explain the changes.",
"observation.statusNote.NeedsRevision.question": "What would you like to do?",
"observation.statusNote.Rejected": "The observation has been reviewed and received some comments. Please make requested changes and submit it for review again.",
"observation.scrollingNote": "In order to see all of the table's columns, you need to scroll horizontally. You can either use the scrollbar located at the bottom of the table or use your trackpad or mouse. If you use a trackpad, you can scroll horizontally when your cursor is above the table. If you use a mouse with 3 buttons, the middle one should let you do the same by holding the button down and moving the cursor to the sides or rotating the scrolling wheel sideways.",
"observation.language.note": "You are creating/editing the observation in this language.",
"observation.language.viewNote": "You are viewing the observation in this language.",
Expand Down
11 changes: 11 additions & 0 deletions src/assets/locale/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,11 @@
"Currency": "환율",
"Created": "생성함",
"Ready for QC": "품질검사 QC 가능",
"Ready for QC1": "Ready for QC1",
"Ready for QC2": "Ready for QC2",
"QC in progress": "품질검사 QC 진행 중",
"QC1 in progress": "QC1 in progress",
"QC2 in progress": "QC2 in progress",
"Needs revision": "개정 필요",
"Ready for publication": "출간 가능",
"Published (no comments)": "출간함(의견 없음)",
Expand All @@ -263,6 +267,10 @@
"Rejected": "거절됨",
"Approved": "승인됨",
"Submit for review": "검토용으로 제출",
"Start QC": "Start QC",
"Accept": "Accept",
"Reject": "Reject",
"Submit Rejection": "Submit Rejection",
"observationSubmitForReview": "이 관찰내용을 제출하면 개정 과정이 진행됩니다. 계속 하시겠습니까?",
"observationPublish": "관찰내용을 검토했고 틀린 정보가 없는지 확인했습니까? ",
"Government entity details": "정부기관 세부",
Expand Down Expand Up @@ -320,9 +328,12 @@
"observation.evidenceDetails.invalid": "상세 내용을 써주세요.",
"observation.evidenceDetails.note": "증거가 보고서 어디에 명시되어 있는지 구체적으로 명시해주세요.\n(예: 쪽수)",
"observation.statusNote.ReadyForQC": "이 관찰내용은 제출되었습니다. 리뷰가 완료되면 출간할 수 있습니다. ",
"observation.statusNote.ReadyForQC.reviewer": "This observation is ready for quality control. Please click on \"Start QC\" button whenever you want to start QC process.",
"observation.statusNote.QCInProgress": "이 관찰내용은 검토 중입니다. 완료되면 출간할 수 있습니다.",
"observation.statusNote.QCInProgress.reviewer": "Please review this observation and either accept it or reject it with making a comment for a monitor.",
"observation.statusNote.NeedsRevision": "The observation has been reviewed and received some comments. You can either (1) publish it anyway and explain why you don't want to update it, (2) amend it and publish it or (3) amend it and send it back for review. For options (2) and (3), select the 'Amend' option. For these options, you can also explain the changes.",
"observation.statusNote.NeedsRevision.question": "어떤 것을 하고 싶으세요?",
"observation.statusNote.Rejected": "The observation has been reviewed and received some comments. Please make requested changes and submit it for review again.",
"observation.scrollingNote": "표의 모든 열을 보려면 가로 방향으로 스크롤해야합니다. 표 하단에있는 스크롤 막대나 터치 패드 또는 마우스를 사용하면 됩니다. 터치 패드를 사용하는 경우, 마우스 커서가 표 위에 있을 때 가로 방향으로 스크롤 할 수 있습니다. 버튼이 3개가 있는 마우스를 사용하는 경우, 가운데 버튼을 누르고 커서를 옆으로 움직이거나 또는 스크롤 휠을 옆으로 돌리는 방식을 이용해 가로 방향으로 스크롤 할 수 있습니다.",
"observation.language.note": "You are creating/editing the observation in this language.",
"observation.language.viewNote": "You are viewing the observation in this language.",
Expand Down
11 changes: 11 additions & 0 deletions src/assets/locale/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,11 @@
"Currency": "Currency",
"Created": "Created",
"Ready for QC": "Ready for QC",
"Ready for QC1": "Ready for QC1",
"Ready for QC2": "Ready for QC2",
"QC in progress": "QC in progress",
"QC1 in progress": "QC1 in progress",
"QC2 in progress": "QC2 in progress",
"Needs revision": "Needs revision",
"Ready for publication": "Ready for publication",
"Published (no comments)": "Published (no comments)",
Expand All @@ -263,6 +267,10 @@
"Rejected": "Rejected",
"Approved": "Approved",
"Submit for review": "Submit for review",
"Start QC": "Start QC",
"Accept": "Accept",
"Reject": "Reject",
"Submit Rejection": "Submit Rejection",
"observationSubmitForReview": "The observation will be submitted for revision. Do you want to continue?",
"observationPublish": "Do you confirm that you reviewed the observation and certify that it contains correct information?",
"Government entity details": "Government entity details",
Expand Down Expand Up @@ -320,9 +328,12 @@
"observation.evidenceDetails.invalid": "Please add details",
"observation.evidenceDetails.note": "Please indicate where the evidence is located within the report (for example, the page number).",
"observation.statusNote.ReadyForQC": "This observation has been submitted. Once reviewed, you will be able to publish it.",
"observation.statusNote.ReadyForQC.reviewer": "This observation is ready for quality control. Please click on \"Start QC\" button whenever you want to start QC process.",
"observation.statusNote.QCInProgress": "This observation is being reviewed. Once done, you will be able to publish it.",
"observation.statusNote.QCInProgress.reviewer": "Please review this observation and either accept it or reject it with making a comment for a monitor.",
"observation.statusNote.NeedsRevision": "The observation has been reviewed and received some comments. You can either (1) publish it anyway and explain why you don't want to update it, (2) amend it and publish it or (3) amend it and send it back for review. For options (2) and (3), select the 'Amend' option. For these options, you can also explain the changes.",
"observation.statusNote.NeedsRevision.question": "What would you like to do?",
"observation.statusNote.Rejected": "The observation has been reviewed and received some comments. Please make requested changes and submit it for review again.",
"observation.scrollingNote": "In order to see all of the table's columns, you need to scroll horizontally. You can either use the scrollbar located at the bottom of the table or use your trackpad or mouse. If you use a trackpad, you can scroll horizontally when your cursor is above the table. If you use a mouse with 3 buttons, the middle one should let you do the same by holding the button down and moving the cursor to the sides or rotating the scrolling wheel sideways.",
"observation.language.note": "You are creating/editing the observation in this language.",
"observation.language.viewNote": "You are viewing the observation in this language.",
Expand Down
Loading

0 comments on commit a92be4e

Please sign in to comment.