7383-testToMaster #370

Merged
alexm merged 365 commits from 7383-testToMaster into master 2024-05-14 05:46:56 +00:00
2 changed files with 13 additions and 4 deletions
Showing only changes of commit 026588c03d - Show all commits

View File

@ -49,7 +49,8 @@ const weekTotalHours = ref(null);
const workerTimeControlMails = ref([]);
const workerTimeFormProps = reactive({
dated: null,
formType: null,
entryId: null,
entryCode: null,
});
// Array utilizado por QCalendar para seleccionar un rango de fechas
@ -357,7 +358,8 @@ const getMailStates = async (date) => {
const showWorkerTimeForm = (propValue, formType) => {
const isEditForm = formType === 'edit';
workerTimeFormProps.entryId = isEditForm ? propValue : null;
workerTimeFormProps.entryId = isEditForm ? propValue.id : null;
workerTimeFormProps.entryCode = isEditForm ? propValue.entryCode : null;
workerTimeFormProps.dated = isEditForm ? null : propValue;
workerTimeFormDialogRef.value.show();
@ -556,7 +558,10 @@ onMounted(async () => {
:id="hour.id"
@on-hour-entry-deleted="updateData()"
@show-worker-time-form="
showWorkerTimeForm(hour.id, 'edit')
showWorkerTimeForm(
{ id: hour.id, entryCode: hour.direction },
'edit'
)
"
class="hour-chip"
/>

View File

@ -12,6 +12,10 @@ const $props = defineProps({
type: Number,
default: null,
},
entryCode: {
type: String,
default: null,
},
dated: {
type: Date,
default: true,
@ -54,7 +58,7 @@ const urlCreate = computed(() =>
onBeforeMount(() => {
workerHourEntry = isEditMode.value
? {}
? { direction: $props.entryCode }
: {
timed: new Date($props.dated),
workerFk: route.params.id,