modal-detail

This commit is contained in:
setthawutttty 2023-06-07 13:42:11 +07:00
parent fa6d916e36
commit ca91efbaa5
6 changed files with 634 additions and 433 deletions

View file

@ -1,5 +1,32 @@
import { defineStore } from "pinia";
import { ref, computed } from "vue";
export const useProfileDataStore = defineStore("placement", () => {
return {};
});
export const usePlacementDataStore = defineStore("placement", () => {
interface placement {
mappingPosition: { columns: String[] };
}
const placementData = ref<placement>({
mappingPosition: { columns: [] },
});
const changePlacementColumns = (system: String, val: String[]) => {
if (system == "mappingPosition")
placementData.value.mappingPosition.columns = val;
localStorage.setItem(
"placement",
JSON.stringify(placementData.value)
);
};
if (localStorage.getItem("placement") !== null) {
placementData.value = JSON.parse(
localStorage.getItem("placement") || "{}"
);
}
return {
placementData,
changePlacementColumns,
};
});