Skip to content

Commit 464e2de

Browse files
authored
Merge pull request #8536 from ProcessMaker/feature/FOUR-26661
FOUR-26661: Implement cases list compoment in the Application Dashboard
2 parents e9512b5 + fdecec4 commit 464e2de

File tree

2 files changed

+27
-32
lines changed

2 files changed

+27
-32
lines changed

resources/js/components/shared/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ import Recommendations from "../../components/Recommendations.vue"
6060
import ProgressLoader from "../common/ProgressLoader.vue";
6161
import AddToBundle from "./AddToBundle.vue";
6262

63+
export * from "../../../jscomposition/base/table/index";
64+
export * from "../../../jscomposition/system/index";
65+
6366
export {
6467
AddToProjectModal,
6568
BasicSearch,
Lines changed: 24 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<template>
22
<div class="tw-flex tw-justify-left">
3-
<span
4-
:class="`tw-inline-flex tw-items-center tw-text-xs tw-border-1 tw-rounded-lg
3+
<span :class="`tw-inline-flex tw-items-center tw-text-xs tw-border-1 tw-rounded-lg
54
tw-bg-${color}-100 tw-px-2 tw-py-1 tw-text-${color}-500`">
65
{{ label }}
76
</span>
87
</div>
98
</template>
10-
<script>
11-
import { defineComponent, computed } from "vue";
9+
<script setup>
10+
import { computed } from "vue";
1211
import { t } from "i18next";
12+
import { get } from "lodash";
1313
14-
export const statuses = {
14+
const statuses = {
1515
DRAFT: {
1616
color: "red",
1717
label: `${t("Draft")}`,
@@ -46,34 +46,26 @@ export const statuses = {
4646
},
4747
};
4848
49-
export default defineComponent({
50-
props: {
51-
columns: {
52-
type: Array,
53-
default: () => [],
54-
},
55-
column: {
56-
type: Object,
57-
default: () => ({}),
58-
},
59-
row: {
60-
type: Object,
61-
default: () => ({}),
62-
},
49+
const props = defineProps({
50+
columns: {
51+
type: Array,
52+
default: () => [],
6353
},
64-
setup(props, { emit }) {
65-
const color = computed(() => (
66-
statuses[props.row[props.column.field]].color || statuses.IN_PROGRESS.color
67-
));
68-
69-
const label = computed(() => (
70-
statuses[props.row[props.column.field]].label || statuses.IN_PROGRESS.label
71-
));
72-
73-
return {
74-
color,
75-
label,
76-
};
54+
column: {
55+
type: Object,
56+
default: () => ({}),
57+
},
58+
row: {
59+
type: Object,
60+
default: () => ({}),
7761
},
7862
});
63+
64+
const color = computed(() => (
65+
statuses[get(props.row, props.column.field)].color || statuses.IN_PROGRESS.color
66+
));
67+
68+
const label = computed(() => (
69+
statuses[get(props.row, props.column.field)].label || statuses.IN_PROGRESS.label
70+
));
7971
</script>

0 commit comments

Comments
 (0)