my work temp save

This commit is contained in:
nevermoregb 2025-03-20 10:17:03 +09:00
parent 6a8d1ff042
commit f8cf106a54
8 changed files with 133 additions and 4 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -2,7 +2,7 @@
<div class="container-xxl flex-grow-1 container-p-y pb-0"> <div class="container-xxl flex-grow-1 container-p-y pb-0">
<div class="card app-calendar-wrapper"> <div class="card app-calendar-wrapper">
<div class="row g-0"> <div class="row g-0">
<div class="col-3 border-end text-center"> <div class="col-3 border-end text-center" id="app-calendar-sidebar">
<div class="card-body"> <div class="card-body">
<img <img
v-if="user" v-if="user"
@ -23,7 +23,9 @@
ref="workTimeComponentRef" ref="workTimeComponentRef"
/> />
<CommuterProjectList <MainEventList :categoryList="categoryList" :baseUrl="baseUrl" />
<!-- <CommuterProjectList
:categoryList="categoryList"
:project="project" :project="project"
:commuters="commuters" :commuters="commuters"
:baseUrl="baseUrl" :baseUrl="baseUrl"
@ -31,7 +33,7 @@
:selectedProject="selectedProject" :selectedProject="selectedProject"
:checkedInProject="checkedInProject" :checkedInProject="checkedInProject"
@drop="handleProjectDrop" @drop="handleProjectDrop"
/> /> -->
</div> </div>
</div> </div>
@ -96,9 +98,10 @@
import { useProjectStore } from '@/stores/useProjectStore'; import { useProjectStore } from '@/stores/useProjectStore';
import CommuterBtn from '@c/commuters/CommuterBtn.vue'; import CommuterBtn from '@c/commuters/CommuterBtn.vue';
import CommuterProjectList from '@c/commuters/CommuterProjectList.vue'; import CommuterProjectList from '@c/commuters/CommuterProjectList.vue';
import MainEventList from '@c/main/MainEventList.vue';
import BackBtn from '@c/button/BackBtn.vue'; import BackBtn from '@c/button/BackBtn.vue';
const baseUrl = $api.defaults.baseURL.replace(/api\/$/, ''); const baseUrl = import.meta.env.VITE_DOMAIN;
const user = ref({}); const user = ref({});
const project = ref({}); const project = ref({});
const userStore = useUserInfoStore(); const userStore = useUserInfoStore();
@ -165,6 +168,13 @@
} }
}; };
//
const categoryList = ref([]);
const fetchCategoryList = async () => {
const { data } = await $api.get('main/category');
if (data) categoryList.value = [...data.data.filter(categoryInfo => categoryInfo.CMNCODODR != 0)];
};
// //
const fetchData = async () => { const fetchData = async () => {
// FullCalendar API // FullCalendar API
@ -419,5 +429,7 @@
selectedProject.value = storedProject.PROJCTSEQ; selectedProject.value = storedProject.PROJCTSEQ;
checkedInProject.value = storedProject; checkedInProject.value = storedProject;
} }
await fetchCategoryList();
}); });
</script> </script>

View File

@ -0,0 +1,117 @@
<template>
<div class="">
<template v-for="category in categoryList" :key="category.CMNCODVAL">
<div v-if="true" class="border border-2 mt-3 card p-2">
<div class="row">
<div class="col-3 mx-0 px-0">
<div class="ratio ratio-1x1">
<img
:src="`${baseUrl}img/main-category-img/main-${category.CMNCODVAL}.png`"
:alt="`${category.CMNCODNAM}`"
@error="$event.target.src = '/img/icons/icon.png'"
/>
</div>
</div>
<div class="col-9 d-flex flex-wrap mx-0 px-0">
<!-- <div v-for="commuter in commuters" :key="commuter.COMMUTCMT" class="col-4"> -->
<div class="ratio ratio-1x1">
<img
:src="`${baseUrl}upload/img/profile/123123`"
alt="User Profile"
class="rounded-circle"
@error="$event.target.src = '/img/icons/icon.png'"
/>
</div>
<div class="ratio ratio-1x1">
<img
:src="`${baseUrl}upload/img/profile/123123`"
alt="User Profile"
class="rounded-circle"
@error="$event.target.src = '/img/icons/icon.png'"
/>
</div>
<div class="ratio ratio-1x1">
<img
:src="`${baseUrl}upload/img/profile/123123`"
alt="User Profile"
class="rounded-circle"
@error="$event.target.src = '/img/icons/icon.png'"
/>
</div>
<div class="ratio ratio-1x1">
<img
:src="`${baseUrl}upload/img/profile/123123`"
alt="User Profile"
class="rounded-circle"
@error="$event.target.src = '/img/icons/icon.png'"
/>
</div>
</div>
</div>
</div>
</template>
</div>
</template>
<script setup>
import { defineProps, defineEmits } from 'vue';
const props = defineProps({
project: {
type: Object,
required: false,
},
categoryList: {
type: Array,
},
commuters: {
type: Array,
required: false,
},
baseUrl: {
type: String,
required: false,
},
user: {
type: Object,
required: false,
},
selectedProject: {
type: Number,
default: null,
},
checkedInProject: {
type: Object,
default: null,
},
});
const emit = defineEmits(['drop', 'update:selectedProject', 'update:checkedInProject']);
//
const isCurrentUser = commuter => {
return props.user && commuter && commuter.MEMBERSEQ === props.user.id;
};
//
const dragStart = (event, project) => {
//
event.dataTransfer.setData('application/json', JSON.stringify(project));
event.dataTransfer.effectAllowed = 'copy';
};
//
const allowDrop = event => {
event.preventDefault();
};
//
const handleDrop = (event, targetProject) => {
event.preventDefault();
emit('drop', { event, targetProject });
};
</script>