Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE ]#Gdd #1115

Open
wants to merge 15 commits into
base: develop
Choose a base branch
from
1 change: 1 addition & 0 deletions assets/i18n/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@
"NO_FUND_RESERVATIONS_ADDED": "لا توجد أرقام حجوزات أموال مضافة.",
"NO_HUMANITARIAN_REPORT": "لا توجد متطلبات تقرير إنساني محددة.",
"NO_INDICATORS": "لا توجد مؤشرات على إخراج PD هذا",
"GDD_NO_INDICATORS": "لا توجد مؤشرات على إخراج GPD هذا",
"NO_OVERALL_APPROVAL": "لا توجد موافقة شاملة حتى الآن",
"NO_PDS_ADDED": "لا توجد مخرجات وثيقة البرنامج المضافة.",
"NO_PD_OUTPUTS": "لا توجد مخرجات PD.",
Expand Down
1 change: 1 addition & 0 deletions assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@
"NO_FUND_RESERVATIONS_ADDED": "There are no fund reservations numbers added.",
"NO_HUMANITARIAN_REPORT": "There are no humanitarian report requirements set.",
"NO_INDICATORS": "No indicators on this PD Output",
"GDD_NO_INDICATORS": "No indicators on this GPD Output",
"NO_OVERALL_APPROVAL": "There is no overall approval yet",
"NO_PDS_ADDED": "There are no Programme Document Outputs added.",
"NO_PD_OUTPUTS": "There are no PD Outputs.",
Expand Down
1 change: 1 addition & 0 deletions assets/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@
"NO_FUND_RESERVATIONS_ADDED": "No se ha añadido ningún número de reserva de fondos.",
"NO_HUMANITARIAN_REPORT": "No se han establecido requisitos para los informes humanitarios.",
"NO_INDICATORS": "No hay indicadores en este PD Salida",
"GDD_NO_INDICATORS": "No hay indicadores en este GPD Salida",
"NO_OVERALL_APPROVAL": "Aún no hay aprobación general",
"NO_PDS_ADDED": "No se ha añadido ningún Documento de Programa.",
"NO_PD_OUTPUTS": "No hay salidas PD.",
Expand Down
3 changes: 2 additions & 1 deletion assets/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"AMENDMENT_MERGE": "Fusion d'amendements",
"AMENDMENT_MERGE_PROMPT": "Êtes-vous sûr de vouloir fusionner l’amendement؟",
"AMENDMENT_MERGE_MESSAGE": "Cela peut prendre un certain temps. Nous vous demandons d'être patient",
"AMENDMENT_MODE_TEXT": "Ce DP est en cours d’amendement. Voir ",
"AMENDMENT_MODE_TEXT": "Ce DP est en cours d’amendement. Voir ",
"AMENDMENT_TYPES": "Types de modifications",
"AMENDMENT_TYPES_ITEMS": {
"TYPE_1:_ADMINISTRATIVE_ERROR_(CORRECTION)": "Type 1 : erreur administrative (correction)",
Expand Down Expand Up @@ -361,6 +361,7 @@
"NO_FUND_RESERVATIONS_ADDED": "Il n’y a pas de numéros de Réservation de Fonds ajoutés.",
"NO_HUMANITARIAN_REPORT": "Il n’y a pas d’exigences en matière de rapports humanitaires fixées.",
"NO_INDICATORS": "Aucun indicateur sur ce produit du DP ",
"GDD_NO_INDICATORS": "Aucun indicateur sur ce produit du GPD ",
"NO_OVERALL_APPROVAL": "Il n’y a pas encore d’approbation globale ",
"NO_PDS_ADDED": "Aucun Produit du document de programme n’a été ajouté",
"NO_PD_OUTPUTS": "Il n’y a pas de produits du DP .",
Expand Down
3 changes: 2 additions & 1 deletion assets/i18n/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"AMENDMENT_MERGE": "Mesclar Aditivo",
"AMENDMENT_MERGE_PROMPT": "Tem certeza de que deseja mesclar aditivo?",
"AMENDMENT_MERGE_MESSAGE": "Isto pode demorar algum tempo. Por favor, seja paciente",
"AMENDMENT_MODE_TEXT": "Este PD é um aditivo. Ver",
"AMENDMENT_MODE_TEXT": "Este PD é um aditivo. Ver",
"AMENDMENT_TYPES": "Tipos de aditivo.",
"AMENDMENT_TYPES_ITEMS": {
"TYPE_1:_ADMINISTRATIVE_ERROR_(CORRECTION)": "Tipo 1: Erro administrativo (correção)",
Expand Down Expand Up @@ -361,6 +361,7 @@
"NO_FUND_RESERVATIONS_ADDED": "Não há números de funds reservations (FR) adicionados.",
"NO_HUMANITARIAN_REPORT": "Não há necessidade de relatório humanitário",
"NO_INDICATORS": "Nenhum indicador sobre este Resultado do PD",
"GDD_NO_INDICATORS": "Nenhum indicador sobre este Resultado do GPD",
"NO_OVERALL_APPROVAL": "Ainda não há aprovação geral",
"NO_PDS_ADDED": "Não há resultados do Documento de Programa adicionado",
"NO_PD_OUTPUTS": "Não há Resultados do PD",
Expand Down
1 change: 1 addition & 0 deletions assets/i18n/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@
"NO_FUND_RESERVATIONS_ADDED": "Номера резервирования фондов не добавлены",
"NO_HUMANITARIAN_REPORT": "Не установлены требования к гуманитарной отчетности. ",
"NO_INDICATORS": "Не указаны индикаторы для этого промежуточного результата ПД",
"GDD_NO_INDICATORS": "Не указаны индикаторы для этого промежуточного результата ГПД",
"NO_OVERALL_APPROVAL": "Общее одобрение пока не получено",
"NO_PDS_ADDED": "Промежуточные результаты Программного Документа не указаны.",
"NO_PD_OUTPUTS": "Нет промежуточных результатов ПД.",
Expand Down
1 change: 1 addition & 0 deletions common/components/activity/activity-items-table.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export const ActivityItemsTableStyles: CSSResult = css`
}
label[required] {
padding-inline-end: 20px;
background: url('./assets/images/required.svg') no-repeat 99% 20%/5px;
}
etools-input,
etools-textarea {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ export class CommentsGroup extends LitElement {
.description {
margin-top: 8px;
}
.space-between {
justify-content: space-between;
}
.flex-auto {
flex: auto;
}
`
];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ export class MessageItem extends LitElement {
width: 83%;
box-shadow: 0 4px 4px rgba(0, 0, 0, 0.12);
}
.flex-c {
flex: 1;
}
:host([my-comment]) {
align-self: flex-end;
}
Expand Down
2 changes: 1 addition & 1 deletion common/components/comments/comments-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class CommentsDialog extends EditComments {
overflow-y: auto;
}
</style>
<etools-dialog size="md" keep-dialog-open dialog-title="${this.dialogTitle}" @close="${this.onClose}" no-padding>
<etools-dialog size="md" keep-dialog-open dialog-title="${this.dialogTitle}" @close="${this.onClose}">
<div class="container-dialog">
${this.comments.map(
(comment: any, index: number) =>
Expand Down
4 changes: 2 additions & 2 deletions common/components/intervention/pd-termination.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export class PdTermination extends ComponentBaseMixin(EnvironmentFlagsMixin(LitE
>
</datepicker-lite>
</div>
<div class="row">
<div class="row padding-v">
<etools-upload
class="col-12"
id="terminationNotice"
Expand All @@ -91,7 +91,7 @@ export class PdTermination extends ComponentBaseMixin(EnvironmentFlagsMixin(LitE
error-message="${translate('TERMINATION_NOTICE_FILE_IS_REQUIRED')}"
>
</div>
<div class="row">
<div class="row padding-v">
<etools-warn-message-lit
class="col-12"
.messages="${this.warnMessages}"
Expand Down
4 changes: 3 additions & 1 deletion common/types/store.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import {
Section,
GenericObject,
EtoolsUser,
CountryProgram
CountryProgram,
EWorkPlan
} from '@unicef-polymer/etools-types';
import {CommentsEndpoints} from '../components/comments/comments-types';
import {UploadStatusState} from '../reducers/upload-status';
Expand Down Expand Up @@ -66,6 +67,7 @@ export interface CommonDataState {
countryProgrammes: CountryProgram[];
loadedTimestamp: number;
providedBy: LabelAndValue[];
eWorkPlans: EWorkPlan[];
}

export interface RootState {
Expand Down
4 changes: 2 additions & 2 deletions intervention-actions/intervention-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,15 +279,15 @@ export class InterventionActions extends connectStore(LitElement) {
if (action === AMENDMENT_MERGE) {
setTimeout(() => {
this.redirectToTabPage(intervention.id, 'metadata');
});
}, 300);
} else {
getStore().dispatch(updateCurrentIntervention(intervention));
}

if (action === REVIEW) {
setTimeout(() => {
this.redirectToTabPage(intervention.id, REVIEW);
});
}, 300);
}
})
.finally(() => {
Expand Down
6 changes: 3 additions & 3 deletions intervention-strategy/risks/risks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ export class RisksElement extends CommentsMixin(ComponentBaseMixin(LitElement))
#mitigationMeasures {
width: 100%;
}
.p-20 {
.m-20 {
overflow: hidden;
padding: 20px;
margin-inline-start: 20px !important;
}
info-icon-tooltip {
--iit-margin: 0 0 0 4px;
Expand Down Expand Up @@ -120,7 +120,7 @@ export class RisksElement extends CommentsMixin(ComponentBaseMixin(LitElement))
.showDelete=${this.canEditAtLeastOneField}
>
</etools-table>
<div class="row p-20" ?hidden="${this.data?.length}">
<div class="row m-20" ?hidden="${this.data?.length}">
<p>${translate('NO_RISK_ADDED')}</p>
</div>
</etools-content-panel>
Expand Down
14 changes: 8 additions & 6 deletions intervention-tabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ export class InterventionTabs extends connectStore(UploadMixin(LitElement)) {
currentPage(state) !== 'interventions' || currentSubpage(state) === 'list' || currentSubpage(state) === 'new';
const needToReset = Boolean(notInterventionTabs && (this._routeDetails || this.intervention));
const commentsState = Boolean(state.app?.routeDetails?.queryParams?.comment_mode);
this.checkCommentsMode(commentsState);
this.checkCommentsMode(commentsState, notInterventionTabs);
if (needToReset) {
this.resetPageData();
}
Expand Down Expand Up @@ -495,7 +495,7 @@ export class InterventionTabs extends connectStore(UploadMixin(LitElement)) {
setTimeout(() => this.shadowRoot?.querySelector('sl-tab-group')?.syncIndicator());
}

checkCommentsMode(newState: boolean): void {
checkCommentsMode(newState: boolean, notInterventionTabs: boolean): void {
if (this.commentMode === newState) {
return;
}
Expand All @@ -504,14 +504,16 @@ export class InterventionTabs extends connectStore(UploadMixin(LitElement)) {
if (!this.commentMode && this.commentsPanel) {
this.commentsPanel.remove();
this.commentsPanel = null;
} else if (this.commentMode && !this.commentsPanel) {
} else if (this.commentMode && !this.commentsPanel && !notInterventionTabs) {
this.commentsPanel = document.createElement('comments-panels') as CommentsPanels;
document.body.append(this.commentsPanel);
}

setTimeout(() => {
getStore().dispatch(enableCommentMode(this.commentMode));
}, 10);
if (!notInterventionTabs) {
setTimeout(() => {
getStore().dispatch(enableCommentMode(this.commentMode));
}, 10);
}
}

applyTabsTitleTranslation(pageTabs: any[]): any[] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export const ActivitiesAndIndicatorsStyles: CSSResult = css`
--sl-color-neutral-1000: #e14f4f;
}
.item-link {
margin-top: 7px;
margin-inline-start: 4px;
font-size: var(--etools-font-size-16, 16px);
line-height: 26px;
color: #5c5c5c;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export class SupplyAgreementDialog extends ComponentBaseMixin(LitElement) {
value="${this.data.unit_number ? this.data.unit_number : ''}"
@value-changed="${({detail}: CustomEvent) => this.valueChanged(detail, 'unit_number')}"
label=${translate(translatesMap.unit_number)}
maxlength="16"
allowed-pattern="[0-9]"
placeholder="—"
error-message=${translate('GENERAL.REQUIRED_FIELD')}
Expand Down