refs #4834 @1h add workerDescriptorPopover
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
This commit is contained in:
parent
cd5bd180af
commit
0084b354d6
|
@ -0,0 +1,21 @@
|
||||||
|
<script setup>
|
||||||
|
import { useDialogPluginComponent } from 'quasar';
|
||||||
|
import workerDescriptor from './WorkerDescriptor.vue';
|
||||||
|
|
||||||
|
const $props = defineProps({
|
||||||
|
id: {
|
||||||
|
type: Number,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
defineEmits([...useDialogPluginComponent.emits]);
|
||||||
|
|
||||||
|
const { dialogRef, onDialogHide } = useDialogPluginComponent();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<q-dialog ref="dialogRef" @hide="onDialogHide">
|
||||||
|
<worker-descriptor v-if="$props.id" :id="$props.id" />
|
||||||
|
</q-dialog>
|
||||||
|
</template>
|
|
@ -2,12 +2,15 @@
|
||||||
import { ref, onMounted, computed } from 'vue';
|
import { ref, onMounted, computed } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { useQuasar } from 'quasar';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
import workerDescriptorDialog from './WorkerDescriptorDialog.vue';
|
||||||
|
|
||||||
onMounted(() => fetch());
|
onMounted(() => fetch());
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const quasar = useQuasar();
|
||||||
|
|
||||||
t == t;
|
t == t;
|
||||||
|
|
||||||
|
@ -70,6 +73,15 @@ function sipExtension() {
|
||||||
if (worker.value.sip) return worker.value.sip.extension;
|
if (worker.value.sip) return worker.value.sip.extension;
|
||||||
return '-';
|
return '-';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function openDescriptorDialog(id) {
|
||||||
|
quasar.dialog({
|
||||||
|
component: workerDescriptorDialog,
|
||||||
|
componentProps: {
|
||||||
|
id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -120,22 +132,16 @@ function sipExtension() {
|
||||||
<q-item-label>{{ worker.user.email }}</q-item-label>
|
<q-item-label>{{ worker.user.email }}</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item>
|
<q-item class="items-start cursor-pointer q-hoverable" v-if="worker.boss">
|
||||||
<q-item-section side>
|
<q-item-section side @click="openDescriptorDialog(worker.bossFk)">
|
||||||
<q-icon name="person" />
|
<q-icon name="person" />
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section>
|
<q-item-section @click="openDescriptorDialog(worker.bossFk)">
|
||||||
<q-item-label caption>{{ t('worker.summary.boss') }} </q-item-label>
|
<q-item-label caption>{{ t('worker.summary.boss') }} </q-item-label>
|
||||||
<q-item-label>
|
<q-item-label>
|
||||||
<router-link
|
<a>
|
||||||
v-if="worker.boss"
|
{{ worker.boss.name }}
|
||||||
:to="{ name: 'WorkerSummary', params: { id: worker.boss.id } }"
|
</a>
|
||||||
target="_blank"
|
|
||||||
>
|
|
||||||
{{ worker.boss.name == '' ? t('worker.summary.noBoss') : worker.boss.name }}
|
|
||||||
|
|
||||||
<q-icon name="open_in_new" />
|
|
||||||
</router-link>
|
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|
Loading…
Reference in New Issue