@steedos-labs/plugin-workflow 3.0.0-beta.20 → 3.0.0-beta.22

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.
@@ -553,7 +553,7 @@ pushManager.checkMailFromNameLength = function (name) {
553
553
  };
554
554
 
555
555
  // TODO 手机推送
556
- pushManager.send_message_by_raix_push = async function (data) {
556
+ pushManager.send_message_by_raix_push = async function (data, lang) {
557
557
  if (process.env.STEEDOS_DEBUG_DISABLE_PUSHMANAGER || !data["data"]) {
558
558
  return;
559
559
  }
@@ -590,7 +590,7 @@ pushManager.send_message_by_raix_push = async function (data) {
590
590
  }
591
591
  let notificationDoc = {
592
592
  name: notification.text,
593
- body: '审批',
593
+ body: t('CustomLabels.approval_workflow', {}, lang),
594
594
  related_to: {
595
595
  o: "instances",
596
596
  ids: [notification.payload?.instance]
@@ -631,7 +631,7 @@ pushManager.send_message_by_raix_push = async function (data) {
631
631
  };
632
632
 
633
633
  //steedos_ids 必须为数组 ; body 如果有,则必须为Hash
634
- pushManager.send_message = function (steedos_ids, body) {
634
+ pushManager.send_message = function (steedos_ids, body, current_user_info, lang) {
635
635
  if (process.env.STEEDOS_DEBUG_DISABLE_PUSHMANAGER) {
636
636
  return;
637
637
  }
@@ -651,7 +651,7 @@ pushManager.send_message = function (steedos_ids, body) {
651
651
  data.data = body;
652
652
  }
653
653
 
654
- pushManager.send_message_by_raix_push(data);
654
+ pushManager.send_message_by_raix_push(data, lang);
655
655
  };
656
656
 
657
657
  // TODO处理发送手机短信
@@ -780,7 +780,7 @@ pushManager.send_instance_notification = async function (send_from, instance, de
780
780
  await pushManager.send_email_to_SMTP(title.email, content, to_user, from_user);
781
781
 
782
782
  // Send Push Notification
783
- await pushManager.send_message([to_user.steedos_id], push_body, current_user_info);
783
+ await pushManager.send_message([to_user.steedos_id], push_body, current_user_info, lang);
784
784
 
785
785
  // Send SMS
786
786
  if (['reassign_new_inbox_users', 'submit_pending_rejected_applicant_inbox', 'submit_pending_rejected_inbox', 'submit_pending_inbox', 'first_submit_inbox', 'return_pending_inbox'].includes(send_from)) {
@@ -37,6 +37,19 @@ fields:
37
37
  readonly: true
38
38
  name: style
39
39
  filterable: true
40
+ mode:
41
+ type: select
42
+ label: Mode
43
+ options:
44
+ - label: Normal
45
+ value: normal
46
+ - label: Horizontal
47
+ value: horizontal
48
+ - label: Inline
49
+ value: inline
50
+ readonly: true
51
+ name: style
52
+ filterable: true
40
53
  description:
41
54
  type: textarea
42
55
  label: Description
@@ -20,11 +20,11 @@ amis_schema: |-
20
20
  "actionType": "dialog",
21
21
  "dialog": {
22
22
  "type": "dialog",
23
- "title": "系统消息",
23
+ "title": "${'CustomLabels.alert_info' | t}",
24
24
  "body": [
25
25
  {
26
26
  "type": "tpl",
27
- "tpl": "确认要删除吗?",
27
+ "tpl": "${'CustomLabels.confirm_delete' | t}",
28
28
  "wrapperComponent": "",
29
29
  "inline": false,
30
30
  "id": "u:0c42a6d112aa"
@@ -38,7 +38,7 @@ amis_schema: |-
38
38
  "actions": [
39
39
  {
40
40
  "type": "button",
41
- "label": "取消",
41
+ "label": "${'Cancel' | t}",
42
42
  "onEvent": {
43
43
  "click": {
44
44
  "actions": [
@@ -53,7 +53,7 @@ amis_schema: |-
53
53
  },
54
54
  {
55
55
  "type": "button",
56
- "label": "确认",
56
+ "label": "${'OK' | t}",
57
57
  "onEvent": {
58
58
  "click": {
59
59
  "actions": [
@@ -1,6 +1,7 @@
1
1
  CustomApplications:
2
2
  approve_workflow:
3
- name: Approval Workflow
4
- description:
3
+ name: Approval
4
+ description: Provide a graphical form and process design interface to customize the enterprise business approval process.
5
5
  CustomLabels:
6
+ approval_workflow: Workflow
6
7
  flows_tabs_form: Form
@@ -1,2 +1,3 @@
1
1
  CustomLabels:
2
- flows_tabs_form: 表单
2
+ flows_tabs_form: 表单
3
+ approval_workflow: 审批
@@ -525,7 +525,9 @@ module.exports = {
525
525
  form.current.fields = getFinalFormFields(inputFields);
526
526
  form.current.amis_schema = amis_schema;
527
527
  form.current.style = formSchema.style;
528
+ form.current.mode = formSchema.mode;
528
529
  form.style = formSchema.style;
530
+ form.mode = formSchema.mode;
529
531
  form.description = formSchema.description;
530
532
 
531
533
  // 以下为将解析字段存储的功能,为将解析字段存储至数据库forms表的功能
@@ -222,6 +222,7 @@ async function updateForm(formId, form, forms, flows, currentUserId) {
222
222
  current.form_script = form["current"]["form_script"];
223
223
  current.name_forumla = form["current"]["name_forumla"];
224
224
  current.style = form["current"]["style"];
225
+ current.mode = form["current"]["mode"];
225
226
 
226
227
  formUpdateObj.$set = {
227
228
  'current': current,
@@ -230,6 +231,7 @@ async function updateForm(formId, form, forms, flows, currentUserId) {
230
231
  'modified_by': currentUserId,
231
232
  'is_valid': form["is_valid"],
232
233
  'style': form["style"],
234
+ 'mode': form["mode"],
233
235
  'description': form["description"],
234
236
  'help_text': form["help_text"],
235
237
  'error_message': form["error_message"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos-labs/plugin-workflow",
3
- "version": "3.0.0-beta.20",
3
+ "version": "3.0.0-beta.22",
4
4
  "main": "package.service.js",
5
5
  "license": "MIT",
6
6
  "scripts": {