@steedos-labs/content-compliance-bev 0.0.8 → 0.0.10

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 (25) hide show
  1. package/dist/index.js +1 -1
  2. package/lib/actions/spotCheckMaterial.js +3 -0
  3. package/lib/actions/spotCheckMaterial.js.map +1 -1
  4. package/lib/methods/approval_engine.js +12 -40
  5. package/lib/methods/approval_engine.js.map +1 -1
  6. package/lib/methods/content_hub.js +2 -2
  7. package/lib/methods/content_hub.js.map +1 -1
  8. package/main/default/objects/pepsico_material/buttons/pepsico_onedrive_edit_material.button.yml +2 -2
  9. package/main/default/objects/pepsico_material/buttons/pepsico_onedrive_review_material.button.yml +2 -2
  10. package/main/default/objects/pepsico_material/buttons/pepsico_update_material.button.yml +1 -1
  11. package/main/default/objects/pepsico_material/buttons/pepsico_upload_supplement.button.yml +1 -1
  12. package/main/default/objects/pepsico_material_approval/buttons/approve_ai.button.yml +3 -3
  13. package/main/default/objects/pepsico_material_approval/buttons/pepsico_confirm_online.button.yml +1 -1
  14. package/main/default/objects/pepsico_material_approval/buttons/pepsico_material_upload.button.yml +2 -2
  15. package/main/default/objects/pepsico_material_approval/fields/approved_time.field.yml +2 -1
  16. package/main/default/objects/pepsico_material_approval/fields/ch_upload.field.yml +1 -1
  17. package/main/default/objects/pepsico_material_approval/fields/is_skip_approver.field.yml +1 -1
  18. package/main/default/objects/pepsico_material_approval/listviews/deletion.listview.yml +32 -0
  19. package/main/default/objects/pepsico_material_spot_check/listviews/all.listview.yml +1 -1
  20. package/main/default/pages/pepsico_content_review_detail.page.amis.json +6 -6
  21. package/main/default/pages/pepsico_material_detail.page.amis.json +2 -2
  22. package/main/default/pages/pepsico_material_detail_mobile.page.amis.json +1 -1
  23. package/main/default/pages/pepsico_pending_deletion_material_approval.page.amis.json +2 -2
  24. package/main/default/pages/pepsico_spot_check_report.page.amis.json +2 -2
  25. package/package.json +1 -1
@@ -2,7 +2,7 @@ name: is_skip_approver
2
2
  amis:
3
3
  id: 'u:7fcecdfd02fb'
4
4
  group: 审核情况
5
- is_wide: true
5
+ is_wide: false
6
6
  label: 跳过审核
7
7
  readonly: true
8
8
  sort_no: 3250
@@ -0,0 +1,32 @@
1
+ name: deletion
2
+ columns:
3
+ - field: name
4
+ width: '400'
5
+ wrap: true
6
+ - field: current_step
7
+ - field: material_owner
8
+ width: '250'
9
+ wrap: true
10
+ - field: owner_department
11
+ wrap: false
12
+ - field: approved_time
13
+ width: '150'
14
+ crud_mode: table
15
+ filter_scope: space
16
+ filters: []
17
+ is_enable: true
18
+ label: 所有
19
+ mobile_columns:
20
+ - field: name
21
+ - field: owner
22
+ - field: owner_department
23
+ - field: current_step
24
+ - field: review_status
25
+ scrolling_mode: standard
26
+ shared: true
27
+ shared_to: space
28
+ sort:
29
+ - field_name: approved_time
30
+ order: asc
31
+ sort_no: 60
32
+ type: grid
@@ -6,7 +6,7 @@ columns:
6
6
  - field: pepsico_spot_check_status
7
7
  - field: pepsico_spot_check
8
8
  - field: role
9
- - field: spot_check_time
9
+ - field: spot_checked_done_time
10
10
  - field: pepsico_material
11
11
  width: '400'
12
12
  wrap: true
@@ -18,7 +18,7 @@
18
18
  "inline": true,
19
19
  "wrapperComponent": "",
20
20
  "id": "u:65eac8efca60",
21
- "visibleOn": "${approval_type === 'departmental_review' && review_status != 'draft' && COUNT(handler_ns) > 0}",
21
+ "visibleOn": "${approval_type === 'departmental_review' && review_status != 'draft' && COUNT(handler_ns) > 0 && current_step != 'ai_review'}",
22
22
  "editorState": "default"
23
23
  },
24
24
  {
@@ -36,7 +36,7 @@
36
36
  "inline": true,
37
37
  "wrapperComponent": "",
38
38
  "id": "u:912d54a43263",
39
- "visibleOn": "${approval_type === 'departmental_review' && review_status != 'draft' && COUNT(handler_sra) > 0}",
39
+ "visibleOn": "${approval_type === 'departmental_review' && review_status != 'draft' && COUNT(handler_sra) > 0 && current_step != 'ai_review'}",
40
40
  "editorState": "default"
41
41
  },
