Skip to content

Commit 8fd7a7d

Browse files
committed
Merge branch 'release-2024-fall' of github.com:ProcessMaker/processmaker into bugfix/FOUR-19987
2 parents 05b136a + 7bc3f3a commit 8fd7a7d

File tree

5 files changed

+38
-18
lines changed

5 files changed

+38
-18
lines changed

resources/js/admin/devlink/components/BundleAssets.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ const computedFields = computed(() => {
5050
return fields.filter(field => field.key !== 'menu');
5151
});
5252
53+
const isLocal = computed(() => {
54+
return bundle.value.dev_link_id === null;
55+
});
56+
5357
const loadAssets = async () => {
5458
loading.value = true;
5559
const response = await window.ProcessMaker.apiClient.get(`/api/1.0/devlink/local-bundles/${bundleId}`);
@@ -126,6 +130,7 @@ const remove = async (asset) => {
126130
>
127131
<template #cell(name)="data">
128132
<a :href="data.item.url" target="_blank">{{ data.item.name }}</a>
133+
<i v-if="!isLocal" class="ml-2 fa fa-lock"></i>
129134
</template>
130135

131136
<template #cell(menu)="data">

resources/js/admin/devlink/components/Instance.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ const load = () => {
6666
ProcessMaker.apiClient
6767
.get(`/devlink/${route.params.id}/remote-bundles?filter=${filter.value}`)
6868
.then((result) => {
69-
bundles.value = result.data.data;
69+
bundles.value = result.data.data.filter(bundle =>{
70+
// Do not show remote bundles
71+
return bundle.dev_link_id === null;
72+
});
7073
loading.value = false;
7174
});
7275
};

resources/jscomposition/base/table/BaseTable.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
:class="{
99
'tw-table-fixed':getDefaultConfig(config).tableFixed
1010
}">
11-
<thead class="tw-border-b tw-sticky tw-top-0 tw-z-10 tw-bg-gray-100">
11+
<thead class="tw-border-b tw-sticky tw-top-0 tw-z-[9] tw-bg-gray-100">
1212
<tr>
1313
<THeader
1414
v-for="(column, index) in columns"

resources/jscomposition/cases/casesMain/config/columns.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ export const taskColumn = () => ({
8686
params: {
8787
href: (option) => `/tasks/${option.id}/edit`,
8888
formatterOptions: (option, row, column, columns) => option.name,
89+
filterData: (row, column, columns) => {
90+
if (row.case_status === "COMPLETED") {
91+
return [];
92+
}
93+
return row.tasks.filter((el) => el.status === "ACTIVE");
94+
},
8995
},
9096
}),
9197
});

resources/jscomposition/system/table/cell/TruncatedOptionsCell.vue

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
<template>
22
<div class="tw-flex tw-relative tw-text-nowrap tw-whitespace-nowrap tw-p-3">
3-
<div class="tw-overflow-hidden tw-text-ellipsis ">
3+
<div
4+
v-if="optionsModel.length"
5+
class="tw-overflow-hidden tw-text-ellipsis">
46
<a
57
v-if="href !== null"
68
class="hover:tw-text-blue-400 tw-text-gray-500"
7-
:href="href(row[column.field][0])"
9+
:href="href(optionsModel[0])"
810
>
9-
{{ getValue() }}
11+
{{ getValueOption(optionsModel[0], 0) }}
1012
</a>
1113
<span
1214
v-else
1315
class="hover:tw-text-blue-400 tw-text-gray-500 hover:tw-cursor-pointer"
1416
href="#"
15-
@click.prevent.stop="onClickOption(row[column.field][0], 0)"
17+
@click.prevent.stop="onClickOption(optionsModel[0], 0)"
1618
>
17-
{{ getValue() }}
19+
{{ getValueOption(optionsModel[0], 0) }}
1820
</span>
1921
</div>
2022
<AppPopover
@@ -43,7 +45,7 @@
4345
>
4446
<a
4547
v-if="href !== null"
46-
class="tw-flex tw-py-2 tw-px-4 transition duration-300 hover:tw-bg-gray-200"
48+
class="tw-flex tw-py-2 tw-px-4 transition duration-300 tw-text-gray-500 hover:tw-bg-gray-200 hover:tw-text-blue-400"
4749
:href="href(option)"
4850
>
4951
{{ getValueOption(option, index) }}
@@ -63,7 +65,7 @@
6365
</div>
6466
</template>
6567
<script>
66-
import { defineComponent, ref } from "vue";
68+
import { defineComponent, ref, onMounted } from "vue";
6769
import { isFunction } from "lodash";
6870
import { AppPopover } from "../../../base/index";
6971
@@ -96,19 +98,17 @@ export default defineComponent({
9698
type: Function,
9799
default: null,
98100
},
101+
// Filter Data, method to filter the input data
102+
filterData: {
103+
type: Function,
104+
default: null,
105+
},
99106
},
100107
setup(props) {
101108
const show = ref(false);
102109
const optionsModel = ref(props.row[props.column.field]);
103110
104-
const getValue = () => {
105-
if (isFunction(props.column?.formatter)) {
106-
return props.column?.formatter(props.row, props.column, props.columns);
107-
}
108-
return props.row[props.column.field].length ? props.row[props.column.field][0].name : "";
109-
};
110-
111-
const getValueOption = (option, index) => {
111+
const getValueOption = (option) => {
112112
if (isFunction(props.formatterOptions)) {
113113
return props.formatterOptions(option, props.row, props.column, props.columns);
114114
}
@@ -127,13 +127,19 @@ export default defineComponent({
127127
show.value = false;
128128
};
129129
130+
onMounted(() => {
131+
// Filter the data before render
132+
if (props.filterData) {
133+
optionsModel.value = props.filterData(props.row, props.column, props.columns);
134+
}
135+
});
136+
130137
return {
131138
show,
132139
optionsModel,
133140
onClose,
134141
onClickOption,
135142
onClick,
136-
getValue,
137143
getValueOption,
138144
};
139145
},

0 commit comments

Comments
 (0)