Skip to content

Commit

Permalink
Revert other organizations change (#1301)
Browse files Browse the repository at this point in the history
  • Loading branch information
tabiodun authored Nov 17, 2024
1 parent 4f87967 commit 235f006
Showing 1 changed file with 66 additions and 83 deletions.
149 changes: 66 additions & 83 deletions src/pages/OtherOrganizations.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
ref="table"
:columns="columns"
:url="tableUrl"
:body-style="{ height: '40rem' }"
:body-style="{ height: '' }"
data-testid="testOrganizationsDataTable"
class="bg-white border"
:query="{
Expand All @@ -49,23 +49,6 @@
fields: 'id,name,url,facebook,twitter,type_t',
}"
>
<template #overdue_count="slotProps">
<base-button
class="text-primary-dark underline"
:action="
() => {
$router.push(
`/incident/${currentIncidentId}/work?showTable=true&work_type__claimed_by=${
slotProps.item.id
}&work_type__status__in=${getOpenStatuses()}&created_at__lte=${getCreatedAtLteFilter()}`,
);
}
"
>
{{ slotProps.item.overdue_count || 0 }}
</base-button>
</template>

<template #url="slotProps">
<base-button
class="text-primary-dark underline sm:ml-0 ml-1"
Expand Down Expand Up @@ -159,7 +142,7 @@ export default defineComponent({
const store = useStore();
const ccuApi = useApi();
const { t, locale } = useI18n();
const tableUrl = '/other_organizations';
const tableUrl = import.meta.env.VITE_APP_API_BASE_URL + '/organizations';
const loading = ref(false);
const table = ref(null);
Expand Down Expand Up @@ -217,70 +200,70 @@ export default defineComponent({
sortable: false,
width: '1fr',
},
{
title: t('otherOrganizations.incidents'),
dataIndex: 'incident_count',
key: 'incident_count',
// sortable: true,
transformer(item: number) {
return item || 0;
},
class: 'justify-center',
headerClass: 'justify-center',
},
{
title: t('otherOrganizations.cases_reported'),
dataIndex: 'reported_count',
key: 'reported_count',
sortable: true,
transformer(item: number) {
return item || 0;
},
class: 'justify-center',
headerClass: 'justify-center',
},
{
title: t('otherOrganizations.cases_claimed'),
dataIndex: 'claimed_count',
key: 'claimed_count',
// sortable: true,
transformer(item: number) {
return item || 0;
},
class: 'justify-center',
headerClass: 'justify-center',
},
{
title: t('otherOrganizations.cases_closed'),
dataIndex: 'closed_count',
key: 'closed_count',
// sortable: true,
transformer(item: number) {
return item || 0;
},
class: 'justify-center',
headerClass: 'justify-center',
},
{
title: t('otherOrganizations.cases_overdue'),
dataIndex: 'overdue_count',
key: 'overdue_count',
// sortable: true,
class: 'justify-center',
headerClass: 'justify-center',
},
{
title: t('otherOrganizations.last_login'),
dataIndex: 'last_login',
key: 'last_login',
// sortable: true,
class: 'justify-center',
headerClass: 'justify-center',
width: '150px',
transformer(item: Date) {
return moment(item).fromNow();
},
},
// {
// title: t('otherOrganizations.incidents'),
// dataIndex: 'incident_count',
// key: 'incident_count',
// sortable: true,
// transformer(item: number) {
// return item || 0;
// },
// class: 'justify-center',
// headerClass: 'justify-center',
// },
// {
// title: t('otherOrganizations.cases_reported'),
// dataIndex: 'reported_count',
// key: 'reported_count',
// sortable: true,
// transformer(item: number) {
// return item || 0;
// },
// class: 'justify-center',
// headerClass: 'justify-center',
// },
// {
// title: t('otherOrganizations.cases_claimed'),
// dataIndex: 'claimed_count',
// key: 'claimed_count',
// sortable: true,
// transformer(item: number) {
// return item || 0;
// },
// class: 'justify-center',
// headerClass: 'justify-center',
// },
// {
// title: t('otherOrganizations.cases_closed'),
// dataIndex: 'closed_count',
// key: 'closed_count',
// sortable: true,
// transformer(item: number) {
// return item || 0;
// },
// class: 'justify-center',
// headerClass: 'justify-center',
// },
// {
// title: t('otherOrganizations.cases_overdue'),
// dataIndex: 'overdue_count',
// key: 'overdue_count',
// sortable: true,
// class: 'justify-center',
// headerClass: 'justify-center',
// },
// {
// title: t('otherOrganizations.last_login'),
// dataIndex: 'last_login',
// key: 'last_login',
// sortable: true,
// class: 'justify-center',
// headerClass: 'justify-center',
// width: '150px',
// transformer(item: Date) {
// return moment(item).fromNow();
// },
// },
]);
onMounted(async () => {
Expand Down

0 comments on commit 235f006

Please sign in to comment.