42
42
  {
@@ -45,7 +45,7 @@
45
45
  "inline": true,
46
46
  "wrapperComponent": "",
47
47
  "id": "u:3dd4613d67ae",
48
- "visibleOn": "${approval_type === 'departmental_review' && review_status != 'draft' && COUNT(handler_ca) > 0}",
48
+ "visibleOn": "${approval_type === 'departmental_review' && review_status != 'draft' && COUNT(handler_ca) > 0 && current_step != 'ai_review'}",
49
49
  "editorState": "default"
50
50
  },
51
51
  {
@@ -131,7 +131,7 @@
131
131
  }
132
132
  }
133
133
  },
134
- "visibleOn": "${false && approval_type === 'personnel_review' && review_status != 'draft'}"
134
+ "visibleOn": "${false && approval_type === 'personnel_review' && review_status != 'draft' && current_step != 'ai_review'}"
135
135
  },
136
136
  {
137
137
  "type": "tpl",
@@ -139,7 +139,7 @@
139
139
  "inline": true,
140
140
  "wrapperComponent": "",
141
141
  "id": "u:ec5fe1e3ac08",
142
- "visibleOn": "${approval_type === 'personnel_review' && review_status != 'draft'}",
142
+ "visibleOn": "${approval_type === 'personnel_review' && review_status != 'draft' && COUNT(handler_guding) > 0 && current_step != 'ai_review'}",
143
143
  "editorState": "default"
144
144
  },
145
145
  {
@@ -148,7 +148,7 @@
148
148
  "inline": true,
149
149
  "wrapperComponent": "",
150
150
  "id": "u:41fda075cc8b",
151
- "visibleOn": "${child_files === 'yes' && review_status != 'draft'}",
151
+ "visibleOn": "${child_files === 'yes' && review_status != 'draft' && COUNT(handler_kids) > 0 && current_step != 'ai_review'}",
152
152
  "editorState": "default"
153
153
  }
154
154
  ],
@@ -63,7 +63,7 @@
63
63
  },
64
64
  {
65
65
  "type": "iframe",
66
- "src": "${context.rootUrl}/api/page/public/pdf_view?fileUrl=/api/files/files/${_display.material.value}",
66
+ "src": "${context.rootUrl}/api/page/public/pdf_view?fileUrl=/api/v6/files/cfs.files.filerecord/${_display.material.value}/${_display.material.name}",
67
67
  "id": "pdf-viewer",
68
68
  "visibleOn": "${extension_type === 'pdf'}",
69
69
  "height": "100%"
@@ -312,7 +312,7 @@
312
312
  },
313
313
  {
314
314
  "type": "iframe",
315
- "src": "${context.rootUrl}/api/page/public/pdf_view?fileUrl=/api/files/files/${_display.material.value}",
315
+ "src": "${context.rootUrl}/api/page/public/pdf_view?fileUrl=/api/v6/files/cfs.files.filerecord/${_display.material.value}/${_display.material.name}",
316
316
  "id": "pdf-viewer",
317
317
  "visibleOn": "${extension_type === 'pdf'}",
318
318
  "height": "100%"
@@ -48,7 +48,7 @@
48
48
  },
