Merge branch 'oat_dev' into develop

This commit is contained in:
oat 2024-02-02 14:43:53 +07:00
commit 5465b33de1
7 changed files with 6 additions and 247 deletions

View file

@ -57,24 +57,12 @@ const columns = ref<QTableProps["columns"]>([
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "isActive",
align: "left",
label: "สถานะ",
sortable: true,
field: "isActive",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
]);
const $q = useQuasar();
const filterKeyword = ref<string>("");
const dialog = ref<boolean>(false);
const isActive = ref<boolean>(false);
const prefix = ref<string>("");
const prefixRef = ref<any>(null);
const dialogStatus = ref<string>("");
@ -84,7 +72,6 @@ const visibleColumns = ref<string[]>([
"createdAt",
"lastUpdatedAt",
"lastUpdateFullName",
"isActive",
]);
function fetchData() {
@ -95,7 +82,6 @@ function fetchData() {
createdAt: new Date(),
lastUpdatedAt: new Date(),
lastUpdateFullName: "สาวิตรี ศรีสมัย",
isActive: true,
},
{
id: "2",
@ -103,7 +89,6 @@ function fetchData() {
createdAt: new Date(),
lastUpdatedAt: new Date(),
lastUpdateFullName: "System Administrator",
isActive: false,
},
{
id: "3",
@ -111,7 +96,6 @@ function fetchData() {
createdAt: new Date(),
lastUpdatedAt: new Date(),
lastUpdateFullName: "คณะกรรมการ ตรวจรับ",
isActive: false,
},
];
store.fetchData(data);
@ -186,16 +170,7 @@ onMounted(async () => {
@click.stop="onclickDetail(props.row.id)"
>
<q-td v-for="col in props.cols" :key="col.id">
<div v-if="col.name == 'isActive'">
<q-icon
v-if="col.value == false"
name="mdi-close"
color="red"
class="text-h5"
/>
<q-icon v-else name="mdi-check" color="positive" class="text-h5" />
</div>
<div v-else>
<div>
{{ col.value }}
</div>
</q-td>
@ -250,7 +225,6 @@ onMounted(async () => {
<DialogForm
v-model:dialog="dialog"
v-model:data="prefix"
v-model:isActive="isActive"
v-model:personalName="personalName"
v-model:dialogStatus="dialogStatus"
/>

View file

@ -57,24 +57,12 @@ const columns = ref<QTableProps["columns"]>([
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "isActive",
align: "left",
label: "สถานะ",
sortable: true,
field: "isActive",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
]);
const $q = useQuasar();
const filterKeyword = ref<string>("");
const dialog = ref<boolean>(false);
const isActive = ref<boolean>(false);
const rank = ref<string>("");
const rankRef = ref<any>(null);
const dialogStatus = ref<string>("");
@ -84,7 +72,6 @@ const visibleColumns = ref<string[]>([
"createdAt",
"lastUpdatedAt",
"lastUpdateFullName",
"isActive",
]);
function fetchData() {
@ -95,7 +82,6 @@ function fetchData() {
createdAt: new Date(),
lastUpdatedAt: new Date(),
lastUpdateFullName: "สาวิตรี ศรีสมัย",
isActive: true,
},
{
id: "2",
@ -103,7 +89,6 @@ function fetchData() {
createdAt: new Date(),
lastUpdatedAt: new Date(),
lastUpdateFullName: "System Administrator",
isActive: false,
},
{
id: "3",
@ -111,7 +96,6 @@ function fetchData() {
createdAt: new Date(),
lastUpdatedAt: new Date(),
lastUpdateFullName: "คณะกรรมการ ตรวจรับ",
isActive: true,
},
];
store.fetchData(data);
@ -186,16 +170,7 @@ onMounted(async () => {
@click.stop="onclickDetail(props.row.id)"
>
<q-td v-for="col in props.cols" :key="col.id">
<div v-if="col.name == 'isActive'">
<q-icon
v-if="col.value == false"
name="mdi-close"
color="red"
class="text-h5"
/>
<q-icon v-else name="mdi-check" color="positive" class="text-h5" />
</div>
<div v-else>
<div>
{{ col.value }}
</div>
</q-td>
@ -250,7 +225,6 @@ onMounted(async () => {
<DialogForm
v-model:dialog="dialog"
v-model:data="rank"
v-model:isActive="isActive"
v-model:personalName="personalName"
v-model:dialogStatus="dialogStatus"
/>

View file

@ -57,24 +57,12 @@ const columns = ref<QTableProps["columns"]>([
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "isActive",
align: "left",
label: "สถานะ",
sortable: true,
field: "isActive",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
]);
const $q = useQuasar();
const filterKeyword = ref<string>("");
const dialog = ref<boolean>(false);
const isActive = ref<boolean>(false);
const bloodGroup = ref<string>("");
const bloodGroupRef = ref<any>(null);
const dialogStatus = ref<string>("");
@ -84,7 +72,6 @@ const visibleColumns = ref<string[]>([
"createdAt",
"lastUpdatedAt",
"lastUpdateFullName",
"isActive",
]);
function fetchData() {
@ -95,7 +82,6 @@ function fetchData() {
createdAt: new Date(),
lastUpdatedAt: new Date(),
lastUpdateFullName: "สาวิตรี ศรีสมัย",
isActive: true,
},
{
id: "2",
@ -103,7 +89,6 @@ function fetchData() {
createdAt: new Date(),
lastUpdatedAt: new Date(),
lastUpdateFullName: "System Administrator",
isActive: false,
},
{
id: "3",
@ -111,7 +96,6 @@ function fetchData() {
createdAt: new Date(),
lastUpdatedAt: new Date(),
lastUpdateFullName: "คณะกรรมการ ตรวจรับ",
isActive: true,
},
];
store.fetchData(data);
@ -186,16 +170,7 @@ onMounted(async () => {
@click.stop="onclickDetail(props.row.id)"
>
<q-td v-for="col in props.cols" :key="col.id">
<div v-if="col.name == 'isActive'">
<q-icon
v-if="col.value == false"
name="mdi-close"
color="red"
class="text-h5"
/>
<q-icon v-else name="mdi-check" color="positive" class="text-h5" />
</div>
<div v-else>
<div>
{{ col.value }}
</div>
</q-td>
@ -250,7 +225,6 @@ onMounted(async () => {
<DialogForm
v-model:dialog="dialog"
v-model:data="bloodGroup"
v-model:isActive="isActive"
v-model:personalName="personalName"
v-model:dialogStatus="dialogStatus"
/>

View file

@ -57,24 +57,12 @@ const columns = ref<QTableProps["columns"]>([
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "isActive",
align: "left",
label: "สถานะ",
sortable: true,
field: "isActive",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
]);
const $q = useQuasar();
const filterKeyword = ref<string>("");
const dialog = ref<boolean>(false);
const isActive = ref<boolean>(false);
const gender = ref<string>("");
const genderRef = ref<any>(null);
const dialogStatus = ref<string>("");
@ -84,7 +72,6 @@ const visibleColumns = ref<string[]>([
"createdAt",
"lastUpdatedAt",
"lastUpdateFullName",
"isActive",
]);
function fetchData() {
@ -95,7 +82,6 @@ function fetchData() {
createdAt: new Date(),
lastUpdatedAt: new Date(),
lastUpdateFullName: "สาวิตรี ศรีสมัย",
isActive: false,
},
{
id: "2",
@ -103,7 +89,6 @@ function fetchData() {
createdAt: new Date(),
lastUpdatedAt: new Date(),
lastUpdateFullName: "System Administrator",
isActive: true,
},
{
id: "3",
@ -111,7 +96,6 @@ function fetchData() {
createdAt: new Date(),
lastUpdatedAt: new Date(),
lastUpdateFullName: "คณะกรรมการ ตรวจรับ",
isActive: false,
},
];
store.fetchData(data);
@ -186,16 +170,7 @@ onMounted(async () => {
@click.stop="onclickDetail(props.row.id)"
>
<q-td v-for="col in props.cols" :key="col.id">
<div v-if="col.name == 'isActive'">
<q-icon
v-if="col.value == false"
name="mdi-close"
color="red"
class="text-h5"
/>
<q-icon v-else name="mdi-check" color="positive" class="text-h5" />
</div>
<div v-else>
<div>
{{ col.value }}
</div>
</q-td>
@ -250,7 +225,6 @@ onMounted(async () => {
<DialogForm
v-model:dialog="dialog"
v-model:data="gender"
v-model:isActive="isActive"
v-model:personalName="personalName"
v-model:dialogStatus="dialogStatus"
/>

View file

@ -57,24 +57,12 @@ const columns = ref<QTableProps["columns"]>([
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "isActive",
align: "left",
label: "สถานะ",
sortable: true,
field: "isActive",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
]);
const $q = useQuasar();
const filterKeyword = ref<string>("");
const dialog = ref<boolean>(false);
const isActive = ref<boolean>(false);
const religion = ref<string>("");
const religionRef = ref<any>(null);
const dialogStatus = ref<string>("");
@ -84,7 +72,6 @@ const visibleColumns = ref<string[]>([
"createdAt",
"lastUpdatedAt",
"lastUpdateFullName",
"isActive",
]);
function fetchData() {
@ -95,7 +82,6 @@ function fetchData() {
createdAt: new Date(),
lastUpdatedAt: new Date(),
lastUpdateFullName: "สาวิตรี ศรีสมัย",
isActive: false,
},
{
id: "2",
@ -103,7 +89,6 @@ function fetchData() {
createdAt: new Date(),
lastUpdatedAt: new Date(),
lastUpdateFullName: "System Administrator",
isActive: true,
},
{
id: "3",
@ -111,7 +96,6 @@ function fetchData() {
createdAt: new Date(),
lastUpdatedAt: new Date(),
lastUpdateFullName: "คณะกรรมการ ตรวจรับ",
isActive: false,
},
{
id: "4",
@ -119,7 +103,6 @@ function fetchData() {
createdAt: new Date(),
lastUpdatedAt: new Date(),
lastUpdateFullName: "คณะกรรมการ ตรวจรับ",
isActive: true,
},
];
store.fetchData(data);
@ -194,16 +177,7 @@ onMounted(async () => {
@click.stop="onclickDetail(props.row.id)"
>
<q-td v-for="col in props.cols" :key="col.id">
<div v-if="col.name == 'isActive'">
<q-icon
v-if="col.value == false"
name="mdi-close"
color="red"
class="text-h5"
/>
<q-icon v-else name="mdi-check" color="positive" class="text-h5" />
</div>
<div v-else>
<div>
{{ col.value }}
</div>
</q-td>
@ -258,7 +232,6 @@ onMounted(async () => {
<DialogForm
v-model:dialog="dialog"
v-model:data="religion"
v-model:isActive="isActive"
v-model:personalName="personalName"
v-model:dialogStatus="dialogStatus"
/>

View file

@ -57,24 +57,12 @@ const columns = ref<QTableProps["columns"]>([
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "isActive",
align: "left",
label: "สถานะ",
sortable: true,
field: "isActive",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
]);
const $q = useQuasar();
const filterKeyword = ref<string>("");
const dialog = ref<boolean>(false);
const isActive = ref<boolean>(false);
const relationship = ref<string>("");
const relationshipRef = ref<any>(null);
const dialogStatus = ref<string>("");
@ -84,7 +72,6 @@ const visibleColumns = ref<string[]>([
"createdAt",
"lastUpdatedAt",
"lastUpdateFullName",
"isActive",
]);
function fetchData() {
@ -95,7 +82,6 @@ function fetchData() {
createdAt: new Date(),
lastUpdatedAt: new Date(),
lastUpdateFullName: "สาวิตรี ศรีสมัย",
isActive: false,
},
{
id: "2",
@ -103,7 +89,6 @@ function fetchData() {
createdAt: new Date(),
lastUpdatedAt: new Date(),
lastUpdateFullName: "System Administrator",
isActive: true,
},
{
id: "3",
@ -111,7 +96,6 @@ function fetchData() {
createdAt: new Date(),
lastUpdatedAt: new Date(),
lastUpdateFullName: "คณะกรรมการ ตรวจรับ",
isActive: false,
},
{
id: "4",
@ -119,7 +103,6 @@ function fetchData() {
createdAt: new Date(),
lastUpdatedAt: new Date(),
lastUpdateFullName: "คณะกรรมการ ตรวจรับ",
isActive: true,
},
];
store.fetchData(data);
@ -194,16 +177,7 @@ onMounted(async () => {
@click.stop="onclickDetail(props.row.id)"
>
<q-td v-for="col in props.cols" :key="col.id">
<div v-if="col.name == 'isActive'">
<q-icon
v-if="col.value == false"
name="mdi-close"
color="red"
class="text-h5"
/>
<q-icon v-else name="mdi-check" color="positive" class="text-h5" />
</div>
<div v-else>
<div>
{{ col.value }}
</div>
</q-td>
@ -258,7 +232,6 @@ onMounted(async () => {
<DialogForm
v-model:dialog="dialog"
v-model:data="relationship"
v-model:isActive="isActive"
v-model:personalName="personalName"
v-model:dialogStatus="dialogStatus"
/>

View file

@ -12,7 +12,6 @@ const dataRef = ref<any>(null);
const data = defineModel<string>("data", {
required: true,
});
const isActive = defineModel<boolean>("isActive");
const personalName = defineModel<string>("personalName");
const dialogStatus = defineModel<string>("dialogStatus");
const dialog = defineModel<boolean>("dialog");
@ -33,7 +32,6 @@ async function onSubmit() {
async () => {
closeDialog();
data.value = "";
isActive.value = false;
},
"ยืนยันการบันทึกข้อมูล",
"ต้องการยืนยันการบันทึกข้อมูลนี้หรือไม่ ?"
@ -67,17 +65,6 @@ async function onSubmit() {
:rules="[(val) => val.length > 0 || 'กรุณากรอก' + personalName]"
hide-bottom-space
/>
<div
class="col q-ma-md q-pa-sm bg-white border_custom text-weight-medium"
>
<div class="row items-center q-my-sm justify-between">
<p class="q-ma-none">สถานะการใชงาน</p>
<label class="toggle-control">
<input type="checkbox" dense v-model="isActive" />
<span class="control"></span>
</label>
</div>
</div>
</q-card-section>
<q-card-actions align="right">
@ -97,73 +84,3 @@ async function onSubmit() {
</q-card>
</q-dialog>
</template>
<style scoped lang="scss">
.border_custom {
border-radius: 6px !important;
border: 1px solid #e1e1e1;
}
$toggle-background-color-on: #06884d;
$toggle-background-color-off: darkgray;
$toggle-control-color: white;
$toggle-width: 40px;
$toggle-height: 25px;
$toggle-gutter: 3px;
$toggle-radius: 50%;
$toggle-control-speed: 0.15s;
$toggle-control-ease: ease-in;
// These are our computed variables
// change at your own risk.
$toggle-radius: $toggle-height / 2;
$toggle-control-size: $toggle-height - ($toggle-gutter * 2);
.toggle-control {
display: block;
position: relative;
padding-left: $toggle-width;
margin-bottom: 12px;
cursor: pointer;
font-size: 22px;
user-select: none;
input {
position: absolute;
opacity: 0;
cursor: pointer;
height: 0;
width: 0;
}
input:checked ~ .control {
background-color: $toggle-background-color-on;
&:after {
left: $toggle-width - $toggle-control-size - $toggle-gutter;
}
}
.control {
position: absolute;
top: -7px;
left: -15px;
height: $toggle-height;
width: $toggle-width;
border-radius: $toggle-radius;
background-color: $toggle-background-color-off;
transition: background-color $toggle-control-speed $toggle-control-ease;
&:after {
content: "";
position: absolute;
left: $toggle-gutter;
top: $toggle-gutter;
width: $toggle-control-size;
height: $toggle-control-size;
border-radius: $toggle-radius;
background: $toggle-control-color;
transition: left $toggle-control-speed $toggle-control-ease;
}
}
}
</style>