1
+ < h2 > Contact Host</ h2 >
2
+ < h4 > Send a message to all hosts of the listings selected below. All fields are required except where stated.</ h4 >
3
+
4
+ < p-panel class ="table-panel ">
5
+ < ng-template pTemplate ="header ">
6
+ < div class ="header-panel ">
7
+ < strong > Included Listings</ strong >
8
+ </ div >
9
+ </ ng-template >
10
+
11
+ < p-table [value] ="extendedListings " [scrollable] ="true " scrollDirection ="vertical " scrollHeight ="425px "
12
+ styleClass ="p-datatable-sm " [(selection)] ="selectedListings ">
13
+ < ng-template pTemplate ="header ">
14
+ < tr >
15
+ < th style ="width: 4rem ">
16
+ < p-tableHeaderCheckbox > </ p-tableHeaderCheckbox >
17
+ </ th >
18
+ < th class ="sortable-header " id ="offeringOrganizationNm_header "
19
+ [class.sorted] ="this.sort && this.sort.prop === 'offeringOrganizationNm' "
20
+ (click) ="onSort('offeringOrganizationNm') ">
21
+ Platform
22
+ < i class ="pi pi-angle-down "
23
+ *ngIf ="this.sort && this.sort.prop === 'offeringOrganizationNm' && this.sort.dir === 'desc' "> </ i >
24
+ < i class ="pi pi-angle-up "
25
+ *ngIf ="this.sort && this.sort.prop === 'offeringOrganizationNm' && this.sort.dir === 'asc' "> </ i >
26
+ </ th >
27
+ < th class ="sortable-header " id ="platformListingNo_header "
28
+ [class.sorted] ="this.sort && this.sort.prop === 'platformListingNo' "
29
+ (click) ="onSort('platformListingNo') ">
30
+ Listing ID
31
+ < i class ="pi pi-angle-down "
32
+ *ngIf ="this.sort && this.sort.prop === 'platformListingNo' && this.sort.dir === 'desc' "> </ i >
33
+ < i class ="pi pi-angle-up "
34
+ *ngIf ="this.sort && this.sort.prop === 'platformListingNo' && this.sort.dir === 'asc' "> </ i >
35
+ </ th >
36
+ < th class ="sortable-header " id ="matchAddressTxt_header "
37
+ [class.sorted] ="this.sort && this.sort.prop === 'matchAddressTxt' "
38
+ (click) ="onSort('matchAddressTxt') ">
39
+ Address (Best Match)
40
+ < i class ="pi pi-angle-down "
41
+ *ngIf ="this.sort && this.sort.prop === 'matchAddressTxt' && this.sort.dir === 'desc' "> </ i >
42
+ < i class ="pi pi-angle-up "
43
+ *ngIf ="this.sort && this.sort.prop === 'matchAddressTxt' && this.sort.dir === 'asc' "> </ i >
44
+ </ th >
45
+
46
+ < th class ="limit-width ">
47
+ Supplier Host
48
+ </ th >
49
+ < th class ="limit-width ">
50
+ Host Name & Emails
51
+ </ th >
52
+ </ tr >
53
+ </ ng-template >
54
+
55
+ < ng-template pTemplate ="body " let-listing >
56
+ < tr class ="small-text ">
57
+ < td >
58
+ < p-tableCheckbox [value] ="listing "
59
+ [disabled] ="!listing.hasAtLeastOneValidHostEmail "> </ p-tableCheckbox >
60
+ </ td >
61
+ < td > {{ listing.offeringOrganizationNm }}</ td >
62
+ < td >
63
+ < a target ="_blank " [href] ="listing.platformListingUrl "> {{ listing.platformListingNo }}</ a >
64
+ </ td >
65
+ < td > {{ listing.matchAddressTxt }}
66
+ </ td >
67
+ < td > {{ listing.listingContactNamesTxt }}
68
+ </ td >
69
+
70
+ < td class ="host-info limit-width ">
71
+ < span class ="tip " (click) ="op.toggle($event) ">
72
+ < i class ="pi pi-info-circle "> </ i >
73
+ </ span >
74
+ < p-overlayPanel #op >
75
+ < span class ="host-data " *ngFor ="let hostData of listing.hosts "
76
+ [class.invalid-email] ="!hostData.hasValidEmail "> {{hostData.fullNm}}
77
+ {{hostData.emailAddressDsc}}< br > </ span >
78
+ </ p-overlayPanel >
79
+ < span class ="host-data " *ngFor ="let hostData of listing.hosts ">
80
+ {{hostData.emailAddressDsc}};</ span >
81
+ </ td >
82
+ </ tr >
83
+ </ ng-template >
84
+ </ p-table >
85
+ </ p-panel >
86
+
87
+ < form *ngIf ="myForm " [formGroup] ="myForm ">
88
+ < p-panel class ="message-panel ">
89
+ < ng-template pTemplate ="header ">
90
+ < div class ="header-panel ">
91
+ < strong > Message to Host</ strong >
92
+ </ div >
93
+ </ ng-template >
94
+
95
+ < div class ="form-group-row ">
96
+ < div class ="form-group-row-col ">
97
+ < label for ="comment "> Compose a Message That Will Be Sent to All Hosts</ label >
98
+ </ div >
99
+ < div class ="form-group-row-col ">
100
+ < textarea #textarea rows ="5 " cols ="30 " maxlength ="3800 " class ="full-width-text-field custom-details "
101
+ formControlName ="comment " placeholder ="Enter Messages here... " pInputTextarea id ="comment "
102
+ name ="comment "> </ textarea >
103
+ < span class ="limit-text " [class.almost-limit-text] ="textarea.value.length > 3750 "
104
+ [class.limited-text] ="textarea.value.length > 3799 "> {{textarea.value.length}}/3800</ span >
105
+ </ div >
106
+ < div class ="form-group-row-col validation-errors " *ngIf ="!commentControl.pristine && commentControl.errors ">
107
+ < small id ="invalidcomment " *ngIf ="commentControl.errors?.['required'] ">
108
+ Please make sure the email format you have entered is correct
109
+ </ small >
110
+ </ div >
111
+ </ div >
112
+ </ p-panel >
113
+
114
+ < p-panel class ="extras-panel ">
115
+ < ng-template pTemplate ="header ">
116
+ < div class ="header-panel ">
117
+ < strong > Add Additional Information</ strong >
118
+ </ div >
119
+ </ ng-template >
120
+
121
+ < div class ="form-group-row ">
122
+ < div class ="form-group-row-col ">
123
+ < span class ="info-tooltip " [tooltipOptions] ="tooltipOptions " pTooltip ="Enter additional email addresses in the BCC field
124
+ separated by commas—this will be copied on all
125
+ emails to selected listings " tooltipPosition ="top " placeholder ="Top "> </ span >
126
+ < label for ="ccList "> Add BCCs</ label >
127
+ </ div >
128
+ < div class ="form-group-row-col ">
129
+ < textarea formControlName ="ccList " placeholder ="Enter Emails Here... " rows ="1 " cols ="20 " pInputTextarea
130
+ id ="ccList " name ="ccList " class ="full-width-text-field "> </ textarea >
131
+ </ div >
132
+ < div class ="form-group-row-col validation-errors " *ngIf ="!ccListControl.pristine && ccListControl.errors ">
133
+ < small id ="invalidCcList " *ngIf ="ccListControl.errors?.['invalidEmailList'] ">
134
+ Please make sure the email format you have entered is correct
135
+ </ small >
136
+ </ div >
137
+ </ div >
138
+ </ p-panel >
139
+ </ form >
140
+ < div class ="actions " *ngIf ="selectedListings ">
141
+ < button pButton id ="submit-btn " [disabled] ="!extendedListings.length || !myForm.valid " class =""
142
+ (click) ="submitPreview() "> Review</ button >
143
+ < button pButton id ="cancel-btn " class ="outline-btn " (click) ="cancel() "> Cancel</ button >
144
+ </ div >
145
+
146
+ < p-dialog class ="preview-dialog " header ="Message to Hosts " [(visible)] ="showPreviewDialog " [modal] ="true "
147
+ [style] ="{ width: '50vw' } " [draggable] ="false " [resizable] ="false ">
148
+
149
+ < div class ="note ">
150
+ < div class ="title ">
151
+ < i class ="pi pi-info-circle "> </ i >
152
+ < strong > Please Note</ strong >
153
+ </ div >
154
+ < div class ="content ">
155
+ When you click submit, this email will be personalized with the relevant listing URL and sent to all hosts
156
+ for each selected listing.
157
+ </ div >
158
+ </ div >
159
+
160
+ < div class ="preview-html " [innerHTML] ="previewText "> </ div >
161
+ < ng-template pTemplate ="footer ">
162
+ < div class ="actions popup-actions ">
163
+ < button pButton id ="submit-preview-btn " class ="" (click) ="submitAfterPreview() "> Submit</ button >
164
+ < button pButton id ="cancel-preview-btn " class ="outline-btn " (click) ="cancelPreview() "> Cancel</ button >
165
+ </ div >
166
+ </ ng-template >
167
+ </ p-dialog >
0 commit comments