49
49
  {
50
50
  "type": "iframe",
51
- "src": "${context.rootUrl}/api/page/public/pdf_view?fileUrl=/api/files/files/${_display.material.value}",
51
+ "src": "${context.rootUrl}/api/page/public/pdf_view?fileUrl=/api/v6/files/cfs.files.filerecord/${_display.material.value}/${_display.material.name}",
52
52
  "id": "pdf-viewer",
53
53
  "visibleOn": "${extension_type === 'pdf'}",
54
54
  "height": "100%"
@@ -24,7 +24,7 @@
24
24
  "className": "listHeight",
25
25
  "label": "列表视图",
26
26
  "objectApiName": "pepsico_material_approval",
27
- "listName": "all",
27
+ "listName": "deletion",
28
28
  "showHeader": false,
29
29
  "id": "u:ee75c526fe3d772",
30
30
  "crudMode": "table",
@@ -41,7 +41,7 @@
41
41
  "data": {
42
42
  "initialValues": {},
43
43
  "appId": "pepsico_content_review",
44
- "listName": "all",
44
+ "listName": "deletion",
45
45
  "showFieldsFilter": false,
46
46
  "showPermanentDeleteBtn": true
47
47
  }
@@ -32,7 +32,7 @@
32
32
  "url": "/api/record/export/pepsico_material",
33
33
  "method": "get",
34
34
  "messages": {},
35
- "requestAdaptor": "const exportFileName = `${context.logInfo._display.product}:${_.replace(context.reportInfo.year_month, '-', '年')}月素材抽查情况`; const yearMonthArray = context.reportInfo.year_month.split('-'); const date = moment([Number(yearMonthArray[0]), Number(yearMonthArray[1]) - 1]); const monthStart=date.startOf('month').toDate(); const monthEnd=date.endOf('month').toDate();const _sfilters = []; if(_sfilters.length > 0){_sfilters.push('and')};_sfilters.push(['spot_checked', '=', true]); _sfilters.push('and'); _sfilters.push(['product','=', context.logInfo.product]); _sfilters.push('and'); _sfilters.push(['classification','=', context.logInfo.classification]); _sfilters.push('and'); _sfilters.push(['spot_check_time','between', [monthStart, monthEnd]]); api.url = api.url + '?$select=' + encodeURIComponent(context.exportFields) + '&filename=' + encodeURIComponent(exportFileName); api.url = api.url +'&filters=' + encodeURIComponent(JSON.stringify(_sfilters)); return api;"
35
+ "requestAdaptor": "const exportFileName = `${context.logInfo._display.product}:${_.replace(context.reportInfo.year_month, '-', '年')}月素材抽查情况`; const yearMonthArray = context.reportInfo.year_month.split('-'); const date = moment([Number(yearMonthArray[0]), Number(yearMonthArray[1]) - 1]); const monthStart=date.startOf('month').toDate(); const monthEnd=date.endOf('month').toDate();const _sfilters = []; if(_sfilters.length > 0){_sfilters.push('and')};_sfilters.push(['spot_checked', '=', true]); _sfilters.push('and'); _sfilters.push(['product','=', context.logInfo.product]); _sfilters.push('and'); _sfilters.push(['classification','=', context.logInfo.classification]); _sfilters.push('and'); _sfilters.push(['spot_checked_done_time','between', [monthStart, monthEnd]]); api.url = api.url + '?$select=' + encodeURIComponent(context.exportFields) + '&filename=' + encodeURIComponent(exportFileName); api.url = api.url +'&filters=' + encodeURIComponent(JSON.stringify(_sfilters)); return api;"
36
36
  }
37
37
  },
38
38
  "actionType": "download"
@@ -55,7 +55,7 @@
55
55
  "ctx": {
56
56
  "auto_open_filter": false
57
57
  },
58
- "requestAdaptor": "const yearMonthArray = context.reportInfo.year_month.split('-'); const date = moment([Number(yearMonthArray[0]), Number(yearMonthArray[1]) - 1]); const monthStart=date.startOf('month').toDate(); const monthEnd=date.endOf('month').toDate();const _sfilters = JSON.parse(JSON.stringify(filters)); if(_sfilters.length > 0){_sfilters.push('and')};_sfilters.push(['spot_checked', '=', true]); _sfilters.push('and'); _sfilters.push(['product','=', context.logInfo.product]); _sfilters.push('and'); _sfilters.push(['classification','=', context.logInfo.classification]); _sfilters.push('and'); _sfilters.push(['spot_check_time','between', [monthStart, monthEnd]]); api.data.query = api.data.query.replace('pepsico_material(filters: []', 'pepsico_material(filters:' + JSON.stringify(_sfilters)).replace('pepsico_material__count(filters:[]', 'pepsico_material__count(filters:' + JSON.stringify(_sfilters)); "
58
+ "requestAdaptor": "const yearMonthArray = context.reportInfo.year_month.split('-'); const date = moment([Number(yearMonthArray[0]), Number(yearMonthArray[1]) - 1]); const monthStart=date.startOf('month').toDate(); const monthEnd=date.endOf('month').toDate();const _sfilters = JSON.parse(JSON.stringify(filters)); if(_sfilters.length > 0){_sfilters.push('and')};_sfilters.push(['spot_checked', '=', true]); _sfilters.push('and'); _sfilters.push(['product','=', context.logInfo.product]); _sfilters.push('and'); _sfilters.push(['classification','=', context.logInfo.classification]); _sfilters.push('and'); _sfilters.push(['spot_checked_done_time','between', [monthStart, monthEnd]]); api.data.query = api.data.query.replace('pepsico_material(filters: []', 'pepsico_material(filters:' + JSON.stringify(_sfilters)).replace('pepsico_material__count(filters:[]', 'pepsico_material__count(filters:' + JSON.stringify(_sfilters)); "
59
59
  }
60
60
  ],
61
61
  "regions": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos-labs/content-compliance-bev",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "description": "百事Bev内容审核系统",
5
5
  "main": "package.service.js",
6
6
  "scripts": {