Big update

This commit is contained in:
Casey 2026-01-26 17:20:49 -06:00
parent 124b8775fb
commit b400be3f1a
29 changed files with 31703 additions and 2443 deletions

View file

@ -381,6 +381,34 @@
</div>
</Modal>
<!-- Bid Meeting Notes Side Tab -->
<Button v-if="bidMeeting?.bidNotes" class="bid-notes-side-tab" @click="onTabClick">
<div class="tab-content">
<i class="pi pi-file-edit"></i>
<span class="tab-text">Bid Notes</span>
</div>
</Button>
<!-- Bid Meeting Notes Drawer -->
<Drawer
:visible="showDrawer"
@update:visible="showDrawer = $event"
position="right"
:style="{ width: '1200px' }"
@hide="showDrawer = false"
class="bid-notes-drawer"
>
<template #header>
<div class="drawer-header">
<h3>Bid Meeting Notes</h3>
<Button icon="pi pi-times" @click="showDrawer = false" text rounded />
</div>
</template>
<div class="drawer-content">
<BidMeetingNotes v-if="bidMeeting?.bidNotes" :bid-note="bidMeeting.bidNotes" />
</div>
</Drawer>
</div>
</template>
@ -391,11 +419,13 @@ import Modal from "../common/Modal.vue";
import SaveTemplateModal from "../modals/SaveTemplateModal.vue";
import DataTable from "../common/DataTable.vue";
import DocHistory from "../common/DocHistory.vue";
import BidMeetingNotes from "../modals/BidMeetingNotes.vue";
import InputText from "primevue/inputtext";
import InputNumber from "primevue/inputnumber";
import Button from "primevue/button";
import Select from "primevue/select";
import Tooltip from "primevue/tooltip";
import Drawer from "primevue/drawer";
import Api from "../../api";
import DataUtils from "../../utils";
import { useLoadingStore } from "../../stores/loading";
@ -452,8 +482,10 @@ const showResponseModal = ref(false);
const showSaveTemplateModal = ref(false);
const addressSearchResults = ref([]);
const itemSearchTerm = ref("");
const showDrawer = ref(false);
const estimate = ref(null);
const bidMeeting = ref(null);
// Computed property to determine if fields are editable
const isEditable = computed(() => {
@ -802,6 +834,15 @@ const toggleDiscountType = (item, type) => {
item.discountType = type;
};
const onTabClick = () => {
console.log('Bid notes tab clicked');
console.log('Current showDrawer value:', showDrawer.value);
console.log('bidMeeting:', bidMeeting.value);
console.log('bidMeeting?.bidNotes:', bidMeeting.value?.bidNotes);
showDrawer.value = true;
console.log('Set showDrawer to true');
};
const tableActions = [
{
label: "Add Selected Items",
@ -955,6 +996,12 @@ onMounted(async () => {
// Handle from-meeting query parameter
if (fromMeetingQuery.value) {
formData.fromMeeting = fromMeetingQuery.value;
// Fetch the bid meeting to check for bidNotes
try {
bidMeeting.value = await Api.getBidMeeting(fromMeetingQuery.value);
} catch (error) {
console.error("Error fetching bid meeting:", error);
}
}
}
@ -1034,6 +1081,46 @@ onMounted(async () => {
margin-bottom: 1rem;
}
.bid-notes-side-tab {
position: fixed;
right: -90px;
top: 50%;
transform: translateY(-50%);
background-color: #2196f3;
color: white;
padding: 12px 8px;
width: 110px;
border-radius: 0 4px 4px 0;
cursor: pointer;
box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.2);
transition: all 0.3s ease;
z-index: 1000;
writing-mode: vertical-rl;
text-orientation: upright;
}
.bid-notes-side-tab:hover {
right: -80px;
background-color: #1976d2;
}
.tab-content {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
}
.tab-content i {
font-size: 1.1em;
}
.tab-text {
font-weight: 500;
font-size: 0.9em;
white-space: nowrap;
}
.address-section,
.contact-section,
.project-template-section,
@ -1365,5 +1452,29 @@ onMounted(async () => {
font-size: 0.85rem;
color: #666;
}
.bid-notes-drawer {
box-shadow: -4px 0 8px rgba(0, 0, 0, 0.1);
}
.drawer-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem;
border-bottom: 1px solid #e0e0e0;
background-color: #f8f9fa;
}
.drawer-header h3 {
margin: 0;
color: #333;
}
.drawer-content {
padding: 1rem;
height: calc(100vh - 80px);
overflow-y: auto;
}
</style>
<parameter name="filePath"></parameter>