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';
interface Props {
infos: { label: string; content: string }[];
status: 'healthy' | 'warning' | 'danger';
status: 'healthy' | 'warning' | 'danger' | 'catastrophe';
testID?: string;
}
......@@ -16,8 +16,10 @@ const ResultCard: FC<Props> = ({ infos, status, testID }) => {
return '#1DD1A1';
} else if (status === 'warning') {
return '#FF9A3E';
} else {
} else if (status === 'danger') {
return '#F44771';
} else {
return '#980000';
}
};
......
......@@ -2,6 +2,7 @@ export enum Status {
HEALTHY = 'healthy',
WARNING = 'warning',
DANGER = 'danger',
CATASTROPHE = 'catastrophe',
}
export enum DietelaProgram {
......@@ -74,10 +75,10 @@ export const bodyMassStatus = {
status: Status.WARNING,
},
[BodyMassConstants.OBESITY1]: {
status: Status.WARNING,
status: Status.DANGER,
},
[BodyMassConstants.OBESITY2]: {
status: Status.DANGER,
status: Status.CATASTROPHE,
},
};
......@@ -100,82 +101,82 @@ export const gglStatus = {
};
export const makanBesarStatus = {
[LargeMealDietRecommendation.ONCE_A_DAY]: {
status: Status.DANGER,
headline: 'Risiko tinggi kekurangan zat gizi yang penting',
},
[LargeMealDietRecommendation.TWICE_A_DAY]: {
status: Status.HEALTHY,
headline: 'Sudah cukup makan besar',
status: Status.WARNING,
headline: 'Risiko sedang kekurangan zat gizi yang penting',
},
[LargeMealDietRecommendation.THRICE_A_DAY]: {
status: Status.HEALTHY,
headline: 'Sudah cukup makan besar',
},
[LargeMealDietRecommendation.ONCE_A_DAY]: {
status: Status.WARNING,
headline: 'Kurang makan besar',
headline: 'Zat gizi penting akan terpenuhi dengan baik',
},
[LargeMealDietRecommendation.MORE_THAN_THRICE_A_DAY]: {
status: Status.WARNING,
headline: 'Kelebihan makan besar',
status: Status.DANGER,
headline: 'Risiko tinggi kelebihan konsumsi makan',
},
};
export const sarapanStatus = {
[BreakfastReponse.HI_BREAKFAST]: {
status: Status.HEALTHY,
headline: 'Porsi sarapan cukup',
[BreakfastReponse.NO_BREAKFAST]: {
status: Status.DANGER,
headline: 'Porsi sarapan kurang',
},
[BreakfastReponse.MED_BREAKFAST]: {
status: Status.HEALTHY,
headline: 'Porsi sarapan cukup',
},
[BreakfastReponse.NO_BREAKFAST]: {
status: Status.WARNING,
headline: 'Disarankan sarapan',
[BreakfastReponse.HI_BREAKFAST]: {
status: Status.HEALTHY,
headline: 'Porsi sarapan cukup',
},
};
export const cemilanStatus = {
[SnacksDietRecommendation.TWICE_A_DAY]: {
status: Status.HEALTHY,
headline: 'Frekuensi cemilan cukup',
},
[SnacksDietRecommendation.THRICE_A_DAY]: {
status: Status.HEALTHY,
headline: 'Frekuensi cemilan cukup',
[SnacksDietRecommendation.NO_SNACK]: {
status: Status.DANGER,
headline: 'Risiko tinggi metabolisme energi berantakan',
},
[SnacksDietRecommendation.ONCE_A_DAY]: {
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,
headline: 'Disarankan makan cemilan',
headline: 'Risiko sedang metabolisme energi berantakan',
},
[SnacksDietRecommendation.MORE_THAN_THRICE_A_DAY]: {
status: Status.WARNING,
headline: 'Disarankan kurangi cemilan',
status: Status.DANGER,
headline: 'Risiko tinggi metabolisme energi berantakan',
},
};
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]: {
status: Status.HEALTHY,
headline: 'Sudah baik',
headline: 'Cukup aktif',
},
[PhysicalActivityResponse.LEVEL4_ACTIVITY]: {
status: Status.HEALTHY,
headline: 'Sudah baik',
headline: 'Aktif',
},
[PhysicalActivityResponse.LEVEL5_ACTIVITY]: {
status: Status.HEALTHY,
headline: 'Sangat baik',
},
[PhysicalActivityResponse.LEVEL1_ACTIVITY]: {
status: Status.WARNING,
headline: 'Tingkatkan aktivitas fisik',
},
[PhysicalActivityResponse.LEVEL2_ACTIVITY]: {
status: Status.WARNING,
headline: 'Tingkatkan aktivitas fisik',
headline: 'Sangat aktif',
},
};
......
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