updates for company effects
This commit is contained in:
parent
98ec082394
commit
7710a7c8fe
22 changed files with 941 additions and 186 deletions
|
|
@ -226,12 +226,14 @@ import BidMeetingModal from "../../modals/BidMeetingModal.vue";
|
|||
import MeetingDetailsModal from "../../modals/MeetingDetailsModal.vue";
|
||||
import { useLoadingStore } from "../../../stores/loading";
|
||||
import { useNotificationStore } from "../../../stores/notifications-primevue";
|
||||
import { useCompanyStore } from "../../../stores/company";
|
||||
import Api from "../../../api";
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const loadingStore = useLoadingStore();
|
||||
const notificationStore = useNotificationStore();
|
||||
const companyStore = useCompanyStore();
|
||||
|
||||
// Query parameters
|
||||
const isNewMode = computed(() => route.query.new === "true");
|
||||
|
|
@ -816,7 +818,7 @@ const handleDropToUnscheduled = async (event) => {
|
|||
const loadUnscheduledMeetings = async () => {
|
||||
loadingStore.setLoading(true);
|
||||
try {
|
||||
const result = await Api.getUnscheduledBidMeetings();
|
||||
const result = await Api.getUnscheduledBidMeetings(companyStore.currentCompany);
|
||||
// Ensure we always have an array
|
||||
unscheduledMeetings.value = Array.isArray(result) ? result : [];
|
||||
console.log("Loaded unscheduled meetings:", unscheduledMeetings.value);
|
||||
|
|
@ -865,7 +867,7 @@ const loadWeekMeetings = async () => {
|
|||
|
||||
// Try to get meetings from API
|
||||
try {
|
||||
const apiResult = await Api.getWeekBidMeetings(weekStartStr, weekEndStr);
|
||||
const apiResult = await Api.getWeekBidMeetings(weekStartStr, weekEndStr, companyStore.currentCompany);
|
||||
if (Array.isArray(apiResult)) {
|
||||
// Transform the API data to match what the calendar expects
|
||||
meetings.value = apiResult
|
||||
|
|
@ -1085,6 +1087,15 @@ watch(currentWeekStart, () => {
|
|||
loadWeekMeetings();
|
||||
});
|
||||
|
||||
// Watch for company changes
|
||||
watch(
|
||||
() => companyStore.currentCompany,
|
||||
async () => {
|
||||
await loadWeekMeetings();
|
||||
await loadUnscheduledMeetings();
|
||||
}
|
||||
);
|
||||
|
||||
watch(
|
||||
() => route.query.new,
|
||||
(newVal) => {
|
||||
|
|
@ -1098,9 +1109,10 @@ watch(
|
|||
<style scoped>
|
||||
.schedule-bid-container {
|
||||
padding: 20px;
|
||||
height: 100vh;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.header {
|
||||
|
|
@ -1110,6 +1122,7 @@ watch(
|
|||
margin-bottom: 20px;
|
||||
padding-bottom: 15px;
|
||||
border-bottom: 1px solid #e0e0e0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.header-controls {
|
||||
|
|
@ -1150,9 +1163,9 @@ watch(
|
|||
padding: 0 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow-y: auto;
|
||||
max-height: calc(100vh - 150px);
|
||||
overflow: hidden;
|
||||
transition: width 0.3s ease;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.sidebar.collapsed {
|
||||
|
|
@ -1182,11 +1195,13 @@ watch(
|
|||
.sidebar-header h4 {
|
||||
font-size: 1.1em;
|
||||
margin: 0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.unscheduled-meetings-list {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue