@controleonline/ui-customers 1.0.81
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.
- package/.github/agents/developer.agent.md +30 -0
- package/.github/agents/devops.agent.md +30 -0
- package/.github/agents/qa.agent.md +30 -0
- package/.github/agents/security.agent.md +30 -0
- package/.scrutinizer.yml +20 -0
- package/AGENTS.md +50 -0
- package/FUNDING.yml +1 -0
- package/README.md +23 -0
- package/docs/technical/Client-Details-Franquia-Filial.md +18 -0
- package/docs/technical/Client-Details-People-Name-Case.md +103 -0
- package/docs/technical/Cliente-Vendedor-Vinculo-e-Permissoes.md +152 -0
- package/docs/wiki.md +1 -0
- package/package.json +32 -0
- package/scripts/validate-wiki-pointer.cjs +13 -0
- package/src/react/components/tabs/AddressesTab.js +494 -0
- package/src/react/components/tabs/CategoriesTab.js +196 -0
- package/src/react/components/tabs/ClassificationChips.js +494 -0
- package/src/react/components/tabs/ContactTab.js +621 -0
- package/src/react/components/tabs/ContactTab.styles.js +119 -0
- package/src/react/components/tabs/ContractsTab.js +13 -0
- package/src/react/components/tabs/DocumentsTab.js +463 -0
- package/src/react/components/tabs/DocumentsTab.styles.js +133 -0
- package/src/react/components/tabs/EmployeeContactRow.js +83 -0
- package/src/react/components/tabs/EmployeesTab.js +454 -0
- package/src/react/components/tabs/EmployeesTab.styles.js +172 -0
- package/src/react/components/tabs/FiscalTab.js +6 -0
- package/src/react/components/tabs/FranchiseCommissionSection.js +307 -0
- package/src/react/components/tabs/FranchiseLinksManageModal.js +215 -0
- package/src/react/components/tabs/FranchiseLinksTab.js +282 -0
- package/src/react/components/tabs/GeneralTab.js +466 -0
- package/src/react/components/tabs/GeneralTab.styles.js +101 -0
- package/src/react/components/tabs/MediaTab.js +356 -0
- package/src/react/components/tabs/PeopleCategoriesPanel.js +601 -0
- package/src/react/components/tabs/ProductsTab.js +236 -0
- package/src/react/components/tabs/ProductsTab.styles.js +143 -0
- package/src/react/components/tabs/SalesmanCommissionBlock.js +120 -0
- package/src/react/components/tabs/SalesmanManageModal.js +208 -0
- package/src/react/components/tabs/SalesmanTab.js +436 -0
- package/src/react/components/tabs/SalesmanTab.styles.js +4 -0
- package/src/react/components/tabs/UserApiKeyModal.js +90 -0
- package/src/react/components/tabs/UserFormModal.js +301 -0
- package/src/react/components/tabs/UsersTab.js +426 -0
- package/src/react/components/tabs/UsersTab.styles.js +283 -0
- package/src/react/components/tabs/UsersTab.styles.test.js +42 -0
- package/src/react/components/tabs/contactMutationMessage.js +18 -0
- package/src/react/components/tabs/employeeContacts.js +214 -0
- package/src/react/components/tabs/employeeUnlink.js +68 -0
- package/src/react/components/tabs/employeesTabHelpers.js +227 -0
- package/src/react/components/tabs/franchiseCommissionHelpers.js +134 -0
- package/src/react/components/tabs/franchiseLinksTab.helpers.js +247 -0
- package/src/react/components/tabs/generalTabHelpers.js +120 -0
- package/src/react/components/tabs/salesmanTab.helpers.js +114 -0
- package/src/react/components/tabs/salesmanTabHelpers.js +173 -0
- package/src/react/components/tabs/salesmanTabMedia.js +55 -0
- package/src/react/components/tabs/salesmanTabSession.js +39 -0
- package/src/react/components/tabs/useEmployeeUnlink.js +58 -0
- package/src/react/components/tabs/useFranchiseLinksManage.js +215 -0
- package/src/react/components/tabs/useSalesmanManage.js +222 -0
- package/src/react/components/tabs/usersTabHelpers.js +221 -0
- package/src/react/domain/productSupplierFlow.js +37 -0
- package/src/react/index.js +4 -0
- package/src/react/pages/ClientDetailsSkeleton.js +84 -0
- package/src/react/pages/clientDetailsHelpers.js +17 -0
- package/src/react/pages/clients.js +27 -0
- package/src/react/pages/details.js +529 -0
- package/src/react/pages/details.page.styles.js +105 -0
- package/src/react/pages/details.styles.js +15 -0
- package/src/react/pages/employees.js +69 -0
- package/src/react/pages/franchisees.js +30 -0
- package/src/react/pages/prospects.js +21 -0
- package/src/react/pages/provider.js +21 -0
- package/src/react/router/routes.js +104 -0
- package/src/react/styles/details.js +571 -0
- package/src/store/people_categories/index.js +72 -0
- package/src/tests/browser/manager/client-details-create-user.spec.js +321 -0
- package/src/tests/browser/manager/client-details-employee-unlink.spec.js +215 -0
- package/src/tests/browser/manager/client-details-employees-refresh.spec.js +271 -0
- package/src/tests/browser/manager/client-details-enable.spec.js +241 -0
- package/src/tests/browser/manager/client-details-fiscal-tabs.spec.js +410 -0
- package/src/tests/browser/manager/client-details-franchise-commission.spec.js +318 -0
- package/src/tests/browser/manager/client-details-franchise-links.spec.js +365 -0
- package/src/tests/browser/manager/client-details-media.spec.js +405 -0
- package/src/tests/browser/manager/client-details-relationships.spec.js +313 -0
- package/src/tests/browser/manager/client-details-salesman-commission.spec.js +291 -0
- package/src/tests/browser/manager/client-details-salesman-manage.spec.js +448 -0
- package/src/tests/react/components/tabs/contactMutationMessage.test.js +25 -0
- package/src/tests/react/components/tabs/employeeContacts.test.js +266 -0
- package/src/tests/react/components/tabs/employeeUnlink.test.js +67 -0
- package/src/tests/react/components/tabs/employeesTabHelpers.media.test.js +78 -0
- package/src/tests/react/components/tabs/employeesTabHelpers.test.js +64 -0
- package/src/tests/react/components/tabs/fiscalTabContract.test.mjs +29 -0
- package/src/tests/react/components/tabs/franchiseCommissionHelpers.test.js +128 -0
- package/src/tests/react/components/tabs/franchiseLinksTab.helpers.test.mjs +166 -0
- package/src/tests/react/components/tabs/generalTabHelpers.test.js +130 -0
- package/src/tests/react/components/tabs/peopleMediaTabs.test.js +322 -0
- package/src/tests/react/components/tabs/salesmanTab.helpers.test.mjs +75 -0
- package/src/tests/react/components/tabs/salesmanTabHelpers.test.js +142 -0
- package/src/tests/react/components/tabs/salesmanTabHelpers.test.mjs +92 -0
- package/src/tests/react/components/tabs/usersTabHelpers.test.js +59 -0
- package/src/tests/react/domain/productSupplierFlow.test.mjs +55 -0
- package/src/tests/react/pages/clientDetailsHelpers.test.js +98 -0
- package/src/tests/react/pages/employees.test.js +44 -0
|
@@ -0,0 +1,571 @@
|
|
|
1
|
+
import {StyleSheet, Dimensions} from 'react-native';
|
|
2
|
+
|
|
3
|
+
const {width} = Dimensions.get('window');
|
|
4
|
+
|
|
5
|
+
const resolvePalette = themeColors => ({
|
|
6
|
+
headerBackground: themeColors.headerBackground,
|
|
7
|
+
headerBorder: themeColors.headerBorder,
|
|
8
|
+
headerText: themeColors.headerText,
|
|
9
|
+
cardBackground: themeColors.cardBackground,
|
|
10
|
+
cardBorder: themeColors.cardBorder,
|
|
11
|
+
cardText: themeColors.cardText,
|
|
12
|
+
cardIcon: themeColors.cardIcon,
|
|
13
|
+
cardShadow: themeColors.cardShadow,
|
|
14
|
+
listItemBackground: themeColors.listItemBackground,
|
|
15
|
+
listItemText: themeColors.listItemText,
|
|
16
|
+
listItemSubtitleText: themeColors.listItemSubtitleText,
|
|
17
|
+
loadingSpinner: themeColors.loadingSpinner,
|
|
18
|
+
buttonBackground: themeColors.buttonBackground,
|
|
19
|
+
buttonBorder: themeColors.buttonBorder,
|
|
20
|
+
buttonIcon: themeColors.buttonIcon,
|
|
21
|
+
buttonText: themeColors.buttonText,
|
|
22
|
+
buttonShadow: themeColors.buttonShadow,
|
|
23
|
+
buttonBackgroundSecondary: themeColors.buttonBackgroundSecondary,
|
|
24
|
+
buttonBorderSecondary: themeColors.buttonBorderSecondary,
|
|
25
|
+
buttonIconSecondary: themeColors.buttonIconSecondary,
|
|
26
|
+
buttonTextSecondary: themeColors.buttonTextSecondary,
|
|
27
|
+
buttonDisabledBackground: themeColors.buttonDisabledBackground,
|
|
28
|
+
tabBarBackground: themeColors.tabBarBackground,
|
|
29
|
+
tabBarBorder: themeColors.tabBarBorder,
|
|
30
|
+
menuSelectedBorder: themeColors.menuSelectedBorder,
|
|
31
|
+
menuSelectedText: themeColors.menuSelectedText,
|
|
32
|
+
pageBackground: themeColors.pageBackground,
|
|
33
|
+
modalOverlay: themeColors.modalOverlay,
|
|
34
|
+
modalBackground: themeColors.modalBackground,
|
|
35
|
+
modalText: themeColors.modalText,
|
|
36
|
+
modalShadow: themeColors.modalShadow,
|
|
37
|
+
inputBackground: themeColors.inputBackground,
|
|
38
|
+
inputBorder: themeColors.inputBorder,
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
export const createDetailsStyles = themeColors => {
|
|
42
|
+
const palette = resolvePalette(themeColors);
|
|
43
|
+
|
|
44
|
+
return StyleSheet.create({
|
|
45
|
+
// Header
|
|
46
|
+
headerContainer: {
|
|
47
|
+
flexDirection: 'row',
|
|
48
|
+
alignItems: 'center',
|
|
49
|
+
paddingHorizontal: 20,
|
|
50
|
+
paddingVertical: 16,
|
|
51
|
+
backgroundColor: palette.headerBackground,
|
|
52
|
+
borderBottomWidth: 1,
|
|
53
|
+
borderBottomColor: palette.headerBorder,
|
|
54
|
+
elevation: 2,
|
|
55
|
+
shadowColor: palette.cardShadow,
|
|
56
|
+
shadowOffset: {width: 0, height: 2},
|
|
57
|
+
shadowOpacity: 0.1,
|
|
58
|
+
shadowRadius: 4,
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
avatar: {
|
|
62
|
+
width: 60,
|
|
63
|
+
height: 60,
|
|
64
|
+
borderRadius: 30,
|
|
65
|
+
backgroundColor: palette.listItemBackground,
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
clientInfo: {
|
|
69
|
+
flex: 1,
|
|
70
|
+
marginLeft: 16,
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
clientName: {
|
|
74
|
+
fontSize: 20,
|
|
75
|
+
fontWeight: '700',
|
|
76
|
+
color: palette.headerText,
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
clientId: {
|
|
80
|
+
color: palette.listItemSubtitleText,
|
|
81
|
+
fontSize: 14,
|
|
82
|
+
marginTop: 4,
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
// Botões de ação
|
|
86
|
+
actionContainer: {
|
|
87
|
+
paddingHorizontal: 20,
|
|
88
|
+
paddingVertical: 16,
|
|
89
|
+
backgroundColor: palette.headerBackground,
|
|
90
|
+
borderBottomWidth: 1,
|
|
91
|
+
borderBottomColor: palette.headerBorder,
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
editButton: {
|
|
95
|
+
flexDirection: 'row',
|
|
96
|
+
alignItems: 'center',
|
|
97
|
+
justifyContent: 'center',
|
|
98
|
+
backgroundColor: palette.buttonBackground,
|
|
99
|
+
paddingVertical: 14,
|
|
100
|
+
paddingHorizontal: 24,
|
|
101
|
+
borderRadius: 12,
|
|
102
|
+
gap: 8,
|
|
103
|
+
elevation: 2,
|
|
104
|
+
shadowColor: palette.buttonShadow,
|
|
105
|
+
shadowOffset: {width: 0, height: 2},
|
|
106
|
+
shadowOpacity: 0.2,
|
|
107
|
+
shadowRadius: 4,
|
|
108
|
+
},
|
|
109
|
+
|
|
110
|
+
editButtonText: {
|
|
111
|
+
color: palette.buttonText,
|
|
112
|
+
fontSize: 16,
|
|
113
|
+
fontWeight: '600',
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
editActions: {
|
|
117
|
+
flexDirection: 'row',
|
|
118
|
+
gap: 6,
|
|
119
|
+
},
|
|
120
|
+
|
|
121
|
+
iconButtonPrimary: {
|
|
122
|
+
width: 34,
|
|
123
|
+
height: 34,
|
|
124
|
+
borderRadius: 8,
|
|
125
|
+
borderWidth: 1,
|
|
126
|
+
backgroundColor: palette.buttonBackground,
|
|
127
|
+
borderColor: palette.buttonBackground,
|
|
128
|
+
alignItems: 'center',
|
|
129
|
+
justifyContent: 'center',
|
|
130
|
+
},
|
|
131
|
+
|
|
132
|
+
iconButtonPrimaryIcon: {
|
|
133
|
+
color: palette.buttonIcon,
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
iconButtonLocation: {
|
|
137
|
+
width: 32,
|
|
138
|
+
height: 32,
|
|
139
|
+
borderRadius: 16,
|
|
140
|
+
backgroundColor: palette.buttonBackground,
|
|
141
|
+
borderWidth: 2,
|
|
142
|
+
borderColor: palette.buttonBorder,
|
|
143
|
+
alignItems: 'center',
|
|
144
|
+
justifyContent: 'center',
|
|
145
|
+
},
|
|
146
|
+
|
|
147
|
+
iconButtonGhost: {
|
|
148
|
+
width: 34,
|
|
149
|
+
height: 34,
|
|
150
|
+
borderRadius: 8,
|
|
151
|
+
borderWidth: 1,
|
|
152
|
+
backgroundColor: palette.buttonBackground,
|
|
153
|
+
borderColor: palette.buttonBackground,
|
|
154
|
+
alignItems: 'center',
|
|
155
|
+
justifyContent: 'center',
|
|
156
|
+
},
|
|
157
|
+
|
|
158
|
+
iconButtonGhostIcon: {
|
|
159
|
+
color: palette.buttonIcon,
|
|
160
|
+
},
|
|
161
|
+
|
|
162
|
+
cardItemIcon: {
|
|
163
|
+
color: palette.cardIcon,
|
|
164
|
+
},
|
|
165
|
+
|
|
166
|
+
cancelButton: {
|
|
167
|
+
flex: 1,
|
|
168
|
+
flexDirection: 'row',
|
|
169
|
+
alignItems: 'center',
|
|
170
|
+
justifyContent: 'center',
|
|
171
|
+
backgroundColor: palette.buttonBackgroundSecondary,
|
|
172
|
+
borderWidth: 1,
|
|
173
|
+
borderColor: palette.buttonBorderSecondary,
|
|
174
|
+
paddingVertical: 14,
|
|
175
|
+
paddingHorizontal: 16,
|
|
176
|
+
borderRadius: 12,
|
|
177
|
+
gap: 8,
|
|
178
|
+
},
|
|
179
|
+
|
|
180
|
+
cancelButtonText: {
|
|
181
|
+
color: palette.buttonTextSecondary,
|
|
182
|
+
fontSize: 16,
|
|
183
|
+
fontWeight: '500',
|
|
184
|
+
},
|
|
185
|
+
|
|
186
|
+
saveButton: {
|
|
187
|
+
flex: 1,
|
|
188
|
+
flexDirection: 'row',
|
|
189
|
+
alignItems: 'center',
|
|
190
|
+
justifyContent: 'center',
|
|
191
|
+
backgroundColor: palette.buttonBackground,
|
|
192
|
+
paddingVertical: 14,
|
|
193
|
+
paddingHorizontal: 16,
|
|
194
|
+
borderRadius: 12,
|
|
195
|
+
gap: 8,
|
|
196
|
+
elevation: 2,
|
|
197
|
+
shadowColor: palette.buttonShadow,
|
|
198
|
+
shadowOffset: {width: 0, height: 2},
|
|
199
|
+
shadowOpacity: 0.2,
|
|
200
|
+
shadowRadius: 4,
|
|
201
|
+
},
|
|
202
|
+
|
|
203
|
+
saveButtonDisabled: {
|
|
204
|
+
backgroundColor: palette.buttonDisabledBackground,
|
|
205
|
+
opacity: 0.6,
|
|
206
|
+
elevation: 0,
|
|
207
|
+
shadowOpacity: 0,
|
|
208
|
+
},
|
|
209
|
+
|
|
210
|
+
saveButtonText: {
|
|
211
|
+
color: palette.buttonText,
|
|
212
|
+
fontSize: 16,
|
|
213
|
+
fontWeight: '600',
|
|
214
|
+
},
|
|
215
|
+
|
|
216
|
+
// Tab Bar
|
|
217
|
+
tabBar: {
|
|
218
|
+
flexDirection: 'row',
|
|
219
|
+
backgroundColor: palette.tabBarBackground,
|
|
220
|
+
borderBottomWidth: 1,
|
|
221
|
+
borderBottomColor: palette.tabBarBorder,
|
|
222
|
+
paddingHorizontal: 4,
|
|
223
|
+
},
|
|
224
|
+
|
|
225
|
+
tabItem: {
|
|
226
|
+
flex: 1,
|
|
227
|
+
flexDirection: 'column',
|
|
228
|
+
alignItems: 'center',
|
|
229
|
+
paddingVertical: 12,
|
|
230
|
+
paddingHorizontal: 8,
|
|
231
|
+
borderBottomWidth: 2,
|
|
232
|
+
borderBottomColor: 'transparent',
|
|
233
|
+
},
|
|
234
|
+
|
|
235
|
+
tabItemActive: {
|
|
236
|
+
borderBottomColor: palette.menuSelectedBorder,
|
|
237
|
+
},
|
|
238
|
+
|
|
239
|
+
tabLabel: {
|
|
240
|
+
fontSize: 12,
|
|
241
|
+
color: palette.buttonTextSecondary,
|
|
242
|
+
marginTop: 4,
|
|
243
|
+
textAlign: 'center',
|
|
244
|
+
},
|
|
245
|
+
|
|
246
|
+
tabLabelActive: {
|
|
247
|
+
color: palette.menuSelectedText,
|
|
248
|
+
fontWeight: '600',
|
|
249
|
+
},
|
|
250
|
+
|
|
251
|
+
// Scroll Container
|
|
252
|
+
scrollContainer: {
|
|
253
|
+
flex: 1,
|
|
254
|
+
backgroundColor: palette.pageBackground,
|
|
255
|
+
},
|
|
256
|
+
|
|
257
|
+
scrollContent: {
|
|
258
|
+
paddingBottom: 20,
|
|
259
|
+
},
|
|
260
|
+
|
|
261
|
+
// Tab Content
|
|
262
|
+
tabContent: {
|
|
263
|
+
width: '100%',
|
|
264
|
+
},
|
|
265
|
+
|
|
266
|
+
// Sections
|
|
267
|
+
section: {
|
|
268
|
+
backgroundColor: palette.cardBackground,
|
|
269
|
+
marginHorizontal: 16,
|
|
270
|
+
marginTop: 16,
|
|
271
|
+
borderRadius: 12,
|
|
272
|
+
padding: 16,
|
|
273
|
+
elevation: 1,
|
|
274
|
+
shadowColor: palette.cardShadow,
|
|
275
|
+
shadowOffset: {width: 0, height: 1},
|
|
276
|
+
shadowOpacity: 0.05,
|
|
277
|
+
shadowRadius: 2,
|
|
278
|
+
},
|
|
279
|
+
|
|
280
|
+
sectionHeader: {
|
|
281
|
+
flexDirection: 'row',
|
|
282
|
+
justifyContent: 'space-between',
|
|
283
|
+
alignItems: 'center',
|
|
284
|
+
marginBottom: 16,
|
|
285
|
+
},
|
|
286
|
+
|
|
287
|
+
sectionTitle: {
|
|
288
|
+
fontSize: 18,
|
|
289
|
+
fontWeight: '700',
|
|
290
|
+
color: palette.cardText,
|
|
291
|
+
},
|
|
292
|
+
|
|
293
|
+
// List Items
|
|
294
|
+
listItem: {
|
|
295
|
+
flexDirection: 'row',
|
|
296
|
+
alignItems: 'center',
|
|
297
|
+
justifyContent: 'space-between',
|
|
298
|
+
paddingVertical: 12,
|
|
299
|
+
paddingHorizontal: 16,
|
|
300
|
+
backgroundColor: palette.listItemBackground,
|
|
301
|
+
borderRadius: 8,
|
|
302
|
+
marginBottom: 8,
|
|
303
|
+
},
|
|
304
|
+
|
|
305
|
+
listItemWithActions: {
|
|
306
|
+
alignItems: 'flex-start',
|
|
307
|
+
paddingRight: 0,
|
|
308
|
+
},
|
|
309
|
+
|
|
310
|
+
listItemWithEndAction: {
|
|
311
|
+
paddingRight: 0,
|
|
312
|
+
},
|
|
313
|
+
|
|
314
|
+
itemContent: {
|
|
315
|
+
flex: 1,
|
|
316
|
+
flexDirection: 'row',
|
|
317
|
+
alignItems: 'center',
|
|
318
|
+
gap: 12,
|
|
319
|
+
minWidth: 0,
|
|
320
|
+
},
|
|
321
|
+
|
|
322
|
+
listAvatar: {
|
|
323
|
+
marginRight: 4,
|
|
324
|
+
},
|
|
325
|
+
|
|
326
|
+
listAvatarBrand: {
|
|
327
|
+
backgroundColor: palette.buttonBackground,
|
|
328
|
+
borderColor: palette.buttonText,
|
|
329
|
+
},
|
|
330
|
+
|
|
331
|
+
listAvatarText: {
|
|
332
|
+
color: palette.buttonText,
|
|
333
|
+
},
|
|
334
|
+
|
|
335
|
+
locationButton: {
|
|
336
|
+
alignSelf: 'flex-start',
|
|
337
|
+
},
|
|
338
|
+
|
|
339
|
+
itemText: {
|
|
340
|
+
fontSize: 16,
|
|
341
|
+
color: palette.listItemText,
|
|
342
|
+
fontWeight: '500',
|
|
343
|
+
flexShrink: 1,
|
|
344
|
+
},
|
|
345
|
+
|
|
346
|
+
itemSubtext: {
|
|
347
|
+
fontSize: 14,
|
|
348
|
+
color: palette.listItemSubtitleText,
|
|
349
|
+
marginTop: 2,
|
|
350
|
+
},
|
|
351
|
+
|
|
352
|
+
itemActions: {
|
|
353
|
+
flexDirection: 'row',
|
|
354
|
+
gap: 6,
|
|
355
|
+
},
|
|
356
|
+
|
|
357
|
+
itemActionsPinned: {
|
|
358
|
+
alignSelf: 'flex-start',
|
|
359
|
+
flexShrink: 0,
|
|
360
|
+
marginLeft: 12,
|
|
361
|
+
},
|
|
362
|
+
|
|
363
|
+
itemChevronIcon: {
|
|
364
|
+
color: palette.listItemSubtitleText,
|
|
365
|
+
},
|
|
366
|
+
|
|
367
|
+
emptyText: {
|
|
368
|
+
color: palette.listItemSubtitleText,
|
|
369
|
+
fontStyle: 'italic',
|
|
370
|
+
textAlign: 'center',
|
|
371
|
+
paddingVertical: 24,
|
|
372
|
+
fontSize: 16,
|
|
373
|
+
},
|
|
374
|
+
|
|
375
|
+
loadingIndicator: {
|
|
376
|
+
color: palette.loadingSpinner,
|
|
377
|
+
},
|
|
378
|
+
|
|
379
|
+
// Modal
|
|
380
|
+
modalOverlay: {
|
|
381
|
+
flex: 1,
|
|
382
|
+
backgroundColor: palette.modalOverlay,
|
|
383
|
+
justifyContent: 'center',
|
|
384
|
+
alignItems: 'center',
|
|
385
|
+
},
|
|
386
|
+
|
|
387
|
+
modalContainer: {
|
|
388
|
+
backgroundColor: palette.modalBackground,
|
|
389
|
+
borderRadius: 16,
|
|
390
|
+
padding: 24,
|
|
391
|
+
width: width - 40,
|
|
392
|
+
maxWidth: 400,
|
|
393
|
+
elevation: 8,
|
|
394
|
+
shadowColor: palette.modalShadow,
|
|
395
|
+
shadowOffset: {width: 0, height: 4},
|
|
396
|
+
shadowOpacity: 0.3,
|
|
397
|
+
shadowRadius: 8,
|
|
398
|
+
},
|
|
399
|
+
|
|
400
|
+
modalTitle: {
|
|
401
|
+
fontSize: 20,
|
|
402
|
+
fontWeight: '700',
|
|
403
|
+
color: palette.modalText,
|
|
404
|
+
marginBottom: 20,
|
|
405
|
+
textAlign: 'center',
|
|
406
|
+
},
|
|
407
|
+
|
|
408
|
+
modalInput: {
|
|
409
|
+
borderWidth: 1,
|
|
410
|
+
borderColor: palette.inputBorder,
|
|
411
|
+
borderRadius: 8,
|
|
412
|
+
paddingHorizontal: 16,
|
|
413
|
+
paddingVertical: 12,
|
|
414
|
+
fontSize: 16,
|
|
415
|
+
marginBottom: 16,
|
|
416
|
+
backgroundColor: palette.inputBackground,
|
|
417
|
+
},
|
|
418
|
+
|
|
419
|
+
label: {
|
|
420
|
+
fontSize: 16,
|
|
421
|
+
fontWeight: '600',
|
|
422
|
+
color: palette.modalText,
|
|
423
|
+
marginBottom: 8,
|
|
424
|
+
},
|
|
425
|
+
|
|
426
|
+
pickerContainer: {
|
|
427
|
+
marginBottom: 16,
|
|
428
|
+
},
|
|
429
|
+
|
|
430
|
+
pickerButtons: {
|
|
431
|
+
flexDirection: 'row',
|
|
432
|
+
flexWrap: 'wrap',
|
|
433
|
+
gap: 8,
|
|
434
|
+
},
|
|
435
|
+
|
|
436
|
+
pickerButton: {
|
|
437
|
+
paddingHorizontal: 16,
|
|
438
|
+
paddingVertical: 8,
|
|
439
|
+
borderRadius: 20,
|
|
440
|
+
borderWidth: 1,
|
|
441
|
+
borderColor: palette.inputBorder,
|
|
442
|
+
backgroundColor: palette.listItemBackground,
|
|
443
|
+
},
|
|
444
|
+
|
|
445
|
+
pickerButtonActive: {
|
|
446
|
+
backgroundColor: palette.buttonBackground,
|
|
447
|
+
borderColor: palette.buttonBackground,
|
|
448
|
+
},
|
|
449
|
+
|
|
450
|
+
pickerButtonText: {
|
|
451
|
+
fontSize: 14,
|
|
452
|
+
color: palette.buttonTextSecondary,
|
|
453
|
+
},
|
|
454
|
+
|
|
455
|
+
pickerButtonTextActive: {
|
|
456
|
+
color: palette.buttonText,
|
|
457
|
+
fontWeight: '600',
|
|
458
|
+
},
|
|
459
|
+
|
|
460
|
+
modalActions: {
|
|
461
|
+
flexDirection: 'row',
|
|
462
|
+
gap: 12,
|
|
463
|
+
marginTop: 8,
|
|
464
|
+
},
|
|
465
|
+
|
|
466
|
+
modalCancelButton: {
|
|
467
|
+
flex: 1,
|
|
468
|
+
paddingVertical: 12,
|
|
469
|
+
paddingHorizontal: 16,
|
|
470
|
+
borderRadius: 8,
|
|
471
|
+
backgroundColor: palette.buttonBackgroundSecondary,
|
|
472
|
+
borderWidth: 1,
|
|
473
|
+
borderColor: palette.buttonBorderSecondary,
|
|
474
|
+
alignItems: 'center',
|
|
475
|
+
},
|
|
476
|
+
|
|
477
|
+
modalCancelText: {
|
|
478
|
+
color: palette.buttonTextSecondary,
|
|
479
|
+
fontSize: 16,
|
|
480
|
+
fontWeight: '500',
|
|
481
|
+
},
|
|
482
|
+
|
|
483
|
+
modalSaveButton: {
|
|
484
|
+
flex: 1,
|
|
485
|
+
paddingVertical: 12,
|
|
486
|
+
paddingHorizontal: 16,
|
|
487
|
+
borderRadius: 8,
|
|
488
|
+
backgroundColor: palette.buttonBackground,
|
|
489
|
+
alignItems: 'center',
|
|
490
|
+
},
|
|
491
|
+
|
|
492
|
+
modalSaveText: {
|
|
493
|
+
color: palette.buttonText,
|
|
494
|
+
fontSize: 16,
|
|
495
|
+
fontWeight: '600',
|
|
496
|
+
},
|
|
497
|
+
|
|
498
|
+
navigationModalDescription: {
|
|
499
|
+
fontSize: 15,
|
|
500
|
+
color: palette.listItemSubtitleText,
|
|
501
|
+
textAlign: 'center',
|
|
502
|
+
marginBottom: 16,
|
|
503
|
+
},
|
|
504
|
+
|
|
505
|
+
navigationAddressCard: {
|
|
506
|
+
borderWidth: 1,
|
|
507
|
+
borderColor: palette.cardBorder,
|
|
508
|
+
borderRadius: 12,
|
|
509
|
+
padding: 16,
|
|
510
|
+
backgroundColor: palette.listItemBackground,
|
|
511
|
+
marginBottom: 16,
|
|
512
|
+
},
|
|
513
|
+
|
|
514
|
+
navigationAddressTitle: {
|
|
515
|
+
fontSize: 16,
|
|
516
|
+
fontWeight: '600',
|
|
517
|
+
color: palette.cardText,
|
|
518
|
+
},
|
|
519
|
+
|
|
520
|
+
navigationAddressSubtitle: {
|
|
521
|
+
fontSize: 14,
|
|
522
|
+
color: palette.listItemSubtitleText,
|
|
523
|
+
marginTop: 4,
|
|
524
|
+
},
|
|
525
|
+
|
|
526
|
+
navigationOptions: {
|
|
527
|
+
gap: 12,
|
|
528
|
+
marginBottom: 16,
|
|
529
|
+
},
|
|
530
|
+
|
|
531
|
+
navigationOptionButton: {
|
|
532
|
+
paddingVertical: 14,
|
|
533
|
+
paddingHorizontal: 16,
|
|
534
|
+
borderRadius: 10,
|
|
535
|
+
backgroundColor: palette.buttonBackgroundSecondary,
|
|
536
|
+
borderWidth: 1,
|
|
537
|
+
borderColor: palette.buttonBorderSecondary,
|
|
538
|
+
alignItems: 'center',
|
|
539
|
+
},
|
|
540
|
+
|
|
541
|
+
navigationOptionButtonPrimary: {
|
|
542
|
+
backgroundColor: palette.buttonBackground,
|
|
543
|
+
borderColor: palette.buttonBackground,
|
|
544
|
+
},
|
|
545
|
+
|
|
546
|
+
navigationOptionButtonText: {
|
|
547
|
+
fontSize: 16,
|
|
548
|
+
fontWeight: '600',
|
|
549
|
+
color: palette.cardText,
|
|
550
|
+
},
|
|
551
|
+
|
|
552
|
+
navigationOptionButtonTextPrimary: {
|
|
553
|
+
color: palette.buttonText,
|
|
554
|
+
},
|
|
555
|
+
|
|
556
|
+
// Error state
|
|
557
|
+
retryButton: {
|
|
558
|
+
backgroundColor: palette.buttonBackground,
|
|
559
|
+
paddingVertical: 12,
|
|
560
|
+
paddingHorizontal: 24,
|
|
561
|
+
borderRadius: 8,
|
|
562
|
+
marginTop: 16,
|
|
563
|
+
},
|
|
564
|
+
|
|
565
|
+
retryButtonText: {
|
|
566
|
+
color: palette.buttonText,
|
|
567
|
+
fontSize: 16,
|
|
568
|
+
fontWeight: '600',
|
|
569
|
+
},
|
|
570
|
+
});
|
|
571
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import * as actions from '@controleonline/ui-default/src/store/default/actions';
|
|
2
|
+
import * as getters from '@controleonline/ui-default/src/store/default/getters';
|
|
3
|
+
import mutations from '@controleonline/ui-default/src/store/default/mutations';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Store for PeopleCategory join (person ↔ category with timeline).
|
|
7
|
+
* Endpoint: people_categories (api-platform-people).
|
|
8
|
+
* Contexts: profession, position (PF); sector, activity_branch (PJ).
|
|
9
|
+
*/
|
|
10
|
+
export default {
|
|
11
|
+
namespaced: true,
|
|
12
|
+
state: {
|
|
13
|
+
item: {},
|
|
14
|
+
items: [],
|
|
15
|
+
filters: {},
|
|
16
|
+
resourceEndpoint: 'people_categories',
|
|
17
|
+
isLoading: false,
|
|
18
|
+
error: '',
|
|
19
|
+
totalItems: 0,
|
|
20
|
+
messages: [],
|
|
21
|
+
message: {},
|
|
22
|
+
summary: {},
|
|
23
|
+
columns: [
|
|
24
|
+
{
|
|
25
|
+
editable: false,
|
|
26
|
+
isIdentity: true,
|
|
27
|
+
sortable: true,
|
|
28
|
+
name: 'id',
|
|
29
|
+
align: 'left',
|
|
30
|
+
label: 'id',
|
|
31
|
+
format: value => '#' + value,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
sortable: true,
|
|
35
|
+
name: 'category',
|
|
36
|
+
align: 'left',
|
|
37
|
+
label: 'category',
|
|
38
|
+
format: value => (value && (value.name || value)) || '',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
sortable: true,
|
|
42
|
+
name: 'startDate',
|
|
43
|
+
align: 'left',
|
|
44
|
+
label: 'startDate',
|
|
45
|
+
inputType: 'date',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
sortable: true,
|
|
49
|
+
name: 'endDate',
|
|
50
|
+
align: 'left',
|
|
51
|
+
label: 'endDate',
|
|
52
|
+
inputType: 'date',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
sortable: false,
|
|
56
|
+
name: 'peopleCompany',
|
|
57
|
+
align: 'left',
|
|
58
|
+
label: 'peopleCompany',
|
|
59
|
+
format: value => (value && (value.name || value.id || value)) || '',
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
actions: {
|
|
64
|
+
...actions,
|
|
65
|
+
},
|
|
66
|
+
getters: {
|
|
67
|
+
...getters,
|
|
68
|
+
},
|
|
69
|
+
mutations: {
|
|
70
|
+
...mutations,
|
|
71
|
+
},
|
|
72
|
+
};
|