@ubkinfotech/tecaher-erp 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +413 -0
  3. package/lib/commonjs/core/api/apiClient.js +38 -0
  4. package/lib/commonjs/core/api/endpoints.js +139 -0
  5. package/lib/commonjs/core/api/interceptor.js +64 -0
  6. package/lib/commonjs/core/auth/authContext.js +30 -0
  7. package/lib/commonjs/core/auth/authService.js +12 -0
  8. package/lib/commonjs/core/hooks/useApiQuery.js +26 -0
  9. package/lib/commonjs/core/provider/ERPProvider.js +63 -0
  10. package/lib/commonjs/core/provider/types.js +5 -0
  11. package/lib/commonjs/core/provider/useERP.js +17 -0
  12. package/lib/commonjs/core/types/api.js +1 -0
  13. package/lib/commonjs/index.js +110 -0
  14. package/lib/commonjs/modules/assignment/hooks/useAssignmentList.js +16 -0
  15. package/lib/commonjs/modules/assignment/hooks/useHomeworkDetails.js +16 -0
  16. package/lib/commonjs/modules/assignment/hooks/useHomeworkSubmissions.js +16 -0
  17. package/lib/commonjs/modules/assignment/screens/AssignmentScreen.js +2615 -0
  18. package/lib/commonjs/modules/assignment/services/assignmentService.js +75 -0
  19. package/lib/commonjs/modules/attendance/hooks/useAttendance.js +16 -0
  20. package/lib/commonjs/modules/attendance/screens/AttendanceScreen.js +866 -0
  21. package/lib/commonjs/modules/attendance/services/attendanceService.js +31 -0
  22. package/lib/commonjs/modules/leaveRequest/hooks/useLeaveRequests.js +16 -0
  23. package/lib/commonjs/modules/leaveRequest/screens/LeaveRequestScreen.js +991 -0
  24. package/lib/commonjs/modules/leaveRequest/services/leaveRequestService.js +42 -0
  25. package/lib/commonjs/modules/marks/hooks/useMarks.js +14 -0
  26. package/lib/commonjs/modules/marks/screens/MarksScreen.js +1621 -0
  27. package/lib/commonjs/modules/marks/services/marksService.js +71 -0
  28. package/lib/commonjs/modules/myAttendance/hooks/useMyAttendance.js +16 -0
  29. package/lib/commonjs/modules/myAttendance/screens/MyAttendanceScreen.js +357 -0
  30. package/lib/commonjs/modules/myAttendance/services/myAttendanceService.js +11 -0
  31. package/lib/commonjs/modules/notes/hooks/useNotes.js +16 -0
  32. package/lib/commonjs/modules/notes/screens/NotesScreen.js +1287 -0
  33. package/lib/commonjs/modules/notes/services/notesService.js +65 -0
  34. package/lib/commonjs/modules/noticeboard/hooks/useNoticeboard.js +16 -0
  35. package/lib/commonjs/modules/noticeboard/screens/NoticeBoardScreen.js +381 -0
  36. package/lib/commonjs/modules/noticeboard/services/noticeboardService.js +16 -0
  37. package/lib/commonjs/modules/notification/hooks/useNotifications.js +16 -0
  38. package/lib/commonjs/modules/notification/screens/NotificationScreen.js +186 -0
  39. package/lib/commonjs/modules/notification/services/notificationService.js +16 -0
  40. package/lib/commonjs/modules/promoteStudent/hooks/usePromoteStudent.js +16 -0
  41. package/lib/commonjs/modules/promoteStudent/screens/PromoteStudentScreen.js +644 -0
  42. package/lib/commonjs/modules/promoteStudent/services/promoteStudentService.js +36 -0
  43. package/lib/commonjs/modules/timetable/hooks/useTimeTable.js +14 -0
  44. package/lib/commonjs/modules/timetable/screens/TimeTableScreen.js +258 -0
  45. package/lib/commonjs/modules/timetable/services/timetableService.js +16 -0
  46. package/lib/commonjs/package.json +1 -0
  47. package/lib/commonjs/shared/empty-states/EmptyState.js +45 -0
  48. package/lib/commonjs/shared/empty-states/ErrorState.js +45 -0
  49. package/lib/commonjs/shared/loaders/LoadingState.js +25 -0
  50. package/lib/commonjs/shared/theme/theme.js +22 -0
  51. package/lib/module/core/api/apiClient.js +32 -0
  52. package/lib/module/core/api/endpoints.js +135 -0
  53. package/lib/module/core/api/interceptor.js +60 -0
  54. package/lib/module/core/auth/authContext.js +23 -0
  55. package/lib/module/core/auth/authService.js +8 -0
  56. package/lib/module/core/hooks/useApiQuery.js +21 -0
  57. package/lib/module/core/provider/ERPProvider.js +56 -0
  58. package/lib/module/core/provider/types.js +3 -0
  59. package/lib/module/core/provider/useERP.js +12 -0
  60. package/lib/module/core/types/api.js +1 -0
  61. package/lib/module/index.js +17 -0
  62. package/lib/module/modules/assignment/hooks/useAssignmentList.js +12 -0
  63. package/lib/module/modules/assignment/hooks/useHomeworkDetails.js +12 -0
  64. package/lib/module/modules/assignment/hooks/useHomeworkSubmissions.js +12 -0
  65. package/lib/module/modules/assignment/screens/AssignmentScreen.js +2609 -0
  66. package/lib/module/modules/assignment/services/assignmentService.js +62 -0
  67. package/lib/module/modules/attendance/hooks/useAttendance.js +12 -0
  68. package/lib/module/modules/attendance/screens/AttendanceScreen.js +860 -0
  69. package/lib/module/modules/attendance/services/attendanceService.js +23 -0
  70. package/lib/module/modules/leaveRequest/hooks/useLeaveRequests.js +12 -0
  71. package/lib/module/modules/leaveRequest/screens/LeaveRequestScreen.js +985 -0
  72. package/lib/module/modules/leaveRequest/services/leaveRequestService.js +35 -0
  73. package/lib/module/modules/marks/hooks/useMarks.js +10 -0
  74. package/lib/module/modules/marks/screens/MarksScreen.js +1615 -0
  75. package/lib/module/modules/marks/services/marksService.js +55 -0
  76. package/lib/module/modules/myAttendance/hooks/useMyAttendance.js +12 -0
  77. package/lib/module/modules/myAttendance/screens/MyAttendanceScreen.js +351 -0
  78. package/lib/module/modules/myAttendance/services/myAttendanceService.js +7 -0
  79. package/lib/module/modules/notes/hooks/useNotes.js +12 -0
  80. package/lib/module/modules/notes/screens/NotesScreen.js +1281 -0
  81. package/lib/module/modules/notes/services/notesService.js +54 -0
  82. package/lib/module/modules/noticeboard/hooks/useNoticeboard.js +12 -0
  83. package/lib/module/modules/noticeboard/screens/NoticeBoardScreen.js +375 -0
  84. package/lib/module/modules/noticeboard/services/noticeboardService.js +12 -0
  85. package/lib/module/modules/notification/hooks/useNotifications.js +12 -0
  86. package/lib/module/modules/notification/screens/NotificationScreen.js +180 -0
  87. package/lib/module/modules/notification/services/notificationService.js +12 -0
  88. package/lib/module/modules/promoteStudent/hooks/usePromoteStudent.js +12 -0
  89. package/lib/module/modules/promoteStudent/screens/PromoteStudentScreen.js +638 -0
  90. package/lib/module/modules/promoteStudent/services/promoteStudentService.js +27 -0
  91. package/lib/module/modules/timetable/hooks/useTimeTable.js +10 -0
  92. package/lib/module/modules/timetable/screens/TimeTableScreen.js +252 -0
  93. package/lib/module/modules/timetable/services/timetableService.js +11 -0
  94. package/lib/module/package.json +1 -0
  95. package/lib/module/shared/empty-states/EmptyState.js +40 -0
  96. package/lib/module/shared/empty-states/ErrorState.js +40 -0
  97. package/lib/module/shared/loaders/LoadingState.js +20 -0
  98. package/lib/module/shared/theme/theme.js +18 -0
  99. package/lib/typescript/core/api/apiClient.d.ts +14 -0
  100. package/lib/typescript/core/api/endpoints.d.ts +164 -0
  101. package/lib/typescript/core/api/interceptor.d.ts +4 -0
  102. package/lib/typescript/core/auth/authContext.d.ts +11 -0
  103. package/lib/typescript/core/auth/authService.d.ts +9 -0
  104. package/lib/typescript/core/hooks/useApiQuery.d.ts +7 -0
  105. package/lib/typescript/core/provider/ERPProvider.d.ts +14 -0
  106. package/lib/typescript/core/provider/types.d.ts +34 -0
  107. package/lib/typescript/core/provider/useERP.d.ts +3 -0
  108. package/lib/typescript/core/types/api.d.ts +11 -0
  109. package/lib/typescript/index.d.ts +18 -0
  110. package/lib/typescript/modules/assignment/hooks/useAssignmentList.d.ts +3 -0
  111. package/lib/typescript/modules/assignment/hooks/useHomeworkDetails.d.ts +4 -0
  112. package/lib/typescript/modules/assignment/hooks/useHomeworkSubmissions.d.ts +4 -0
  113. package/lib/typescript/modules/assignment/screens/AssignmentScreen.d.ts +9 -0
  114. package/lib/typescript/modules/assignment/services/assignmentService.d.ts +89 -0
  115. package/lib/typescript/modules/attendance/hooks/useAttendance.d.ts +3 -0
  116. package/lib/typescript/modules/attendance/screens/AttendanceScreen.d.ts +5 -0
  117. package/lib/typescript/modules/attendance/services/attendanceService.d.ts +33 -0
  118. package/lib/typescript/modules/leaveRequest/hooks/useLeaveRequests.d.ts +3 -0
  119. package/lib/typescript/modules/leaveRequest/screens/LeaveRequestScreen.d.ts +5 -0
  120. package/lib/typescript/modules/leaveRequest/services/leaveRequestService.d.ts +39 -0
  121. package/lib/typescript/modules/marks/hooks/useMarks.d.ts +2 -0
  122. package/lib/typescript/modules/marks/screens/MarksScreen.d.ts +6 -0
  123. package/lib/typescript/modules/marks/services/marksService.d.ts +150 -0
  124. package/lib/typescript/modules/myAttendance/hooks/useMyAttendance.d.ts +3 -0
  125. package/lib/typescript/modules/myAttendance/screens/MyAttendanceScreen.d.ts +5 -0
  126. package/lib/typescript/modules/myAttendance/services/myAttendanceService.d.ts +10 -0
  127. package/lib/typescript/modules/notes/hooks/useNotes.d.ts +3 -0
  128. package/lib/typescript/modules/notes/screens/NotesScreen.d.ts +8 -0
  129. package/lib/typescript/modules/notes/services/notesService.d.ts +58 -0
  130. package/lib/typescript/modules/noticeboard/hooks/useNoticeboard.d.ts +3 -0
  131. package/lib/typescript/modules/noticeboard/screens/NoticeBoardScreen.d.ts +5 -0
  132. package/lib/typescript/modules/noticeboard/services/noticeboardService.d.ts +17 -0
  133. package/lib/typescript/modules/notification/hooks/useNotifications.d.ts +3 -0
  134. package/lib/typescript/modules/notification/screens/NotificationScreen.d.ts +5 -0
  135. package/lib/typescript/modules/notification/services/notificationService.d.ts +8 -0
  136. package/lib/typescript/modules/promoteStudent/hooks/usePromoteStudent.d.ts +3 -0
  137. package/lib/typescript/modules/promoteStudent/screens/PromoteStudentScreen.d.ts +5 -0
  138. package/lib/typescript/modules/promoteStudent/services/promoteStudentService.d.ts +40 -0
  139. package/lib/typescript/modules/timetable/hooks/useTimeTable.d.ts +3 -0
  140. package/lib/typescript/modules/timetable/screens/TimeTableScreen.d.ts +5 -0
  141. package/lib/typescript/modules/timetable/services/timetableService.d.ts +14 -0
  142. package/lib/typescript/shared/empty-states/EmptyState.d.ts +6 -0
  143. package/lib/typescript/shared/empty-states/ErrorState.d.ts +6 -0
  144. package/lib/typescript/shared/loaders/LoadingState.d.ts +3 -0
  145. package/lib/typescript/shared/theme/theme.d.ts +17 -0
  146. package/package.json +89 -0
