Dev branch
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
import AppLayout from '@/Layouts/AppLayout.vue'
|
||||
import SectionTitle from '@/Components/SectionTitle.vue'
|
||||
import PrimaryButton from '@/Components/PrimaryButton.vue'
|
||||
import DialogModal from '@/Components/DialogModal.vue'
|
||||
import CreateDialog from '@/Components/Dialogs/CreateDialog.vue'
|
||||
import UpdateDialog from '@/Components/Dialogs/UpdateDialog.vue'
|
||||
import ConfirmationModal from '@/Components/ConfirmationModal.vue'
|
||||
import InputLabel from '@/Components/InputLabel.vue'
|
||||
import InputError from '@/Components/InputError.vue'
|
||||
@@ -97,10 +98,16 @@ const destroyConfig = () => {
|
||||
</div>
|
||||
|
||||
<!-- create modal -->
|
||||
<DialogModal :show="showCreate" @close="closeCreate">
|
||||
<template #title>New Contract Configuration</template>
|
||||
<template #content>
|
||||
<div class="space-y-4">
|
||||
<CreateDialog
|
||||
:show="showCreate"
|
||||
title="New Contract Configuration"
|
||||
confirm-text="Create"
|
||||
:processing="createForm.processing"
|
||||
:disabled="!createForm.contract_type_id || !createForm.segment_id"
|
||||
@close="closeCreate"
|
||||
@confirm="submitCreate"
|
||||
>
|
||||
<div class="space-y-4">
|
||||
<div>
|
||||
<InputLabel for="type">Contract Type</InputLabel>
|
||||
<select id="type" v-model="createForm.contract_type_id" class="mt-1 w-full rounded border-gray-300 focus:border-indigo-500 focus:ring-indigo-500">
|
||||
@@ -121,19 +128,20 @@ const destroyConfig = () => {
|
||||
<label for="is_initial" class="text-sm text-gray-700">Mark as initial</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #footer>
|
||||
<button class="px-4 py-2 rounded bg-gray-200" @click="closeCreate">Cancel</button>
|
||||
<PrimaryButton class="ml-2" :disabled="createForm.processing || !createForm.contract_type_id || !createForm.segment_id" @click="submitCreate">Create</PrimaryButton>
|
||||
</template>
|
||||
</DialogModal>
|
||||
</div>
|
||||
</CreateDialog>
|
||||
|
||||
<!-- simple inline edit dialog -->
|
||||
<DialogModal :show="!!editing" @close="closeEdit">
|
||||
<template #title>Edit Configuration</template>
|
||||
<template #content>
|
||||
<div class="space-y-4">
|
||||
<UpdateDialog
|
||||
:show="!!editing"
|
||||
title="Edit Configuration"
|
||||
confirm-text="Save"
|
||||
:processing="editForm.processing"
|
||||
:disabled="!editForm.segment_id"
|
||||
@close="closeEdit"
|
||||
@confirm="submitEdit"
|
||||
>
|
||||
<div class="space-y-4">
|
||||
<div>
|
||||
<InputLabel>Segment</InputLabel>
|
||||
<select v-model="editForm.segment_id" class="mt-1 w-full rounded border-gray-300 focus:border-indigo-500 focus:ring-indigo-500">
|
||||
@@ -149,13 +157,8 @@ const destroyConfig = () => {
|
||||
<input id="active" type="checkbox" v-model="editForm.active" class="rounded border-gray-300 text-indigo-600 focus:ring-indigo-500">
|
||||
<label for="active" class="text-sm text-gray-700">Active</label>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #footer>
|
||||
<button class="px-4 py-2 rounded bg-gray-200" @click="closeEdit">Cancel</button>
|
||||
<PrimaryButton class="ml-2" :disabled="editForm.processing || !editForm.segment_id" @click="submitEdit">Save</PrimaryButton>
|
||||
</template>
|
||||
</DialogModal>
|
||||
</div>
|
||||
</UpdateDialog>
|
||||
</AppLayout>
|
||||
<ConfirmationModal :show="showDelete" @close="cancelDelete">
|
||||
<template #title>
|
||||
|
||||
Reference in New Issue
Block a user