@@ -7,10 +7,12 @@ import { useRouter } from 'vue-router';
77import AuthorizationCardLite from ' @/components/authorization/AuthorizationCardLite.vue' ;
88import AuthorizationCardProponent from ' @/components/authorization/AuthorizationCardProponent.vue' ;
99import RequiredAuths from ' @/components/authorization/RequiredAuths.vue' ;
10- import BasicProjectInfoCard from ' @/components/projectCommon/BasicProjectInfoCard.vue' ;
1110import { AskMyNavigator } from ' @/components/common/icons' ;
11+ import NoteBanner from ' @/components/note/NoteBanner.vue' ;
12+ import ShownToProponentModal from ' @/components/note/ShownToProponentModal.vue' ;
13+ import BasicProjectInfoCard from ' @/components/projectCommon/BasicProjectInfoCard.vue' ;
1214import RelatedEnquiryListProponent from ' @/components/projectCommon/enquiry/RelatedEnquiryListProponent.vue' ;
13- import { Button , Dialog , Tab , Tabs , TabList , TabPanel , TabPanels , useToast } from ' @/lib/primevue' ;
15+ import { Button , Tab , TabList , TabPanel , TabPanels , Tabs , useToast } from ' @/lib/primevue' ;
1416import { contactService , enquiryService , housingProjectService , noteHistoryService , permitService } from ' @/services' ;
1517import { useAuthZStore , useProjectStore } from ' @/store' ;
1618import { NavigationPermission } from ' @/store/authzStore' ;
@@ -21,7 +23,6 @@ import { enquiryRouteNameKey, navigationPermissionKey } from '@/utils/keys';
2123
2224import type { Ref } from ' vue' ;
2325import type { Contact } from ' @/types' ;
24- import { formatDateLong } from ' @/utils/formatters' ;
2526
2627// Props
2728const { initialTab = ' 0' , projectId } = defineProps <{
@@ -43,7 +44,7 @@ const {
4344 getAuthsNeeded,
4445 getAuthsNotNeeded,
4546 getAuthsOnGoing,
46- getNoteHistory ,
47+ getNoteHistoryShownToProponent ,
4748 getProject,
4849 getRelatedEnquiries
4950} = storeToRefs (projectStore );
@@ -151,32 +152,6 @@ onBeforeMount(async () => {
151152 :value =" activeTab "
152153 class="mt-3"
153154 >
154- <!-- TODO: Where does this go now after the rebase? -->
155- <!-- <div
156- v-if="getNoteHistory.length"
157- class="bg-[var(-- p-green-100)] p-4"
158- >
159- <div class="grid grid-cols-6 gap-4 items-center">
160- <div class="font-bold">{{ t('e.common.projectView.beAware') }}</div>
161- <div class="font-bold">
162- Updated on {{ formatDate(getNoteHistory[0].updatedAt ?? getNoteHistory[0].createdAt) }}
163- </div>
164- <div class="col-span-3 font-bold truncate">{{ getNoteHistory[0].note[0].note }}</div>
165- <div class="flex justify-end">
166- <Button
167- class="p-button-sm header-btn"
168- label="View all"
169- outlined
170- @click="noteHistoryVisible = true"
171- />
172- </div>
173- </div>
174- </div>
175-
176- <div
177- v-if="getProject?.submissionType === SubmissionType.INAPPLICABLE"
178- class="inapplicable-block p-4 mt-12"
179- > -->
180155 <TabList >
181156 <Tab :value =" 0 " >
182157 <font-awesome-icon
@@ -201,6 +176,11 @@ onBeforeMount(async () => {
201176 :activity-id =" getProject .activityId "
202177 @basic-project-info :navigate-to-submission-intake-view =" navigateToSubmissionIntakeView "
203178 />
179+ <NoteBanner
180+ v-if =" getNoteHistoryShownToProponent .length "
181+ :note =" getNoteHistoryShownToProponent [0 ].note [0 ]"
182+ @note-banner :show-history =" noteHistoryVisible = true "
183+ />
204184
205185 <div class =" disclaimer-block p-8 mt-8" >
206186 {{ t('e.common.projectView.disclaimer') }}
@@ -291,29 +271,10 @@ onBeforeMount(async () => {
291271 </TabPanels >
292272 </Tabs >
293273 </div >
294-
295- <Dialog
274+ <ShownToProponentModal
296275 v-model :visible =" noteHistoryVisible "
297- :draggable =" false "
298- :modal =" true "
299- class="app-info-dialog w-6/12"
300- >
301- <template #header >
302- <span class =" p-dialog-title" >{{ t('e.common.projectView.beAware') }}</span >
303- </template >
304-
305- <div
306- v-for =" history of getNoteHistory"
307- :key =" history.noteHistoryId"
308- class =" mb-5"
309- >
310- <div class =" flex flex-col" >
311- <div class =" font-bold mb-1" >{{ formatDateLong(history.createdAt) }}</div >
312- <div class =" font-bold" >{{ history.title }}</div >
313- <div >{{ history.note[0].note }}</div >
314- </div >
315- </div >
316- </Dialog >
276+ :note-history =" getNoteHistoryShownToProponent "
277+ />
317278</template >
318279
319280<style scoped lang="scss">
0 commit comments