@@ -168,12 +162,14 @@ import { FormInput, FormTextArea } from "@processmaker/vue-form-elements";
import MonacoEditor from "vue-monaco";
import Validator from "@chantouchsek/validatorjs";
import FocusErrors from "../mixins/focusErrors";
+import Sortable from './sortable/Sortable.vue';
export default {
components: {
FormInput,
FormTextArea,
- MonacoEditor
+ MonacoEditor,
+ Sortable,
},
mixins: [FocusErrors],
props: ["value"],
@@ -208,18 +204,13 @@ export default {
},
fields: [
{
- label: this.$t("Property Name"),
- key: "property"
+ label: this.$t("Name"),
+ key: "property",
},
{
- label: this.$t("Description"),
- key: "name"
+ label: this.$t("Type"),
+ key: "type",
},
- {
- key: "__actions",
- label: "",
- class: "text-right"
- }
],
monacoOptions: {
automaticLayout: true,
@@ -258,9 +249,14 @@ export default {
this.value.forEach((item) => {
this.numberItem++;
item.id = this.numberItem;
+
+ if (!Object.hasOwn(item, 'byPass')) {
+ item.byPass = false;
+ }
});
+
this.current = this.value;
- }
+ },
},
created() {
Validator.register(
@@ -334,6 +330,13 @@ export default {
this.focusFirstCalculatedPropertiesError();
}
},
+ toggleBypass(itemId) {
+ this.current = this.current.map((item) =>
+ item.id === itemId ? { ...item, byPass: !item.byPass } : item,
+ );
+
+ this.$emit("input", this.current);
+ },
saveProperty() {
if (this.add.id === 0) {
this.numberItem++;
@@ -342,7 +345,8 @@ export default {
property: this.add.property,
name: this.add.name,
formula: this.add.formula,
- type: this.add.type
+ type: this.add.type,
+ byPass: false,
});
} else {
this.current.forEach((item) => {
@@ -400,4 +404,16 @@ export default {
.editor-border.is-invalid {
border-color: #dc3545;
}
+
+.bypass-btn-tooltip::v-deep {
+ & .tooltip-inner {
+ background-color: #EBEEF2 !important;
+ color: #444444 !important;
+ }
+
+ & .arrow:before {
+ border-top-color: #EBEEF2 !important;
+ border-bottom-color: #EBEEF2 !important;
+ }
+}
diff --git a/src/components/sortable/Sortable.vue b/src/components/sortable/Sortable.vue
index 87ae15a9c..d78a621e1 100644
--- a/src/components/sortable/Sortable.vue
+++ b/src/components/sortable/Sortable.vue
@@ -15,6 +15,7 @@
+ >
+
+
+
+