@@ -0,0 +1,866 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.AttendanceScreen = AttendanceScreen;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _useERP = require("../../../core/provider/useERP");
10
+ var _EmptyState = require("../../../shared/empty-states/EmptyState");
11
+ var _LoadingState = require("../../../shared/loaders/LoadingState");
12
+ var _attendanceService = require("../services/attendanceService");
13
+ var _jsxRuntime = require("react/jsx-runtime");
14
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
15
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
16
+ function normalizeOptions(result) {
17
+ if (!result) {
18
+ return [];
19
+ }
20
+ if (Array.isArray(result)) {
21
+ return result;
22
+ }
23
+ if (Array.isArray(result?.data)) {
24
+ return result.data;
25
+ }
26
+ if (Array.isArray(result?.data?.data)) {
27
+ return result.data.data;
28
+ }
29
+ return [];
30
+ }
31
+ function normalizeAttendancePayload(result) {
32
+ if (!result) {
33
+ return null;
34
+ }
35
+ const raw = result?.data ?? result;
36
+ if (raw && typeof raw === 'object' && !Array.isArray(raw)) {
37
+ return raw;
38
+ }
39
+ return null;
40
+ }
41
+ function normalizeStudents(payload, mode) {
42
+ const list = Array.isArray(payload?.student) ? payload.student : [];
43
+ return list.map(item => {
44
+ const value = item?.attendence_type_id;
45
+ let next = value;
46
+ if (mode === 'take') {
47
+ next = value === null ? '4' : value !== undefined && value !== '' ? String(value) : '1';
48
+ } else {
49
+ next = value ? String(value) : '4';
50
+ }
51
+ return {
52
+ ...item,
53
+ attendence_type_id: next
54
+ };
55
+ });
56
+ }
57
+ function presentCountFromPayload(payload, students) {
58
+ const rawPresent = payload?.total?.[0]?.present;
59
+ if (rawPresent !== undefined && rawPresent !== null && rawPresent !== '') {
60
+ const value = Number(rawPresent);
61
+ if (Number.isFinite(value)) {
62
+ return value;
63
+ }
64
+ }
65
+ return students.filter(item => String(item?.attendence_type_id ?? '') === '1').length;
66
+ }
67
+ function formatDisplayDate(date) {
68
+ const parts = String(date ?? '').split('-');
69
+ if (parts.length !== 3) {
70
+ return date;
71
+ }
72
+ const [year, month, day] = parts;
73
+ const d = new Date(Number(year), Number(month) - 1, Number(day));
74
+ if (Number.isNaN(d.getTime())) {
75
+ return date;
76
+ }
77
+ return d.toLocaleDateString('en-US', {
78
+ day: '2-digit',
79
+ month: 'short',
80
+ year: 'numeric'
81
+ });
82
+ }
83
+ function todayYmd() {
84
+ const d = new Date();
85
+ const y = d.getFullYear();
86
+ const m = String(d.getMonth() + 1).padStart(2, '0');
87
+ const day = String(d.getDate()).padStart(2, '0');
88
+ return `${y}-${m}-${day}`;
89
+ }
90
+ function tryGetCalendar() {
91
+ try {
92
+ const mod = require('react-native-calendars');
93
+ return mod?.Calendar ?? mod?.default ?? mod;
94
+ } catch {
95
+ return null;
96
+ }
97
+ }
98
+ function SelectModal({
99
+ label,
100
+ value,
101
+ options,
102
+ placeholder,
103
+ onChange
104
+ }) {
105
+ const [open, setOpen] = (0, _react.useState)(false);
106
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
107
+ style: styles.field,
108
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
109
+ style: styles.label,
110
+ children: label
111
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
112
+ onPress: () => setOpen(true),
113
+ style: styles.select,
114
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
115
+ style: styles.selectText,
116
+ children: value?.label ?? placeholder
117
+ })
118
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Modal, {
119
+ visible: open,
120
+ transparent: true,
121
+ animationType: "fade",
122
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
123
+ style: styles.modalOverlay,
124
+ onPress: () => setOpen(false),
125
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
126
+ style: styles.modalCard,
127
+ onPress: () => {},
128
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
129
+ style: styles.modalTitle,
130
+ children: label
131
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.FlatList, {
132
+ data: options,
133
+ keyExtractor: (item, index) => `${item.value}-${index}`,
134
+ renderItem: ({
135
+ item
136
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
137
+ style: styles.optionRow,
138
+ onPress: () => {
139
+ onChange(item);
140
+ setOpen(false);
141
+ },
142
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
143
+ style: styles.optionText,
144
+ children: item.label
145
+ })
146
+ }),
147
+ ListEmptyComponent: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
148
+ style: styles.optionEmpty,
149
+ children: "No options"
150
+ })
151
+ })]
152
+ })
153
+ })
154
+ })]
155
+ });
156
+ }
157
+ function AttendanceScreen(props) {
158
+ const {
159
+ api
160
+ } = (0, _useERP.useERP)();
161
+ const Calendar = (0, _react.useMemo)(() => tryGetCalendar(), []);
162
+ const [mode, setMode] = (0, _react.useState)('take');
163
+ const [classes, setClasses] = (0, _react.useState)([]);
164
+ const [sections, setSections] = (0, _react.useState)([]);
165
+ const [selectedClass, setSelectedClass] = (0, _react.useState)(null);
166
+ const [selectedSection, setSelectedSection] = (0, _react.useState)(null);
167
+ const [date, setDate] = (0, _react.useState)(props.date ?? todayYmd());
168
+ const [calendarOpen, setCalendarOpen] = (0, _react.useState)(false);
169
+ const [loadingFilters, setLoadingFilters] = (0, _react.useState)(true);
170
+ const [searching, setSearching] = (0, _react.useState)(false);
171
+ const [submitting, setSubmitting] = (0, _react.useState)(false);
172
+ const [searched, setSearched] = (0, _react.useState)(false);
173
+ const [attendanceData, setAttendanceData] = (0, _react.useState)(null);
174
+ const [students, setStudents] = (0, _react.useState)([]);
175
+ const [present, setPresent] = (0, _react.useState)(0);
176
+ const [count, setCount] = (0, _react.useState)(0);
177
+ const sessionId = props.sessionId;
178
+ const loadClasses = (0, _react.useCallback)(async () => {
179
+ setLoadingFilters(true);
180
+ try {
181
+ const res = await (0, _attendanceService.fetchTeacherClasses)(api);
182
+ setClasses(normalizeOptions(res));
183
+ } catch (error) {
184
+ _reactNative.Alert.alert('Error', String(error?.message ?? 'Could not load classes'));
185
+ } finally {
186
+ setLoadingFilters(false);
187
+ }
188
+ }, [api]);
189
+ (0, _react.useEffect)(() => {
190
+ loadClasses().catch(() => {});
191
+ }, [loadClasses]);
192
+ (0, _react.useEffect)(() => {
193
+ if (!classes.length || selectedClass || props.classId === undefined) {
194
+ return;
195
+ }
196
+ const found = classes.find(item => String(item.value) === String(props.classId));
197
+ if (found) {
198
+ setSelectedClass(found);
199
+ }
200
+ }, [classes, props.classId, selectedClass]);
201
+ (0, _react.useEffect)(() => {
202
+ if (!selectedClass?.value) {
203
+ setSections([]);
204
+ setSelectedSection(null);
205
+ return;
206
+ }
207
+ (0, _attendanceService.fetchTeacherSections)(api, {
208
+ classId: selectedClass.value
209
+ }).then(res => {
210
+ const next = normalizeOptions(res);
211
+ setSections(next);
212
+ if (props.sectionId !== undefined) {
213
+ const found = next.find(item => String(item.value) === String(props.sectionId));
214
+ if (found) {
215
+ setSelectedSection(found);
216
+ }
217
+ }
218
+ }).catch(error => {
219
+ _reactNative.Alert.alert('Error', String(error?.message ?? 'Could not load sections'));
220
+ });
221
+ }, [api, props.sectionId, selectedClass?.value]);
222
+ const runSearch = (0, _react.useCallback)(async () => {
223
+ if (!selectedClass?.value) {
224
+ _reactNative.Alert.alert('Error', 'Please choose class');
225
+ return;
226
+ }
227
+ if (!selectedSection?.value) {
228
+ _reactNative.Alert.alert('Error', 'Please choose section');
229
+ return;
230
+ }
231
+ if (!sessionId) {
232
+ _reactNative.Alert.alert('Error', 'Pass sessionId to AttendanceScreen');
233
+ return;
234
+ }
235
+ setSearched(true);
236
+ setSearching(true);
237
+ try {
238
+ const res = await (0, _attendanceService.fetchAttendanceStudents)(api, {
239
+ classId: selectedClass.value,
240
+ sectionId: selectedSection.value,
241
+ sessionId,
242
+ date
243
+ });
244
+ const payload = normalizeAttendancePayload(res);
245
+ const list = normalizeStudents(payload, mode);
246
+ setAttendanceData(payload);
247
+ setStudents(list);
248
+ setCount(list.length);
249
+ setPresent(presentCountFromPayload(payload, list));
250
+ if (!payload?.student?.length && !payload?.holiday && !payload?.week_off && payload?.sunday !== 'yes') {
251
+ _reactNative.Alert.alert('Error', 'No Data Found');
252
+ }
253
+ } catch (error) {
254
+ _reactNative.Alert.alert('Error', String(error?.message ?? 'Could not load attendance'));
255
+ setAttendanceData(null);
256
+ setStudents([]);
257
+ setCount(0);
258
+ setPresent(0);
259
+ } finally {
260
+ setSearching(false);
261
+ }
262
+ }, [api, date, mode, selectedClass?.value, selectedSection?.value, sessionId]);
263
+ (0, _react.useEffect)(() => {
264
+ if (!searched || !attendanceData) {
265
+ return;
266
+ }
267
+ const list = normalizeStudents(attendanceData, mode);
268
+ setStudents(list);
269
+ setCount(list.length);
270
+ setPresent(presentCountFromPayload(attendanceData, list));
271
+ }, [attendanceData, mode, searched]);
272
+ const onToggleStudent = (0, _react.useCallback)((studentId, item) => {
273
+ if (mode !== 'take') {
274
+ return;
275
+ }
276
+ setStudents(prev => {
277
+ const next = prev.map(student => {
278
+ if (String(student?.id) !== String(studentId)) {
279
+ return student;
280
+ }
281
+ const current = String(item?.attendence_type_id ?? '');
282
+ return {
283
+ ...student,
284
+ attendence_type_id: current === '1' ? '4' : '1'
285
+ };
286
+ });
287
+ setPresent(next.filter(student => String(student?.attendence_type_id ?? '') === '1').length);
288
+ return next;
289
+ });
290
+ }, [mode]);
291
+ const submitCurrentAttendance = (0, _react.useCallback)(async () => {
292
+ if (!selectedClass?.value || !selectedSection?.value) {
293
+ _reactNative.Alert.alert('Error', 'Please choose class and section');
294
+ return;
295
+ }
296
+ if (!students.length) {
297
+ _reactNative.Alert.alert('Error', 'No students found');
298
+ return;
299
+ }
300
+ const payload = {
301
+ attendanceData: students,
302
+ attendanceDate: date,
303
+ class_id: selectedClass.value,
304
+ section_id: selectedSection.value
305
+ };
306
+ setSubmitting(true);
307
+ try {
308
+ const res = await (0, _attendanceService.submitAttendance)(api, payload);
309
+ const response = res;
310
+ if (response?.Status && response.Status !== 'Success') {
311
+ _reactNative.Alert.alert('Failed', String(response?.Message ?? response?.Status ?? 'Request failed'));
312
+ return;
313
+ }
314
+ _reactNative.Alert.alert('Success', 'Attendance given successfully');
315
+ try {
316
+ await (0, _attendanceService.notifyAttendance)(api, payload);
317
+ } catch {}
318
+ await runSearch();
319
+ } catch (error) {
320
+ _reactNative.Alert.alert('Failed', String(error?.message ?? 'Could not submit attendance'));
321
+ } finally {
322
+ setSubmitting(false);
323
+ }
324
+ }, [api, date, runSearch, selectedClass?.value, selectedSection?.value, students]);
325
+ const renderStudent = ({
326
+ item
327
+ }) => {
328
+ const isPresent = String(item?.attendence_type_id ?? '') === '1';
329
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
330
+ style: styles.studentItem,
331
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
332
+ style: styles.rollCol,
333
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
334
+ style: styles.studentText,
335
+ children: String(item?.roll_no ?? '-')
336
+ })
337
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
338
+ style: mode === 'take' ? styles.nameColTake : styles.nameColView,
339
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
340
+ style: styles.studentText,
341
+ children: String(item?.full_name ?? 'Student')
342
+ })
343
+ }), mode === 'take' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
344
+ style: styles.statusColTake,
345
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Switch, {
346
+ value: isPresent,
347
+ onValueChange: () => onToggleStudent(String(item?.id ?? ''), item),
348
+ trackColor: {
349
+ false: '#EF4444',
350
+ true: '#22C55E'
351
+ },
352
+ thumbColor: "#FFFFFF"
353
+ })
354
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
355
+ style: styles.statusColView,
356
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
357
+ style: [styles.statusBadge, isPresent ? styles.badgePresent : styles.badgeAbsent],
358
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
359
+ style: styles.statusBadgeText,
360
+ children: isPresent ? 'Present' : 'Absent'
361
+ })
362
+ })
363
+ })]
364
+ });
365
+ };
366
+ const isHoliday = !!attendanceData?.holiday;
367
+ const isWeeklyOff = !!attendanceData?.week_off || attendanceData?.sunday === 'yes';
368
+ const emptyMessage = attendanceData?.sunday === 'yes' ? 'Today is Sunday' : 'Weekly off';
369
+ if (loadingFilters) {
370
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_LoadingState.LoadingState, {});
371
+ }
372
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.SafeAreaView, {
373
+ style: styles.root,
374
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
375
+ style: styles.header,
376
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
377
+ style: styles.headerTitle,
378
+ children: "Attendance"
379
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
380
+ style: styles.modeRow,
381
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
382
+ onPress: () => setMode('take'),
383
+ style: [styles.modeBtn, mode === 'take' ? styles.modeBtnActive : null],
384
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
385
+ style: [styles.modeBtnText, mode === 'take' ? styles.modeBtnTextActive : null],
386
+ children: "Take"
387
+ })
388
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
389
+ onPress: () => setMode('view'),
390
+ style: [styles.modeBtn, mode === 'view' ? styles.modeBtnActive : null],
391
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
392
+ style: [styles.modeBtnText, mode === 'view' ? styles.modeBtnTextActive : null],
393
+ children: "View"
394
+ })
395
+ })]
396
+ })]
397
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.FlatList, {
398
+ data: !searched || searching || isHoliday || isWeeklyOff ? [] : students,
399
+ keyExtractor: (item, index) => String(item?.id ?? index),
400
+ renderItem: renderStudent,
401
+ contentContainerStyle: styles.content,
402
+ ListHeaderComponent: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
403
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
404
+ style: styles.card,
405
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
406
+ style: styles.cardTitle,
407
+ children: mode === 'take' ? 'Attendance Details' : 'Filter Criteria'
408
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
409
+ style: styles.filterRow,
410
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
411
+ style: styles.filterCol,
412
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(SelectModal, {
413
+ label: "Class",
414
+ value: selectedClass,
415
+ options: classes,
416
+ placeholder: "Select class",
417
+ onChange: next => {
418
+ setSelectedClass(next);
419
+ setSelectedSection(null);
420
+ setAttendanceData(null);
421
+ setStudents([]);
422
+ setCount(0);
423
+ setPresent(0);
424
+ setSearched(false);
425
+ }
426
+ })
427
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
428
+ style: styles.filterCol,
429
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(SelectModal, {
430
+ label: "Section",
431
+ value: selectedSection,
432
+ options: sections,
433
+ placeholder: "Select section",
434
+ onChange: next => {
435
+ setSelectedSection(next);
436
+ setAttendanceData(null);
437
+ setStudents([]);
438
+ setCount(0);
439
+ setPresent(0);
440
+ setSearched(false);
441
+ }
442
+ })
443
+ })]
444
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
445
+ style: styles.field,
446
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
447
+ style: styles.label,
448
+ children: "Date"
449
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
450
+ style: styles.dateBtn,
451
+ onPress: () => setCalendarOpen(true),
452
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
453
+ style: styles.dateBtnText,
454
+ children: formatDisplayDate(date)
455
+ })
456
+ })]
457
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
458
+ onPress: () => runSearch().catch(() => {}),
459
+ style: styles.searchBtn,
460
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
461
+ style: styles.searchBtnText,
462
+ children: "Search"
463
+ })
464
+ }), sessionId === undefined ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
465
+ style: styles.helperText,
466
+ children: "Pass sessionId to AttendanceScreen"
467
+ }) : null]
468
+ }), searching ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
469
+ style: styles.loader,
470
+ size: "large",
471
+ color: "#111827"
472
+ }) : null, searched && !searching && isHoliday ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
473
+ style: styles.messageText,
474
+ children: "Today is Holiday"
475
+ }) : null, searched && !searching && !isHoliday && isWeeklyOff ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
476
+ style: styles.messageText,
477
+ children: emptyMessage
478
+ }) : null, searched && !searching && !isHoliday && !isWeeklyOff && students.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
479
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
480
+ style: styles.summaryRow,
481
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
482
+ style: styles.summaryCard,
483
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
484
+ style: styles.summaryLabel,
485
+ children: "Total Present"
486
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
487
+ style: [styles.summaryValue, styles.presentText],
488
+ children: present
489
+ })]
490
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
491
+ style: styles.summaryCard,
492
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
493
+ style: styles.summaryLabel,
494
+ children: "Total Absent"
495
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
496
+ style: [styles.summaryValue, styles.absentText],
497
+ children: Math.max(count - present, 0)
498
+ })]
499
+ })]
500
+ }), mode === 'take' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
501
+ style: [styles.submitBtn, submitting ? styles.submitBtnDisabled : null],
502
+ onPress: () => submitCurrentAttendance().catch(() => {}),
503
+ disabled: submitting,
504
+ children: submitting ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
505
+ color: "#FFFFFF"
506
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
507
+ style: styles.submitBtnText,
508
+ children: "Submit"
509
+ })
510
+ }) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
511
+ style: styles.listHeader,
512
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
513
+ style: [styles.listHeaderText, styles.rollCol],
514
+ children: "Roll No"
515
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
516
+ style: [styles.listHeaderText, mode === 'take' ? styles.nameColTake : styles.nameColView],
517
+ children: "Student Name"
518
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
519
+ style: [styles.listHeaderText, mode === 'take' ? styles.statusColTake : styles.statusColView, styles.listHeaderRight],
520
+ children: "Status"
521
+ })]
522
+ })]
523
+ }) : null]
524
+ }),
525
+ ListEmptyComponent: searched && !searching && !isHoliday && !isWeeklyOff && students.length === 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
526
+ style: styles.messageText,
527
+ children: "No Data Found"
528
+ }) : null
529
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Modal, {
530
+ visible: calendarOpen,
531
+ transparent: true,
532
+ animationType: "fade",
533
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
534
+ style: styles.modalOverlay,
535
+ onPress: () => setCalendarOpen(false),
536
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
537
+ style: styles.modalCard,
538
+ onPress: () => {},
539
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
540
+ style: styles.calendarHeader,
541
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
542
+ style: styles.modalTitle,
543
+ children: "Select Date"
544
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
545
+ onPress: () => setCalendarOpen(false),
546
+ style: styles.closeBtn,
547
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
548
+ style: styles.closeBtnText,
549
+ children: "Close"
550
+ })
551
+ })]
552
+ }), Calendar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Calendar, {
553
+ maxDate: todayYmd(),
554
+ onDayPress: day => {
555
+ const next = String(day?.dateString ?? '');
556
+ if (!next) {
557
+ return;
558
+ }
559
+ setDate(next);
560
+ setCalendarOpen(false);
561
+ },
562
+ markedDates: {
563
+ [date]: {
564
+ selected: true,
565
+ selectedColor: '#111827'
566
+ }
567
+ }
568
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_EmptyState.EmptyState, {
569
+ title: "Calendar missing",
570
+ message: "Install react-native-calendars to enable date picker"
571
+ })]
572
+ })
573
+ })
574
+ })]
575
+ });
576
+ }
577
+ const styles = _reactNative.StyleSheet.create({
578
+ root: {
579
+ flex: 1,
580
+ backgroundColor: '#FFFFFF'
581
+ },
582
+ header: {
583
+ paddingHorizontal: 16,
584
+ paddingVertical: 12,
585
+ borderBottomWidth: 1,
586
+ borderBottomColor: '#E5E7EB',
587
+ flexDirection: 'row',
588
+ alignItems: 'center',
589
+ justifyContent: 'space-between',
590
+ gap: 12
591
+ },
592
+ headerTitle: {
593
+ fontSize: 18,
594
+ fontWeight: '700',
595
+ color: '#111827'
596
+ },
597
+ modeRow: {
598
+ flexDirection: 'row',
599
+ gap: 8
600
+ },
601
+ modeBtn: {
602
+ paddingHorizontal: 12,
603
+ paddingVertical: 8,
604
+ borderRadius: 999,
605
+ borderWidth: 1,
606
+ borderColor: '#D1D5DB',
607
+ backgroundColor: '#FFFFFF'
608
+ },
609
+ modeBtnActive: {
610
+ backgroundColor: '#111827',
611
+ borderColor: '#111827'
612
+ },
613
+ modeBtnText: {
614
+ fontSize: 12,
615
+ fontWeight: '700',
616
+ color: '#111827'
617
+ },
618
+ modeBtnTextActive: {
619
+ color: '#FFFFFF'
620
+ },
621
+ content: {
622
+ padding: 16,
623
+ gap: 12
624
+ },
625
+ card: {
626
+ borderWidth: 1,
627
+ borderColor: '#E5E7EB',
628
+ borderRadius: 16,
629
+ padding: 14,
630
+ backgroundColor: '#FFFFFF'
631
+ },
632
+ cardTitle: {
633
+ fontSize: 16,
634
+ fontWeight: '700',
635
+ color: '#111827',
636
+ marginBottom: 12
637
+ },
638
+ filterRow: {
639
+ flexDirection: 'row',
640
+ gap: 10
641
+ },
642
+ filterCol: {
643
+ flex: 1
644
+ },
645
+ field: {
646
+ marginTop: 10,
647
+ gap: 6
648
+ },
649
+ label: {
650
+ fontSize: 12,
651
+ fontWeight: '600',
652
+ color: '#6B7280'
653
+ },
654
+ select: {
655
+ borderWidth: 1,
656
+ borderColor: '#E5E7EB',
657
+ borderRadius: 12,
658
+ paddingHorizontal: 12,
659
+ paddingVertical: 12,
660
+ backgroundColor: '#FFFFFF'
661
+ },
662
+ selectText: {
663
+ fontSize: 14,
664
+ color: '#111827'
665
+ },
666
+ dateBtn: {
667
+ borderWidth: 1,
668
+ borderColor: '#E5E7EB',
669
+ borderRadius: 12,
670
+ paddingHorizontal: 12,
671
+ paddingVertical: 12,
672
+ backgroundColor: '#F9FAFB'
673
+ },
674
+ dateBtnText: {
675
+ fontSize: 14,
676
+ color: '#111827'
677
+ },
678
+ searchBtn: {
679
+ marginTop: 14,
680
+ paddingVertical: 12,
681
+ borderRadius: 12,
682
+ backgroundColor: '#111827',
683
+ alignItems: 'center',
684
+ justifyContent: 'center'
685
+ },
686
+ searchBtnText: {
687
+ fontSize: 14,
688
+ fontWeight: '700',
689
+ color: '#FFFFFF'
690
+ },
691
+ helperText: {
692
+ marginTop: 8,
693
+ fontSize: 12,
694
+ color: '#6B7280'
695
+ },
696
+ loader: {
697
+ marginVertical: 24
698
+ },
699
+ summaryRow: {
700
+ flexDirection: 'row',
701
+ gap: 12,
702
+ marginTop: 16
703
+ },
704
+ summaryCard: {
705
+ flex: 1,
706
+ borderWidth: 1,
707
+ borderColor: '#E5E7EB',
708
+ borderRadius: 14,
709
+ padding: 14,
710
+ backgroundColor: '#F9FAFB'
711
+ },
712
+ summaryLabel: {
713
+ fontSize: 12,
714
+ color: '#6B7280'
715
+ },
716
+ summaryValue: {
717
+ marginTop: 8,
718
+ fontSize: 22,
719
+ fontWeight: '800'
720
+ },
721
+ presentText: {
722
+ color: '#16A34A'
723
+ },
724
+ absentText: {
725
+ color: '#DC2626'
726
+ },
727
+ submitBtn: {
728
+ marginTop: 14,
729
+ paddingVertical: 13,
730
+ borderRadius: 12,
731
+ backgroundColor: '#2563EB',
732
+ alignItems: 'center',
733
+ justifyContent: 'center'
734
+ },
735
+ submitBtnDisabled: {
736
+ opacity: 0.7
737
+ },
738
+ submitBtnText: {
739
+ fontSize: 15,
740
+ fontWeight: '800',
741
+ color: '#FFFFFF'
742
+ },
743
+ listHeader: {
744
+ marginTop: 16,
745
+ paddingHorizontal: 10,
746
+ paddingVertical: 10,
747
+ borderRadius: 12,
748
+ backgroundColor: '#111827',
749
+ flexDirection: 'row',
750
+ alignItems: 'center'
751
+ },
752
+ listHeaderText: {
753
+ fontSize: 12,
754
+ fontWeight: '700',
755
+ color: '#FFFFFF'
756
+ },
757
+ listHeaderRight: {
758
+ textAlign: 'right'
759
+ },
760
+ studentItem: {
761
+ marginTop: 10,
762
+ borderWidth: 1,
763
+ borderColor: '#E5E7EB',
764
+ borderRadius: 12,
765
+ paddingHorizontal: 10,
766
+ paddingVertical: 12,
767
+ backgroundColor: '#FFFFFF',
768
+ flexDirection: 'row',
769
+ alignItems: 'center'
770
+ },
771
+ rollCol: {
772
+ width: '20%'
773
+ },
774
+ nameColTake: {
775
+ width: '60%'
776
+ },
777
+ statusColTake: {
778
+ width: '20%',
779
+ alignItems: 'flex-end'
780
+ },
781
+ nameColView: {
782
+ width: '50%'
783
+ },
784
+ statusColView: {
785
+ width: '30%',
786
+ alignItems: 'flex-end'
787
+ },
788
+ studentText: {
789
+ fontSize: 13,
790
+ color: '#111827'
791
+ },
792
+ statusBadge: {
793
+ minWidth: 82,
794
+ paddingHorizontal: 10,
795
+ paddingVertical: 7,
796
+ borderRadius: 999,
797
+ alignItems: 'center'
798
+ },
799
+ badgePresent: {
800
+ backgroundColor: '#DCFCE7'
801
+ },
802
+ badgeAbsent: {
803
+ backgroundColor: '#FEE2E2'
804
+ },
805
+ statusBadgeText: {
806
+ fontSize: 12,
807
+ fontWeight: '700',
808
+ color: '#111827'
809
+ },
810
+ messageText: {
811
+ marginTop: 16,
812
+ textAlign: 'center',
813
+ color: '#6B7280',
814
+ fontSize: 14
815
+ },
816
+ modalOverlay: {
817
+ flex: 1,
818
+ backgroundColor: 'rgba(0,0,0,0.45)',
819
+ justifyContent: 'center',
820
+ padding: 16
821
+ },
822
+ modalCard: {
823
+ backgroundColor: '#FFFFFF',
824
+ borderRadius: 16,
825
+ overflow: 'hidden',
826
+ maxHeight: '80%'
827
+ },
828
+ modalTitle: {
829
+ fontSize: 16,
830
+ fontWeight: '700',
831
+ color: '#111827'
832
+ },
833
+ calendarHeader: {
834
+ paddingHorizontal: 16,
835
+ paddingVertical: 12,
836
+ borderBottomWidth: 1,
837
+ borderBottomColor: '#E5E7EB',
838
+ flexDirection: 'row',
839
+ alignItems: 'center',
840
+ justifyContent: 'space-between'
841
+ },
842
+ closeBtn: {
843
+ paddingHorizontal: 10,
844
+ paddingVertical: 6,
845
+ borderRadius: 10,
846
+ backgroundColor: '#F3F4F6'
847
+ },
848
+ closeBtnText: {
849
+ fontSize: 12,
850
+ fontWeight: '700',
851
+ color: '#111827'
852
+ },
853
+ optionRow: {
854
+ paddingHorizontal: 16,
855
+ paddingVertical: 12
856
+ },
857
+ optionText: {
858
+ fontSize: 14,
859
+ color: '#111827'
860
+ },
861
+ optionEmpty: {
862
+ paddingHorizontal: 16,
863
+ paddingVertical: 12,
864
+ color: '#6B7280'
865
+ }
866
+ });