0
0
Fork 0

Merge branch 'test' into warmfix_createNewPostcodeForm

This commit is contained in:
Javier Segarra 2024-10-24 12:48:25 +00:00
commit 9a518ed990
3 changed files with 18 additions and 20 deletions

View File

@ -9,10 +9,6 @@ const $props = defineProps({
type: Number, //Progress value (1.0 > x > 0.0) type: Number, //Progress value (1.0 > x > 0.0)
required: true, required: true,
}, },
showDialog: {
type: Boolean,
required: true,
},
cancelled: { cancelled: {
type: Boolean, type: Boolean,
required: false, required: false,
@ -24,30 +20,22 @@ const emit = defineEmits(['cancel', 'close']);
const dialogRef = ref(null); const dialogRef = ref(null);
const _showDialog = computed({ const showDialog = defineModel('showDialog', {
get: () => $props.showDialog, type: Boolean,
set: (value) => { default: false,
if (value) dialogRef.value.show();
},
}); });
const _progress = computed(() => $props.progress); const _progress = computed(() => $props.progress);
const progressLabel = computed(() => `${Math.round($props.progress * 100)}%`); const progressLabel = computed(() => `${Math.round($props.progress * 100)}%`);
const cancel = () => {
dialogRef.value.hide();
emit('cancel');
};
</script> </script>
<template> <template>
<QDialog ref="dialogRef" v-model="_showDialog" @hide="onDialogHide"> <QDialog ref="dialogRef" v-model="showDialog" @hide="emit('close')">
<QCard class="full-width dialog"> <QCard class="full-width dialog">
<QCardSection class="row"> <QCardSection class="row">
<span class="text-h6">{{ t('Progress') }}</span> <span class="text-h6">{{ t('Progress') }}</span>
<QSpace /> <QSpace />
<QBtn icon="close" flat round dense @click="emit('close')" /> <QBtn icon="close" flat round dense v-close-popup />
</QCardSection> </QCardSection>
<QCardSection> <QCardSection>
<div class="column"> <div class="column">
@ -80,7 +68,7 @@ const cancel = () => {
type="button" type="button"
flat flat
class="text-primary" class="text-primary"
@click="cancel()" v-close-popup
> >
{{ t('globals.cancel') }} {{ t('globals.cancel') }}
</QBtn> </QBtn>

View File

@ -17,6 +17,11 @@ const $props = defineProps({
required: false, required: false,
default: null, default: null,
}, },
dataKey: {
type: String,
required: false,
default: 'workerData',
},
}); });
const image = ref(null); const image = ref(null);
@ -65,7 +70,7 @@ const handlePhotoUpdated = (evt = false) => {
<CardDescriptor <CardDescriptor
ref="cardDescriptorRef" ref="cardDescriptorRef"
module="Worker" module="Worker"
data-key="workerData" :data-key="dataKey"
url="Workers/descriptor" url="Workers/descriptor"
:filter="{ where: { id: entityId } }" :filter="{ where: { id: entityId } }"
title="user.nickname" title="user.nickname"

View File

@ -12,6 +12,11 @@ const $props = defineProps({
<template> <template>
<QPopupProxy> <QPopupProxy>
<WorkerDescriptor v-if="$props.id" :id="$props.id" :summary="WorkerSummary" /> <WorkerDescriptor
v-if="$props.id"
:id="$props.id"
:summary="WorkerSummary"
data-key="workerDescriptorProxy"
/>
</QPopupProxy> </QPopupProxy>
</template> </template>