Skip to content

Commit

Permalink
Merge branch 'main' into chore/1241-replace-deprecated-pf-dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
gitdallas authored Sep 22, 2023
2 parents 30c240e + 48dd6fd commit 5cee8d3
Show file tree
Hide file tree
Showing 22 changed files with 575 additions and 144 deletions.
7 changes: 2 additions & 5 deletions client/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@
"orange": "Orange",
"purple": "Purple",
"red": "Red",
"teal": "Teal"
"teal": "Teal",
"yellow": "Yellow"
},
"composed": {
"add": "Add {{what}}",
Expand Down Expand Up @@ -243,7 +244,6 @@
"businessServices": "Business services",
"canceled": "Canceled",
"category": "Category",
"cloudNativeReady": "Cloud-native ready",
"color": "Color",
"comments": "Comments",
"completed": "Completed",
Expand Down Expand Up @@ -311,7 +311,6 @@
"member(s)": "Member(s)",
"memberCount": "Member count",
"message": "Message",
"modernizable": "Modernizable",
"migrationWave": "Migration wave",
"migrationWaves": "Migration waves",
"migrationWave(s)": "Migration wave(s)",
Expand All @@ -322,7 +321,6 @@
"notConnected": "Not connected",
"notReviewed": "Not reviewed",
"notStarted": "Not started",
"notYetAssessed": "Not yet assessed",
"notYetReviewed": "Not yet reviewed",
"other": "Other",
"owner": "Owner",
Expand Down Expand Up @@ -384,7 +382,6 @@
"unassessed": "Unassessed",
"unassigned": "Not yet assigned",
"unknown": "Unknown",
"unsuitableForContainers": "Unsuitable for containers",
"uploadApplicationFile": "Upload your application file",
"uploadYamlFile": "Upload your YAML file",
"url": "URL",
Expand Down
7 changes: 2 additions & 5 deletions client/public/locales/es/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@
"green": "Verde",
"orange": "Naranja",
"purple": "Morado",
"red": "Rojo"
"red": "Rojo",
"yellow": "Amarillo"
},
"composed": {
"add": "Agregar {{what}}",
Expand Down Expand Up @@ -194,7 +195,6 @@
"businessServices": "Servicios de negocio",
"canceled": "Cancelado",
"category": "Categoría",
"cloudNativeReady": "Listo para Cloud-native",
"color": "Color",
"comments": "Comentarios",
"completed": "Completado",
Expand Down Expand Up @@ -247,13 +247,11 @@
"member(s)": "Miembro(s)",
"memberCount": "Número de miembros",
"message": "Mensaje",
"modernizable": "Modernizable",
"name": "Nombre",
"northboundDependencies": "Dependencias del norte",
"notAvailable": "No disponible",
"notReviewed": "No revisado",
"notStarted": "No empezado",
"notYetAssessed": "No evaluado todavía",
"notYetReviewed": "No revisado todavía",
"other": "Otro",
"owner": "Propietario",
Expand Down Expand Up @@ -304,7 +302,6 @@
"trivialButMigratable": "Trivial pero migrable",
"unassessed": "No evaluado",
"unknown": "Desconocido",
"unsuitableForContainers": "No apto para contenedores",
"uploadApplicationFile": "Carga tu archivo con aplicaciones",
"user": "Usuario",
"version": "Versión",
Expand Down
9 changes: 2 additions & 7 deletions client/src/app/api/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -709,8 +709,8 @@ export interface Assessment
description: string;
status: AssessmentStatus;
risk: Risk;
stakeholders: Ref[];
stakeholderGroups: Ref[];
stakeholders?: Ref[];
stakeholderGroups?: Ref[];
}
export interface CategorizedTag {
category: TagCategory;
Expand All @@ -723,11 +723,6 @@ export interface AssessmentRisk {
applicationId: number;
risk: Risk;
}
export interface AssessmentRisk {
assessmentId: number;
applicationId: number;
risk: Risk;
}

export interface AssessmentQuestionRisk {
category: string;
Expand Down
3 changes: 3 additions & 0 deletions client/src/app/api/rest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@ export const getApplicationSummaryCSV = (id: string): AxiosPromise => {
});
};

export const getAssessments = (): Promise<Assessment[]> =>
axios.get(ASSESSMENTS).then((response) => response.data);

export const getAssessmentsByItemId = (
isArchetype: boolean,
itemId?: number | string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@ export const ApplicationsTable: React.FC = () => {
await Promise.all(
application.assessments.map(async (assessment) => {
await deleteAssessment({
id: assessment.id,
name: application.name,
assessmentId: assessment.id,
applicationName: application.name,
});
})
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,13 @@ export const ImportQuestionnaireForm: React.FC<
trigger,
} = methods;

const onHandleSuccessfullQuestionnaireCreation = (
response: Questionnaire
) => {
const onHandleSuccessfulQuestionnaireCreation = (response: Questionnaire) => {
onSaved(response);
pushNotification({
title: t("toastr.success.questionnaireCreated"),
title: t("toastr.success.createWhat", {
type: t("terms.questionnaire"),
what: response.name,
}),
variant: "success",
});
onSaved();
Expand All @@ -75,7 +76,7 @@ export const ImportQuestionnaireForm: React.FC<
};

const { mutate: createQuestionnaire } = useCreateQuestionnaireMutation(
onHandleSuccessfullQuestionnaireCreation,
onHandleSuccessfulQuestionnaireCreation,
onHandleFailedQuestionnaireCreation
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const AssessmentActionsTable: React.FC<AssessmentActionsTableProps> = ({
<QuestionnairesTable
application={application}
archetype={archetype}
isReadonly
questionnaires={archivedQuestionnaires}
assessments={assessments}
isFetching={isFetchingQuestionnaires || isFetchingAssessmentsById}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,10 @@ const DynamicAssessmentActionsRow: FunctionComponent<
if (assessment) {
try {
await deleteAssessmentAsync({
name: assessment.name,
id: assessment.id,
assessmentId: assessment.id,
applicationName: application?.name,
applicationId: application?.id,
archetypeId: archetype?.id,
}).then(() => {
createAssessment();
});
Expand Down Expand Up @@ -257,8 +259,10 @@ const DynamicAssessmentActionsRow: FunctionComponent<
variant="plain"
onClick={() => {
deleteAssessment({
id: assessment.id,
name: assessment.name,
assessmentId: assessment.id,
applicationName: application?.name,
applicationId: application?.id,
archetypeId: archetype?.id,
});
}}
>
Expand Down
Loading

0 comments on commit 5cee8d3

Please sign in to comment.