Fakultas Ilmu Komputer UI

Commit e3a4335b authored by Doan Andreas Nathanael's avatar Doan Andreas Nathanael
Browse files

Merge branch 'PBI-3-update_copywriting' into 'staging'

Update Copywriting of Quiz Result Card

See merge request !42
parents 7c265074 9fd04515
Pipeline #76008 passed with stages
in 65 minutes and 17 seconds
...@@ -6,7 +6,7 @@ import { styles } from './styles'; ...@@ -6,7 +6,7 @@ import { styles } from './styles';
interface Props { interface Props {
infos: { label: string; content: string }[]; infos: { label: string; content: string }[];
status: 'healthy' | 'warning' | 'danger'; status: 'healthy' | 'warning' | 'danger' | 'catastrophe';
testID?: string; testID?: string;
} }
...@@ -16,8 +16,10 @@ const ResultCard: FC<Props> = ({ infos, status, testID }) => { ...@@ -16,8 +16,10 @@ const ResultCard: FC<Props> = ({ infos, status, testID }) => {
return '#1DD1A1'; return '#1DD1A1';
} else if (status === 'warning') { } else if (status === 'warning') {
return '#FF9A3E'; return '#FF9A3E';
} else { } else if (status === 'danger') {
return '#F44771'; return '#F44771';
} else {
return '#980000';
} }
}; };
......
...@@ -2,6 +2,7 @@ export enum Status { ...@@ -2,6 +2,7 @@ export enum Status {
HEALTHY = 'healthy', HEALTHY = 'healthy',
WARNING = 'warning', WARNING = 'warning',
DANGER = 'danger', DANGER = 'danger',
CATASTROPHE = 'catastrophe',
} }
export enum DietelaProgram { export enum DietelaProgram {
...@@ -74,10 +75,10 @@ export const bodyMassStatus = { ...@@ -74,10 +75,10 @@ export const bodyMassStatus = {
status: Status.WARNING, status: Status.WARNING,
}, },
[BodyMassConstants.OBESITY1]: { [BodyMassConstants.OBESITY1]: {
status: Status.WARNING, status: Status.DANGER,
}, },
[BodyMassConstants.OBESITY2]: { [BodyMassConstants.OBESITY2]: {
status: Status.DANGER, status: Status.CATASTROPHE,
}, },
}; };
...@@ -100,82 +101,82 @@ export const gglStatus = { ...@@ -100,82 +101,82 @@ export const gglStatus = {
}; };
export const makanBesarStatus = { export const makanBesarStatus = {
[LargeMealDietRecommendation.ONCE_A_DAY]: {
status: Status.DANGER,
headline: 'Risiko tinggi kekurangan zat gizi yang penting',
},
[LargeMealDietRecommendation.TWICE_A_DAY]: { [LargeMealDietRecommendation.TWICE_A_DAY]: {
status: Status.HEALTHY, status: Status.WARNING,
headline: 'Sudah cukup makan besar', headline: 'Risiko sedang kekurangan zat gizi yang penting',
}, },
[LargeMealDietRecommendation.THRICE_A_DAY]: { [LargeMealDietRecommendation.THRICE_A_DAY]: {
status: Status.HEALTHY, status: Status.HEALTHY,
headline: 'Sudah cukup makan besar', headline: 'Zat gizi penting akan terpenuhi dengan baik',
},
[LargeMealDietRecommendation.ONCE_A_DAY]: {
status: Status.WARNING,
headline: 'Kurang makan besar',
}, },
[LargeMealDietRecommendation.MORE_THAN_THRICE_A_DAY]: { [LargeMealDietRecommendation.MORE_THAN_THRICE_A_DAY]: {
status: Status.WARNING, status: Status.DANGER,
headline: 'Kelebihan makan besar', headline: 'Risiko tinggi kelebihan konsumsi makan',
}, },
}; };
export const sarapanStatus = { export const sarapanStatus = {
[BreakfastReponse.HI_BREAKFAST]: { [BreakfastReponse.NO_BREAKFAST]: {
status: Status.HEALTHY, status: Status.DANGER,
headline: 'Porsi sarapan cukup', headline: 'Porsi sarapan kurang',
}, },
[BreakfastReponse.MED_BREAKFAST]: { [BreakfastReponse.MED_BREAKFAST]: {
status: Status.HEALTHY, status: Status.HEALTHY,
headline: 'Porsi sarapan cukup', headline: 'Porsi sarapan cukup',
}, },
[BreakfastReponse.NO_BREAKFAST]: { [BreakfastReponse.HI_BREAKFAST]: {
status: Status.WARNING, status: Status.HEALTHY,
headline: 'Disarankan sarapan', headline: 'Porsi sarapan cukup',
}, },
}; };
export const cemilanStatus = { export const cemilanStatus = {
[SnacksDietRecommendation.TWICE_A_DAY]: { [SnacksDietRecommendation.NO_SNACK]: {
status: Status.HEALTHY, status: Status.DANGER,
headline: 'Frekuensi cemilan cukup', headline: 'Risiko tinggi metabolisme energi berantakan',
},
[SnacksDietRecommendation.THRICE_A_DAY]: {
status: Status.HEALTHY,
headline: 'Frekuensi cemilan cukup',
}, },
[SnacksDietRecommendation.ONCE_A_DAY]: { [SnacksDietRecommendation.ONCE_A_DAY]: {
status: Status.WARNING, status: Status.WARNING,
headline: 'Tambah makan cemilan', headline: 'Risiko sedang metabolisme energi berantakan',
}, },
[SnacksDietRecommendation.NO_SNACK]: { [SnacksDietRecommendation.TWICE_A_DAY]: {
status: Status.HEALTHY,
headline: 'Metabolisme energi akan terjaga',
},
[SnacksDietRecommendation.THRICE_A_DAY]: {
status: Status.WARNING, status: Status.WARNING,
headline: 'Disarankan makan cemilan', headline: 'Risiko sedang metabolisme energi berantakan',
}, },
[SnacksDietRecommendation.MORE_THAN_THRICE_A_DAY]: { [SnacksDietRecommendation.MORE_THAN_THRICE_A_DAY]: {
status: Status.WARNING, status: Status.DANGER,
headline: 'Disarankan kurangi cemilan', headline: 'Risiko tinggi metabolisme energi berantakan',
}, },
}; };
export const aktivitasFisikStatus = { export const aktivitasFisikStatus = {
[PhysicalActivityResponse.LEVEL1_ACTIVITY]: {
status: Status.DANGER,
headline: 'Sangat kurang aktif (sedenter)',
},
[PhysicalActivityResponse.LEVEL2_ACTIVITY]: {
status: Status.WARNING,
headline: 'Kurang aktif',
},
[PhysicalActivityResponse.LEVEL3_ACTIVITY]: { [PhysicalActivityResponse.LEVEL3_ACTIVITY]: {
status: Status.HEALTHY, status: Status.HEALTHY,
headline: 'Sudah baik', headline: 'Cukup aktif',
}, },
[PhysicalActivityResponse.LEVEL4_ACTIVITY]: { [PhysicalActivityResponse.LEVEL4_ACTIVITY]: {
status: Status.HEALTHY, status: Status.HEALTHY,
headline: 'Sudah baik', headline: 'Aktif',
}, },
[PhysicalActivityResponse.LEVEL5_ACTIVITY]: { [PhysicalActivityResponse.LEVEL5_ACTIVITY]: {
status: Status.HEALTHY, status: Status.HEALTHY,
headline: 'Sangat baik', headline: 'Sangat aktif',
},
[PhysicalActivityResponse.LEVEL1_ACTIVITY]: {
status: Status.WARNING,
headline: 'Tingkatkan aktivitas fisik',
},
[PhysicalActivityResponse.LEVEL2_ACTIVITY]: {
status: Status.WARNING,
headline: 'Tingkatkan aktivitas fisik',
}, },
}; };
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment