@steedos-labs/content-compliance 0.8.9 → 0.8.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.
@@ -11,7 +11,7 @@
11
11
  },
12
12
  {
13
13
  "type": "grid",
14
- "className": "m-0 material-${extension_type}",
14
+ "className": "m-0 material-${extension_type} material-detail-no-comments",
15
15
  "id": "u:9176c9e13ab5",
16
16
  "editorState": "default",
17
17
  "columns": [
@@ -19,10 +19,15 @@
19
19
  "columnClassName": "px-0 max-h-full",
20
20
  "body": [
21
21
  {
22
- "type": "tabs",
23
- "className": "steedos-record-tabs bg-white p-4 mx-4 sm:border sm:rounded",
24
- "tabs": [
22
+ "type": "service",
23
+ "className": "h-full material-review-permissions-service",
24
+ "api": "/api/pepsico-content/review-permissions/material/${recordId}",
25
+ "body": [
25
26
  {
27
+ "type": "tabs",
28
+ "className": "steedos-record-tabs bg-white p-4 mx-4 sm:border sm:rounded",
29
+ "tabs": [
30
+ {
26
31
  "title": "素材预览",
27
32
  "className": "px-0 py-2",
28
33
  "visibleOn": "extension_type !== 'doc' && extension_type !== 'docx' && extension_type !== 'ppt' && extension_type !== 'pptx'",
@@ -155,6 +160,7 @@
155
160
  "id": "u:pepsico_adopt",
156
161
  "confirmText": "确定要采纳这个AI意见吗?",
157
162
  "className": "pepsico-adopt mr-4",
163
+ "visibleOn": "${canAdopt}",
158
164
  "onEvent": {
159
165
  "click": {
160
166
  "weight": 0,
@@ -172,6 +178,17 @@
172
178
  "messages": {}
173
179
  }
174
180
  },
181
+ {
182
+ "ignoreError": false,
183
+ "actionType": "toast",
184
+ "args": {
185
+ "msgType": "success",
186
+ "position": "top-right",
187
+ "closeButton": true,
188
+ "showIcon": true,
189
+ "msg": "意见已采纳到评论区,请确认"
190
+ }
191
+ },
175
192
  {
176
193
  "ignoreError": true,
177
194
  "actionType": "ajax",
@@ -207,6 +224,7 @@
207
224
  },
208
225
  {
209
226
  "title": "PLS意见",
227
+ "visibleOn": "${hasPLSFile}",
210
228
  "className": "px-0 py-4 pepsico-pls-review-tab-content",
211
229
  "body": [
212
230
  {
@@ -218,7 +236,7 @@
218
236
  {
219
237
  "type": "alert",
220
238
  "level": "info",
221
- "body": "暂无有效的PLS审核意见",
239
+ "body": "暂无PLS审核意见",
222
240
  "visibleOn": "${!groups || groups.length === 0}"
223
241
  },
224
242
  {
@@ -334,8 +352,14 @@
334
352
  "filters": [
335
353
  [
336
354
  "is_active",
337
- "!=",
338
- false
355
+ "=",
356
+ true
357
+ ],
358
+ "or",
359
+ [
360
+ "is_active",
361
+ "=",
362
+ null
339
363
  ]
340
364
  ],
341
365
  "required": false,
@@ -446,6 +470,7 @@
446
470
  "label": "采纳",
447
471
  "confirmText": "确定要采纳这个AI意见吗?",
448
472
  "className": "pepsico-adopt mr-4",
473
+ "visibleOn": "${canAdopt}",
449
474
  "onEvent": {
450
475
  "click": {
451
476
  "weight": 0,
@@ -463,6 +488,17 @@
463
488
  "messages": {}
464
489
  }
465
490
  },
491
+ {
492
+ "ignoreError": false,
493
+ "actionType": "toast",
494
+ "args": {
495
+ "msgType": "success",
496
+ "position": "top-right",
497
+ "closeButton": true,
498
+ "showIcon": true,
499
+ "msg": "意见已采纳到评论区,请确认"
500
+ }
501
+ },
466
502
  {
467
503
  "ignoreError": true,
468
504
  "actionType": "ajax",
@@ -519,8 +555,10 @@
519
555
  "id": "u:26838ebced4a",
520
556
  "className": "px-0 py-4"
521
557
  }
522
- ],
523
- "id": "u:2bda634e52ac"
558
+ ],
559
+ "id": "u:2bda634e52ac"
560
+ }
561
+ ]
524
562
  }
525
563
  ],
526
564
  "id": "u:332085f0f500"
@@ -536,10 +574,15 @@
536
574
  "columnClassName": "px-0 max-h-full",
537
575
  "body": [
538
576
  {
539
- "type": "tabs",
540
- "className": "steedos-record-tabs bg-white p-4 ml-4 sm:border sm:rounded",
541
- "tabs": [
577
+ "type": "service",
578
+ "className": "h-full material-review-permissions-service",
579
+ "api": "/api/pepsico-content/review-permissions/material/${recordId}",
580
+ "body": [
542
581
  {
582
+ "type": "tabs",
583
+ "className": "steedos-record-tabs bg-white p-4 ml-4 sm:border sm:rounded",
584
+ "tabs": [
585
+ {
543
586
  "title": "素材预览",
544
587
  "className": "px-0 py-2",
545
588
  "visibleOn": "extension_type !== 'doc' && extension_type !== 'docx' && extension_type !== 'ppt' && extension_type !== 'pptx'",
@@ -672,6 +715,7 @@
672
715
  "id": "u:c9702afe3bc9",
673
716
  "confirmText": "确定要采纳这个AI意见吗?",
674
717
  "className": "pepsico-adopt mr-4",
718
+ "visibleOn": "${canAdopt}",
675
719
  "onEvent": {
676
720
  "click": {
677
721
  "weight": 0,
@@ -689,6 +733,17 @@
689
733
  "messages": {}
690
734
  }
691
735
  },
736
+ {
737
+ "ignoreError": false,
738
+ "actionType": "toast",
739
+ "args": {
740
+ "msgType": "success",
741
+ "position": "top-right",
742
+ "closeButton": true,
743
+ "showIcon": true,
744
+ "msg": "意见已采纳到评论区,请确认"
745
+ }
746
+ },
692
747
  {
693
748
  "ignoreError": true,
694
749
  "actionType": "ajax",
@@ -724,6 +779,7 @@
724
779
  },
725
780
  {
726
781
  "title": "PLS意见",
782
+ "visibleOn": "${hasPLSFile}",
727
783
  "className": "px-0 py-4 pepsico-pls-review-tab-content",
728
784
  "body": [
729
785
  {
@@ -735,7 +791,7 @@
735
791
  {
736
792
  "type": "alert",
737
793
  "level": "info",
738
- "body": "暂无有效的PLS审核意见",
794
+ "body": "暂无PLS审核意见",
739
795
  "visibleOn": "${!groups || groups.length === 0}"
740
796
  },
741
797
  {
@@ -851,8 +907,14 @@
851
907
  "filters": [
852
908
  [
853
909
  "is_active",
854
- "!=",
855
- false
910
+ "=",
911
+ true
912
+ ],
913
+ "or",
914
+ [
915
+ "is_active",
916
+ "=",
917
+ null
856
918
  ]
857
919
  ],
858
920
  "required": false,
@@ -963,6 +1025,7 @@
963
1025
  "label": "采纳",
964
1026
  "confirmText": "确定要采纳这个AI意见吗?",
965
1027
  "className": "pepsico-adopt mr-4",
1028
+ "visibleOn": "${canAdopt}",
966
1029
  "onEvent": {
967
1030
  "click": {
968
1031
  "weight": 0,
@@ -980,6 +1043,17 @@
980
1043
  "messages": {}
981
1044
  }
982
1045
  },
1046
+ {
1047
+ "ignoreError": false,
1048
+ "actionType": "toast",
1049
+ "args": {
1050
+ "msgType": "success",
1051
+ "position": "top-right",
1052
+ "closeButton": true,
1053
+ "showIcon": true,
1054
+ "msg": "意见已采纳到评论区,请确认"
1055
+ }
1056
+ },
983
1057
  {
984
1058
  "ignoreError": true,
985
1059
  "actionType": "ajax",
@@ -1053,8 +1127,10 @@
1053
1127
  "id": "u:9ea488b63710",
1054
1128
  "reload": true
1055
1129
  }
1056
- ],
1057
- "id": "u:ae655ee6c4b4"
1130
+ ],
1131
+ "id": "u:ae655ee6c4b4"
1132
+ }
1133
+ ]
1058
1134
  }
1059
1135
  ],
1060
1136
  "id": "u:f65ca7cd907b"
@@ -10,10 +10,15 @@
10
10
  "id": "u:ae4a6d994b65"
11
11
  },
12
12
  {
13
- "type": "tabs",
14
- "className": "steedos-record-tabs bg-white p-4 sm:border sm:rounded",
15
- "tabs": [
13
+ "type": "service",
14
+ "className": "h-full material-review-permissions-service",
15
+ "api": "/api/pepsico-content/review-permissions/material/${recordId}",
16
+ "body": [
16
17
  {
18
+ "type": "tabs",
19
+ "className": "steedos-record-tabs bg-white p-4 sm:border sm:rounded",
20
+ "tabs": [
21
+ {
17
22
  "title": "素材预览",
18
23
  "className": "px-0 py-2",
19
24
  "visibleOn": "extension_type !== 'doc' && extension_type !== 'docx' && extension_type !== 'ppt' && extension_type !== 'pptx'",
@@ -100,6 +105,7 @@
100
105
  },
101
106
  {
102
107
  "title": "PLS意见",
108
+ "visibleOn": "${hasPLSFile}",
103
109
  "className": "px-0 py-4 pepsico-pls-review-tab-content",
104
110
  "body": [
105
111
  {
@@ -111,7 +117,7 @@
111
117
  {
112
118
  "type": "alert",
113
119
  "level": "info",
114
- "body": "暂无有效的PLS审核意见",
120
+ "body": "暂无PLS审核意见",
115
121
  "visibleOn": "${!groups || groups.length === 0}"
116
122
  },
117
123
  {
@@ -227,8 +233,14 @@
227
233
  "filters": [
228
234
  [
229
235
  "is_active",
230
- "!=",
231
- false
236
+ "=",
237
+ true
238
+ ],
239
+ "or",
240
+ [
241
+ "is_active",
242
+ "=",
243
+ null
232
244
  ]
233
245
  ],
234
246
  "required": false,
@@ -339,6 +351,7 @@
339
351
  "label": "采纳",
340
352
  "confirmText": "确定要采纳这个AI意见吗?",
341
353
  "className": "pepsico-adopt mr-4",
354
+ "visibleOn": "${canAdopt}",
342
355
  "onEvent": {
343
356
  "click": {
344
357
  "weight": 0,
@@ -355,8 +368,19 @@
355
368
  "adaptor": "return {}",
356
369
  "messages": {}
357
370
  }
358
- },
359
- {
371
+ },
372
+ {
373
+ "ignoreError": false,
374
+ "actionType": "toast",
375
+ "args": {
376
+ "msgType": "success",
377
+ "position": "top-right",
378
+ "closeButton": true,
379
+ "showIcon": true,
380
+ "msg": "意见已采纳到评论区,请确认"
381
+ }
382
+ },
383
+ {
360
384
  "ignoreError": true,
361
385
  "actionType": "ajax",
362
386
  "outputVar": "responseResult2",
@@ -412,8 +436,10 @@
412
436
  "id": "u:26838ebced4a",
413
437
  "className": "px-0 py-4"
414
438
  }
415
- ],
416
- "id": "u:2bda634e52ac"
439
+ ],
440
+ "id": "u:2bda634e52ac"
441
+ }
442
+ ]
417
443
  }
418
444
  ],
419
445
  "regions": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos-labs/content-compliance",
3
- "version": "0.8.9",
3
+ "version": "0.8.11",
4
4
  "description": "内容审核系统",
5
5
  "main": "package.service.js",
6
6
  "scripts": {
@@ -143,6 +143,11 @@
143
143
  position: fixed;
144
144
  }
145
145
 
146
+ .antd-Drawer-body .material-detail-no-comments .pepsico_ai_review-tab-content {
147
+ width: 100%;
148
+ position: initial;
149
+ }
150
+
146
151
  .antd-Drawer-body .pepsico_ai_review-tab-content .steedos-record-related-list{
147
152
  height: calc(100% - 175px);
148
153
  }
@@ -323,7 +328,7 @@
323
328
  }
324
329
 
325
330
  .antd-Drawer .steedos-object-table.steedos-crud-mode-cards .antd-Crud .antd-Cards .antd-Cards-body .antd-Card .antd-Card-body .antd-Card-field .antd-Card-fieldValue .antd-TplField{
326
- max-width: auto;
331
+ max-width: none;
327
332
  }
328
333
 
329
334
  .pepsico_ai_review-tab-content .antd-Image--thumb{
@@ -432,6 +437,12 @@ tbody .color-priority-postponed *{
432
437
  color: #999 !important;
433
438
  }
434
439
 
440
+ /* PLS 意见较多时在页签内容区独立滚动,不撑高整个材料详情页。 */
441
+ .pepsico-pls-review-tab-content {
442
+ height: 100%;
443
+ overflow-y: auto;
444
+ }
445
+
435
446
  /* PLS 意见按关联文件分组,卡片布局与 AI 审核意见保持一致。 */
436
447
  .pepsico-pls-review-group {
437
448
  border: 1px solid #d8e2ea;