Changes in isHimSelf computed and FormPopup buttons order
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
William Buezas 2024-04-05 08:57:25 -03:00
parent 580af396d1
commit 52611beaf1
3 changed files with 11 additions and 11 deletions

View File

@ -56,14 +56,6 @@ const closeForm = () => {
<p>{{ subtitle }}</p> <p>{{ subtitle }}</p>
<slot name="form-inputs" /> <slot name="form-inputs" />
<div class="q-mt-lg row justify-end"> <div class="q-mt-lg row justify-end">
<QBtn
v-if="defaultSubmitButton"
:label="customSubmitButtonLabel || t('globals.save')"
type="submit"
color="primary"
:disabled="isLoading"
:loading="isLoading"
/>
<QBtn <QBtn
v-if="defaultCancelButton" v-if="defaultCancelButton"
:label="t('globals.cancel')" :label="t('globals.cancel')"
@ -74,6 +66,14 @@ const closeForm = () => {
:loading="isLoading" :loading="isLoading"
v-close-popup v-close-popup
/> />
<QBtn
v-if="defaultSubmitButton"
:label="customSubmitButtonLabel || t('globals.save')"
type="submit"
color="primary"
:disabled="isLoading"
:loading="isLoading"
/>
<slot name="customButtons" /> <slot name="customButtons" />
</div> </div>
</QCard> </QCard>

View File

@ -64,7 +64,7 @@ const worker = computed(() => arrayData.store?.data);
const isHr = computed(() => hasAny(['hr'])); const isHr = computed(() => hasAny(['hr']));
const isHimSelf = computed(() => user.value.id == route.params.id); const isHimSelf = computed(() => user.value.id === Number(route.params.id));
const columns = computed(() => { const columns = computed(() => {
return weekdayStore.getLocales?.map((day, index) => { return weekdayStore.getLocales?.map((day, index) => {

View File

@ -9,7 +9,7 @@ const $props = defineProps({
type: String, type: String,
default: '', default: '',
}, },
isHimself: { isHimSelf: {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
@ -40,7 +40,7 @@ const closeForm = () => {
v-model="reasonFormData" v-model="reasonFormData"
type="textarea" type="textarea"
autogrow autogrow
:disable="!isHimself" :disable="!isHimSelf"
/> />
</template> </template>
</FormPopup> </FormPopup>