Add shared dialog
This commit is contained in:
@@ -28,32 +28,8 @@
|
||||
</template>
|
||||
|
||||
<template v-slot:item="props">
|
||||
<div class="q-pa-sm">
|
||||
<q-card :class="['domain-card', isNotOwner(props.row.id) ? 'bg-grey-2': '']">
|
||||
<q-card-section>
|
||||
<div class="row items-center no-wrap">
|
||||
<div class="col">
|
||||
<div class="text-h6">{{ props.row.name }}</div>
|
||||
<div class="text-subtitle2">{{ props.row.url }}</div>
|
||||
</div>
|
||||
<div v-if="isNotOwner(props.row.id)" class="col-auto">
|
||||
<q-icon name="account_circle" color="teal" size="2em" ></q-icon>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-card-section>
|
||||
<div class="row items-center no-wrap">
|
||||
<div class="col">
|
||||
<div class="text-grey-7 text-caption text-weight-medium">アカウント</div>
|
||||
<div class="smaller-font-size">{{ props.row.kintoneuser }}</div>
|
||||
</div>
|
||||
<div v-if="isNotOwner(props.row.id)" class="col-auto">
|
||||
<div class="text-grey-7 text-caption text-weight-medium">所有者</div>
|
||||
<div class="smaller-font-size">{{ props.row.owner }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-separator />
|
||||
<domain-card :item="props.row" :isNotOwnerFunc="isNotOwner">
|
||||
<template v-slot:actions>
|
||||
<q-card-actions align="right">
|
||||
<q-chip v-if="isActive(props.row.id)" outline color="teal" text-color="white" icon="done">
|
||||
既定
|
||||
@@ -61,8 +37,8 @@
|
||||
<q-btn flat v-else :loading="activeDomainLoadingId === props.row.id" :disable="deleteDomainLoadingId === props.row.id" @click="activeDomain(props.row)">既定にする</q-btn>
|
||||
<q-btn flat :disable="isNotOwner(props.row.id) || activeDomainLoadingId === props.row.id" :text-color="isNotOwner(props.row.id)?'grey':''" :loading="deleteDomainLoadingId === props.row.id" @click="clickDeleteConfirm(props.row)">削除</q-btn>
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
</div>
|
||||
</template>
|
||||
</domain-card>
|
||||
</template>
|
||||
</q-table>
|
||||
|
||||
@@ -94,6 +70,7 @@ import { api } from 'boot/axios';
|
||||
import { useAuthStore } from 'stores/useAuthStore';
|
||||
|
||||
import ShowDialog from 'components/ShowDialog.vue';
|
||||
import DomainCard from 'components/UserDomain/DomainCard.vue';
|
||||
import DomainSelect from 'components/DomainSelect.vue';
|
||||
|
||||
const authStore = useAuthStore();
|
||||
@@ -129,9 +106,9 @@ const clickAddDomain = () => {
|
||||
|
||||
const addUserDomainFinished = async (val: string) => {
|
||||
showAddDomainDg.value = true;
|
||||
addUserDomainLoading.value = true;
|
||||
const selected = addDomainRef.value.selected;
|
||||
if (val == 'OK' && selected.length > 0) {
|
||||
addUserDomainLoading.value = true;
|
||||
const { data } = await api.post(`api/domain/${authStore.userId}?domainid=${selected[0].id}`)
|
||||
if (rows.value.length === 0 && data.data) {
|
||||
const domain = data.data;
|
||||
@@ -142,9 +119,9 @@ const addUserDomainFinished = async (val: string) => {
|
||||
});
|
||||
}
|
||||
await getDomain();
|
||||
addUserDomainLoading.value = false;
|
||||
showAddDomainDg.value = false;
|
||||
}
|
||||
addUserDomainLoading.value = false;
|
||||
showAddDomainDg.value = false;
|
||||
};
|
||||
|
||||
const showDeleteConfirm = ref(false);
|
||||
|
||||
Reference in New Issue
Block a user