diff --git a/src/pages/Account/Role/AccountRoles.vue b/src/pages/Account/Role/AccountRoles.vue index fe184688b..8e52b2196 100644 --- a/src/pages/Account/Role/AccountRoles.vue +++ b/src/pages/Account/Role/AccountRoles.vue @@ -27,7 +27,7 @@ function stateColor(code) { function navigate(event, id) { if (event.ctrlKey || event.metaKey) return window.open(`${getApiUrl()}/#/account/${id}/summary`); - router.push({ path: `/account/role/${id}` }); + router.push({ path: `/role/${id}/summary` }); } diff --git a/src/pages/Account/Role/Card/InheritedRoles.vue b/src/pages/Account/Role/Card/InheritedRoles.vue new file mode 100644 index 000000000..cfcf224c7 --- /dev/null +++ b/src/pages/Account/Role/Card/InheritedRoles.vue @@ -0,0 +1,6 @@ + + diff --git a/src/pages/Account/Role/Card/RoleDescriptor.vue b/src/pages/Account/Role/Card/RoleDescriptor.vue new file mode 100644 index 000000000..b19c1f619 --- /dev/null +++ b/src/pages/Account/Role/Card/RoleDescriptor.vue @@ -0,0 +1,151 @@ + + + + + + en: + accountRate: Claming rate + es: + accountRate: Ratio de reclamaciĆ³n + diff --git a/src/pages/Account/Role/Card/RoleLog.vue b/src/pages/Account/Role/Card/RoleLog.vue new file mode 100644 index 000000000..cfcf224c7 --- /dev/null +++ b/src/pages/Account/Role/Card/RoleLog.vue @@ -0,0 +1,6 @@ + + diff --git a/src/pages/Account/Role/Card/RoleSummary.vue b/src/pages/Account/Role/Card/RoleSummary.vue index 69f46dde8..3f8ea701b 100644 --- a/src/pages/Account/Role/Card/RoleSummary.vue +++ b/src/pages/Account/Role/Card/RoleSummary.vue @@ -27,22 +27,8 @@ const $props = defineProps({ }); const entityId = computed(() => $props.id || route.params.id); -const AccountStates = ref([]); -const accountUrl = ref(); -const salixUrl = ref(); -const accountDmsRef = ref(); -const accountDmsFilter = ref({ - include: [ - { - relation: 'dms', - }, - ], -}); -onMounted(async () => { - salixUrl.value = await getUrl(''); - accountUrl.value = salixUrl.value + `account/${entityId.value}/`; -}); +onMounted(async () => {}); const detailsColumns = ref([ { @@ -96,347 +82,20 @@ const detailsColumns = ref([ sortable: true, }, ]); - -const STATE_COLOR = { - pending: 'warning', - incomplete: 'info', - resolved: 'positive', - canceled: 'negative', -}; -function stateColor(code) { - return STATE_COLOR[code]; -} - -const developmentColumns = ref([ - { - name: 'accountReason', - label: 'account.summary.reason', - field: (row) => row.accountReason.description, - sortable: true, - }, - { - name: 'accountResult', - label: 'account.summary.result', - field: (row) => row.accountResult.description, - sortable: true, - }, - { - name: 'accountResponsible', - label: 'account.summary.responsible', - field: (row) => row.accountResponsible.description, - sortable: true, - }, - { - name: 'worker', - label: 'account.summary.worker', - field: (row) => row.worker?.user.nickname, - sortable: true, - }, - { - name: 'accountRedelivery', - label: 'account.summary.redelivery', - field: (row) => row.accountRedelivery.description, - sortable: true, - }, -]); -const accountDms = ref([]); -const multimediaDialog = ref(); -const multimediaSlide = ref(); - -async function getAccountDms() { - accountDmsFilter.value.where = { accountFk: entityId.value }; - await accountDmsRef.value.fetch(); -} - -function setAccountDms(data) { - accountDms.value = []; - data.forEach((media) => { - accountDms.value.push({ - isVideo: media.dms.contentType == 'video/mp4', - url: `/api/Accounts/${media.dmsFk}/downloadFile?access_token=${token}`, - dmsFk: media.dmsFk, - }); - }); -} - -function openDialog(dmsId) { - multimediaSlide.value = dmsId; - multimediaDialog.value = true; -} -async function changeState(value) { - await axios.patch(`Accounts/updateAccount/${entityId.value}`, { - accountStateFk: value, - }); - router.go(route.fullPath); -}