Merge branch 'develop' into devTee
This commit is contained in:
commit
0f4714b13d
11 changed files with 304 additions and 193 deletions
|
|
@ -71,7 +71,7 @@ const columns = [
|
|||
] as const satisfies QTableProps["columns"];
|
||||
|
||||
const $q = useQuasar();
|
||||
|
||||
const editId = ref<string>("");
|
||||
const filterKeyword = ref<string>("");
|
||||
const dialog = ref<boolean>(false);
|
||||
const educationLevel = ref<string>("");
|
||||
|
|
@ -139,6 +139,8 @@ onMounted(async () => {
|
|||
() => {
|
||||
dialogStatus = 'create';
|
||||
dialog = true;
|
||||
educationLevel = '';
|
||||
educationRank = undefined;
|
||||
}
|
||||
"
|
||||
>
|
||||
|
|
@ -211,6 +213,9 @@ onMounted(async () => {
|
|||
() => {
|
||||
dialogStatus = 'edit';
|
||||
dialog = true;
|
||||
editId = props.row.id;
|
||||
educationLevel = props.row.name;
|
||||
educationRank = props.row.rank;
|
||||
}
|
||||
"
|
||||
>
|
||||
|
|
@ -223,7 +228,12 @@ onMounted(async () => {
|
|||
</q-item>
|
||||
<q-item clickable>
|
||||
<q-item-section
|
||||
@click="dialogRemove($q, async () => {})"
|
||||
@click="
|
||||
dialogRemove(
|
||||
$q,
|
||||
async () => await deleteData(props.row.id)
|
||||
)
|
||||
"
|
||||
v-close-popup
|
||||
>
|
||||
<div class="row items-center white">
|
||||
|
|
@ -241,7 +251,7 @@ onMounted(async () => {
|
|||
</d-table>
|
||||
|
||||
<DialogForm
|
||||
v-model:educationRank:="educationRank"
|
||||
v-model:educationRank="educationRank"
|
||||
v-model:dialog="dialog"
|
||||
v-model:data="educationLevel"
|
||||
v-model:personalName="personalName"
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ const personalName = defineModel<string>("personalName");
|
|||
const dialogStatus = defineModel<string>("dialogStatus");
|
||||
const editId = defineModel<string>("editId");
|
||||
const dialog = defineModel<boolean>("dialog");
|
||||
const educationRank = defineModel<number>("rank");
|
||||
const educationRank = defineModel<number>("educationRank");
|
||||
const props = defineProps({
|
||||
fetchData: {
|
||||
type: Function,
|
||||
|
|
@ -52,6 +52,7 @@ async function onSubmit() {
|
|||
: props.editData(editId.value);
|
||||
closeDialog();
|
||||
data.value = "";
|
||||
educationRank.value = undefined;
|
||||
},
|
||||
"ยืนยันการบันทึกข้อมูล",
|
||||
"ต้องการยืนยันการบันทึกข้อมูลนี้หรือไม่ ?"
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
const { date2Thai } = useCounterMixin();
|
||||
|
||||
export const usePositionDataStore = defineStore("PositionData", () => {
|
||||
const pathLocation = ref<string>("list_position");
|
||||
const row = ref<DataRow[]>([]);
|
||||
const name = ref<any>([]);
|
||||
function save(data: DataResponse[], id: string) {
|
||||
const list = data.map((e) => ({
|
||||
...e,
|
||||
|
|
@ -26,5 +26,6 @@ export const usePositionDataStore = defineStore("PositionData", () => {
|
|||
return {
|
||||
save,
|
||||
row,
|
||||
pathLocation,
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@ import { ref, onMounted } from "vue";
|
|||
import ListPosition from "@/modules/01_metadataNew/components/position/01ListPosition.vue";
|
||||
import ListType from "@/modules/01_metadataNew/components/position/02ListType.vue";
|
||||
import ListExecutive from "@/modules/01_metadataNew/components/position/04ListExecutive.vue";
|
||||
const currentTab = ref<string>("list_position");
|
||||
import { usePositionDataStore } from "../stores/positionListStore";
|
||||
// const store.pathLocation = ref<string>("list_position");
|
||||
const tabs = ref<Array<any>>([]);
|
||||
const store = usePositionDataStore();
|
||||
|
||||
onMounted(() => {
|
||||
const tabsPerson = [
|
||||
|
|
@ -23,7 +25,7 @@ onMounted(() => {
|
|||
<q-card flat bordered>
|
||||
<q-tabs
|
||||
dense
|
||||
v-model="currentTab"
|
||||
v-model="store.pathLocation"
|
||||
align="left"
|
||||
indicator-color="primary"
|
||||
active-color="primary bg-teal-1"
|
||||
|
|
@ -33,7 +35,7 @@ onMounted(() => {
|
|||
<q-tab
|
||||
v-for="tab in tabs"
|
||||
:key="tab.value"
|
||||
v-on:click="currentTab = tab.value"
|
||||
v-on:click="store.pathLocation = tab.value"
|
||||
:label="tab.label"
|
||||
:name="tab.value"
|
||||
class="q-py-xs"
|
||||
|
|
@ -41,9 +43,9 @@ onMounted(() => {
|
|||
</q-tabs>
|
||||
<q-separator size="2px" />
|
||||
<div class="q-pa-md">
|
||||
<ListPosition v-if="currentTab == 'list_position'" />
|
||||
<ListType v-if="currentTab == 'list_type'" />
|
||||
<ListExecutive v-if="currentTab == 'list_executive'" />
|
||||
<ListPosition v-if="store.pathLocation == 'list_position'" />
|
||||
<ListType v-if="store.pathLocation == 'list_type'" />
|
||||
<ListExecutive v-if="store.pathLocation == 'list_executive'" />
|
||||
</div>
|
||||
</q-card>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue