@steedos-labs/content-compliance 0.7.9 → 0.7.11
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/dist/index.js +1 -1
- package/lib/actions/initUrgentQuota.js +7 -7
- package/lib/actions/initUrgentQuota.js.map +1 -1
- package/main/default/applications/pepsico_content_setting.app.yml +31 -34
- package/main/default/objects/pepsico_material_approval/buttons/pepsico_postpone_review.button.yml +1 -1
- package/main/default/objects/pepsico_material_approval/listviews/all.listview.yml +1 -1
- package/main/default/objects/pepsico_material_approval/listviews/collaboration.listview.yml +1 -1
- package/main/default/objects/pepsico_material_approval/listviews/handle.listview.yml +1 -1
- package/main/default/objects/pepsico_material_approval/listviews/handle_postpone.listview.yml +1 -1
- package/main/default/objects/pepsico_urgent_log/listviews/all.listview.yml +2 -0
- package/main/default/objects/pepsico_urgent_log/pepsico_urgent_log.object.yml +1 -1
- package/package.json +1 -1
- package/public/content-review/amis.css +4 -0
|
@@ -9,7 +9,7 @@ exports.initUrgentQuota = {
|
|
|
9
9
|
},
|
|
10
10
|
handler: function (ctx) {
|
|
11
11
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
12
|
-
var user, space, _a, year, h1_used, h2_used, h1, h2,
|
|
12
|
+
var user, space, _a, year, h1_used, h2_used, h1, h2, spaceUsers, ownerIds, created, updated, ownerIds_1, ownerIds_1_1, userId, existing, e_1_1;
|
|
13
13
|
var e_1, _b;
|
|
14
14
|
return tslib_1.__generator(this, function (_c) {
|
|
15
15
|
switch (_c.label) {
|
|
@@ -26,15 +26,15 @@ exports.initUrgentQuota = {
|
|
|
26
26
|
}
|
|
27
27
|
h1 = typeof h1_used === 'number' ? h1_used : 0;
|
|
28
28
|
h2 = typeof h2_used === 'number' ? h2_used : 0;
|
|
29
|
-
return [4, ctx.getObject('
|
|
30
|
-
filters: [['space', '=', space]],
|
|
31
|
-
fields: ['
|
|
29
|
+
return [4, ctx.getObject('space_users').directFind({
|
|
30
|
+
filters: [['space', '=', space], ['user_accepted', '=', true], ['email', 'endsWith', '@pepsico.com']],
|
|
31
|
+
fields: ['user']
|
|
32
32
|
})];
|
|
33
33
|
case 1:
|
|
34
|
-
|
|
35
|
-
ownerIds = tslib_1.__spreadArray([], tslib_1.__read(new Set(
|
|
34
|
+
spaceUsers = _c.sent();
|
|
35
|
+
ownerIds = tslib_1.__spreadArray([], tslib_1.__read(new Set(spaceUsers.map(function (u) { return u.user; }).filter(Boolean))), false);
|
|
36
36
|
if (ownerIds.length === 0) {
|
|
37
|
-
return [2, { message: '
|
|
37
|
+
return [2, { message: '未找到任何百事内部用户', created: 0, updated: 0 }];
|
|
38
38
|
}
|
|
39
39
|
created = 0;
|
|
40
40
|
updated = 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initUrgentQuota.js","sourceRoot":"","sources":["../../src/actions/initUrgentQuota.ts"],"names":[],"mappings":";;;;AAKa,QAAA,eAAe,GAAG;IAC3B,IAAI,EAAE;QACF,MAAM,EAAE,MAAM;QACd,QAAQ,EAAE,wCAAwC;KACrD;IACK,OAAO,YAAC,GAAG;;;;;;;wBACb,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;wBACzB,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;wBACrB,KAAK,GAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,CAAC;wBAE5B,IAAI,CAAC,KAAK,EAAE;4BACR,MAAM,IAAI,KAAK,CAAC,WAAW,CAAC,CAAC;yBAChC;wBAEK,KAA6B,GAAG,CAAC,MAAM,EAArC,IAAI,UAAA,EAAE,OAAO,aAAA,EAAE,OAAO,aAAA,CAAgB;wBAE9C,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;4BACnC,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC;yBAC/B;wBAEK,EAAE,GAAG,OAAO,OAAO,KAAK,QAAQ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AAK,OAAA;4BACL,IAAI,MAAA;4BACJ,OAAO,EAAE,EAAE;4BACX,OAAO,EAAE,EAAE;yBACd,CAAC,EAAA;;wBANF,SAME,CAAC;wBACH,OAAO,EAAE,CAAC;;;;;;;;;;;;;;;;6BAIlB,WAAO;4BACH,OAAO,EAAE,8CAAS,OAAO,sCAAQ,OAAO,wBAAM;4BAC9C,OAAO,SAAA;4BACP,OAAO,SAAA;4BACP,KAAK,EAAE,QAAQ,CAAC,MAAM;yBACzB,EAAC;;;;KACL;CACJ,CAAC"}
|
|
@@ -46,14 +46,14 @@ tab_groups:
|
|
|
46
46
|
default_open: true
|
|
47
47
|
- group_name: 业务配置
|
|
48
48
|
default_open: true
|
|
49
|
+
- group_name: 加急、分享、转移
|
|
50
|
+
default_open: true
|
|
49
51
|
- group_name: 业务数据
|
|
50
52
|
default_open: true
|
|
51
53
|
- group_name: 业务日志
|
|
52
54
|
default_open: true
|
|
53
55
|
- group_name: 系统信息
|
|
54
56
|
default_open: true
|
|
55
|
-
- group_name: 审批管理
|
|
56
|
-
default_open: true
|
|
57
57
|
- group_name: AI
|
|
58
58
|
default_open: true
|
|
59
59
|
tab_items:
|
|
@@ -81,69 +81,66 @@ tab_items:
|
|
|
81
81
|
object_pepsico_brand_leader:
|
|
82
82
|
group: 业务配置
|
|
83
83
|
index: 8
|
|
84
|
+
pepsico_approval_transfer:
|
|
85
|
+
group: 加急、分享、转移
|
|
86
|
+
index: 9
|
|
87
|
+
object_pepsico_approval_share:
|
|
88
|
+
group: 加急、分享、转移
|
|
89
|
+
index: 10
|
|
90
|
+
object_pepsico_approval_admin_log:
|
|
91
|
+
group: 加急、分享、转移
|
|
92
|
+
index: 11
|
|
93
|
+
object_pepsico_urgent_quota:
|
|
94
|
+
group: 加急、分享、转移
|
|
95
|
+
index: 12
|
|
96
|
+
object_pepsico_urgent_log:
|
|
97
|
+
group: 加急、分享、转移
|
|
98
|
+
index: 13
|
|
84
99
|
analytics_dashboard_686338016bb1d50617f00177:
|
|
85
100
|
group: 业务数据
|
|
86
|
-
index:
|
|
101
|
+
index: 14
|
|
87
102
|
object_pepsico_material_approval_data:
|
|
88
103
|
group: 业务数据
|
|
89
|
-
index:
|
|
104
|
+
index: 15
|
|
90
105
|
object_pepsico_material_data:
|
|
91
106
|
group: 业务数据
|
|
92
|
-
index:
|
|
107
|
+
index: 16
|
|
93
108
|
object_pepsico_approval_process:
|
|
94
109
|
group: 业务日志
|
|
95
|
-
index:
|
|
110
|
+
index: 17
|
|
96
111
|
object_pepsico_spot_check_report:
|
|
97
112
|
group: 业务日志
|
|
98
|
-
index:
|
|
113
|
+
index: 18
|
|
99
114
|
object_pepsico_mail_send_log:
|
|
100
115
|
group: 业务日志
|
|
101
|
-
index:
|
|
116
|
+
index: 19
|
|
102
117
|
object_pepsico_mail_visit_log:
|
|
103
118
|
group: 业务日志
|
|
104
|
-
index:
|
|
119
|
+
index: 20
|
|
105
120
|
admin_logs:
|
|
106
121
|
group: 系统信息
|
|
107
|
-
index:
|
|
122
|
+
index: 21
|
|
108
123
|
admin_steedos_packages:
|
|
109
124
|
group: 系统信息
|
|
110
|
-
index:
|
|
125
|
+
index: 22
|
|
111
126
|
operation_logs:
|
|
112
127
|
group: 系统信息
|
|
113
|
-
index:
|
|
128
|
+
index: 23
|
|
114
129
|
about:
|
|
115
130
|
group: 系统信息
|
|
116
|
-
index:
|
|
131
|
+
index: 34
|
|
117
132
|
pepsico_material_delete:
|
|
118
133
|
group: 系统信息
|
|
119
|
-
index: 20
|
|
120
|
-
object_pepsico_approval_share:
|
|
121
|
-
group: 审批管理
|
|
122
|
-
index: 24
|
|
123
|
-
object_pepsico_approval_admin_log:
|
|
124
|
-
group: 审批管理
|
|
125
134
|
index: 25
|
|
126
|
-
pepsico_approval_transfer:
|
|
127
|
-
group: 审批管理
|
|
128
|
-
index: 26
|
|
129
|
-
object_pepsico_urgent_quota:
|
|
130
|
-
group: 审批管理
|
|
131
|
-
index: 27
|
|
132
|
-
object_pepsico_urgent_log:
|
|
133
|
-
group: 审批管理
|
|
134
|
-
index: 28
|
|
135
135
|
object_pepsico_ai_review:
|
|
136
136
|
group: AI
|
|
137
|
-
|
|
138
|
-
index: 21
|
|
137
|
+
index: 26
|
|
139
138
|
object_ai_process:
|
|
140
139
|
group: AI
|
|
141
|
-
|
|
142
|
-
index: 22
|
|
140
|
+
index: 27
|
|
143
141
|
object_ai_process_detail:
|
|
144
142
|
group: AI
|
|
145
|
-
|
|
146
|
-
index: 23
|
|
143
|
+
index: 28
|
|
147
144
|
tabs:
|
|
148
145
|
- admin_space_users
|
|
149
146
|
- admin_roles
|
package/main/default/objects/pepsico_material_approval/buttons/pepsico_postpone_review.button.yml
CHANGED
|
@@ -8,7 +8,7 @@ amis_schema: |-
|
|
|
8
8
|
"label": "延后审核",
|
|
9
9
|
"id": "u:pepsico_postpone_review",
|
|
10
10
|
"editorState": "default",
|
|
11
|
-
"visibleOn": "${(current_step == 'departmental_review' || current_step == 'personnel_review') && !ARRAYINCLUDES(person_pending_approve, context.user.user) && ARRAYINCLUDES(person_approved, context.user.user) && !ARRAYINCLUDES(postpone_marker_users, context.user.user) && !ARRAYINCLUDES(review_postponed_users, context.user.user) && !is_skip_approver &&
|
|
11
|
+
"visibleOn": "${(current_step == 'departmental_review' || current_step == 'personnel_review') && !ARRAYINCLUDES(person_pending_approve, context.user.user) && ARRAYINCLUDES(person_approved, context.user.user) && !ARRAYINCLUDES(postpone_marker_users, context.user.user) && !ARRAYINCLUDES(review_postponed_users, context.user.user) && !is_skip_approver && ((ARRAYINCLUDES(ns_reviewer, context.user.user) && ns_approval_status == false) || (ARRAYINCLUDES(legal_reviewer, context.user.user) && legal_approval_status == false) || (ARRAYINCLUDES(sra_reviewer, context.user.user) && sra_approval_status == false) || (ARRAYINCLUDES(ca_reviewer, context.user.user) && ca_approval_status == false) || (ARRAYINCLUDES(kids_reviewer, context.user.user) && kids_approval_status == false) || (ARRAYINCLUDES(reviewer, context.user.user) && approval_status == false) || (pre_ns_reviewer == context.user.user && pre_ns_approval_status == false) || (pre_legal_reviewer == context.user.user && pre_legal_approval_status == false) || (pre_sra_reviewer == context.user.user && pre_sra_approval_status == false) || (pre_ca_reviewer == context.user.user && pre_ca_approval_status == false) || (pre_reviewer == context.user.user && pre_approval_status == false)) && formFactor != 'SMALL'}",
|
|
12
12
|
"onEvent": {
|
|
13
13
|
"click": {
|
|
14
14
|
"weight": 0,
|
|
@@ -4,7 +4,7 @@ columns:
|
|
|
4
4
|
width: '400'
|
|
5
5
|
wrap: true
|
|
6
6
|
amis:
|
|
7
|
-
classNameExpr: "${is_urgent ? 'color-priority-danger' : (ARRAYINCLUDES(review_postponed_users, context.userId) ? 'color-priority-postponed' : '')}"
|
|
7
|
+
classNameExpr: "${is_urgent ? 'color-priority-danger' : ((review_postponed_users && review_postponed_users.length > 0 && (ARRAYINCLUDES(review_postponed_users, context.userId) || owner == context.userId || context.user.profile == 'admin')) ? 'color-priority-postponed' : '')}"
|
|
8
8
|
- field: owner
|
|
9
9
|
wrap: false
|
|
10
10
|
- field: owner_department
|
|
@@ -4,7 +4,7 @@ columns:
|
|
|
4
4
|
wrap: true
|
|
5
5
|
width: '400'
|
|
6
6
|
amis:
|
|
7
|
-
classNameExpr: "${is_urgent ? 'color-priority-danger' : (ARRAYINCLUDES(review_postponed_users, context.userId) ? 'color-priority-postponed' : '')}"
|
|
7
|
+
classNameExpr: "${is_urgent ? 'color-priority-danger' : ((review_postponed_users && review_postponed_users.length > 0 && (ARRAYINCLUDES(review_postponed_users, context.userId) || owner == context.userId || context.user.profile == 'admin')) ? 'color-priority-postponed' : '')}"
|
|
8
8
|
- field: current_step
|
|
9
9
|
- field: person_pending_approve
|
|
10
10
|
- field: draft_submitted
|
|
@@ -4,7 +4,7 @@ columns:
|
|
|
4
4
|
wrap: true
|
|
5
5
|
width: '400'
|
|
6
6
|
amis:
|
|
7
|
-
classNameExpr: "${is_urgent ? 'color-priority-danger' : (ARRAYINCLUDES(review_postponed_users, context.userId) ? 'color-priority-postponed' : '')}"
|
|
7
|
+
classNameExpr: "${is_urgent ? 'color-priority-danger' : ((review_postponed_users && review_postponed_users.length > 0 && (ARRAYINCLUDES(review_postponed_users, context.userId) || owner == context.userId || context.user.profile == 'admin')) ? 'color-priority-postponed' : '')}"
|
|
8
8
|
- field: current_step
|
|
9
9
|
- field: person_pending_approve
|
|
10
10
|
- field: draft_submitted
|
package/main/default/objects/pepsico_material_approval/listviews/handle_postpone.listview.yml
CHANGED
|
@@ -4,7 +4,7 @@ columns:
|
|
|
4
4
|
wrap: true
|
|
5
5
|
width: '400'
|
|
6
6
|
amis:
|
|
7
|
-
classNameExpr: "${is_urgent ? 'color-priority-danger' : (ARRAYINCLUDES(review_postponed_users, context.userId) ? 'color-priority-postponed' : '')}"
|
|
7
|
+
classNameExpr: "${is_urgent ? 'color-priority-danger' : ((review_postponed_users && review_postponed_users.length > 0 && (ARRAYINCLUDES(review_postponed_users, context.userId) || owner == context.userId || context.user.profile == 'admin')) ? 'color-priority-postponed' : '')}"
|
|
8
8
|
- field: current_step
|
|
9
9
|
- field: person_pending_approve
|
|
10
10
|
- field: draft_submitted
|
package/package.json
CHANGED