Fakultas Ilmu Komputer UI

index.ts 1.77 KB
Newer Older
1
2
3
4
import {
  UserReportResponse,
  NutritionistCommentResponse,
} from 'services/progress/models';
5
6
7
8
9
import {
  getFeeling,
  getPhysicalActivity,
  getTimeForActivity,
} from '../../components/WeeklyReportPage/utils';
10
11
import { QuestionComment } from '../types';

12
13
14
15
export const page4 = (
  responseData: UserReportResponse,
  commentData: NutritionistCommentResponse,
): QuestionComment[] => [
16
17
18
19
20
  {
    questions: [
      {
        question:
          'Selama 1 minggu terakhir, pilih semua jenis aktivitas atau olahraga yang sudah Anda lakukan',
21
        answer: getPhysicalActivity(responseData.physical_activity),
22
23
      },
    ],
24
    comment: commentData.physical_activity,
25
26
27
28
29
30
  },
  {
    questions: [
      {
        question:
          'Selama 1 minggu (7 hari) terakhir, berapa total menit yang Anda habiskan untuk melakukan bergerak aktif dan olahraga di atas dalam seminggu?',
31
        answer: getTimeForActivity(responseData.time_for_activity),
32
33
      },
    ],
34
    comment: commentData.time_for_activity,
35
36
37
38
39
40
  },
  {
    questions: [
      {
        question:
          'Sejauh ini, bagaimana perasaan Anda dalam mengikuti program?',
41
        answer: getFeeling(responseData.feeling_rating),
42
43
      },
    ],
44
    comment: commentData.feeling_rating,
45
46
47
48
49
50
  },
  {
    questions: [
      {
        question:
          'Dalam 1 minggu terakhir, Apa saja yang sudah bisa Anda pelajari dari program ini?',
51
        answer: `${responseData.lesson_learned}`,
52
53
      },
    ],
54
    comment: commentData.lesson_learned,
55
56
57
58
59
60
  },
  {
    questions: [
      {
        question:
          'Silahkan sampaikan disini, jika Anda mempunyai kendala atau keluhan atau kesulitan dalam mengikuti program.',
61
        answer: `${responseData.problem_faced_and_feedbacks}`,
62
63
      },
    ],
64
    comment: commentData.problem_faced_and_feedbacks,
65
66
  },
];