|
4 | 4 | <!-- Header Bar --> |
5 | 5 | <div class="slds-p-around_medium slds-border_bottom"> |
6 | 6 | <div class="slds-grid slds-grid_align-spread slds-grid_vertical-align-center"> |
7 | | - |
| 7 | + <!-- View Select, Date Range, Navigation --> |
8 | 8 | <!-- View Select (Far Left) --> |
9 | 9 | <div class="slds-col slds-grow-none"> |
10 | 10 | <lightning-combobox |
|
16 | 16 | </lightning-combobox> |
17 | 17 | </div> |
18 | 18 | <!-- /View Select --> |
19 | | - |
20 | 19 | <!-- Title (Date Range, Centered) --> |
21 | 20 | <div class="slds-col slds-text-align_center slds-grid slds-grid_align-center slds-grid_vertical-align-center"> |
22 | 21 | <div class="slds-box slds-p-horizontal_small slds-m-right_small" style="border: 1px solid #747474; border-radius: 0.25rem; padding: 0 8px; line-height: 2rem;"> |
|
28 | 27 | </div> |
29 | 28 | </div> |
30 | 29 | <!-- /Title (Date Range) --> |
31 | | - |
32 | 30 | <!-- Date Navigation (Far Right) --> |
33 | 31 | <div class="slds-col slds-grow-none slds-grid slds-grid_align-end"> |
34 | 32 | <div class="slds-show_inline-block slds-m-right_small"> |
|
49 | 47 | </lightning-button-icon> |
50 | 48 | </lightning-button-group> |
51 | 49 | </div> |
52 | | - <div class="slds-show_inline-block"> |
| 50 | + <div class="slds-show_inline-block slds-m-right_small"> |
53 | 51 | <lightning-input |
54 | 52 | label="Date" |
55 | 53 | type="date" |
|
60 | 58 | onchange={navigateToDay}> |
61 | 59 | </lightning-input> |
62 | 60 | </div> |
| 61 | + <div class="slds-show_inline-block slds-m-right_small"> |
| 62 | + <lightning-button-icon |
| 63 | + icon-name="utility:filterList" |
| 64 | + variant="border-filled" |
| 65 | + onclick={toggleFilterPanel}> |
| 66 | + </lightning-button-icon> |
| 67 | + </div> |
63 | 68 | </div> |
64 | 69 | <!-- /Date Navigation --> |
65 | | - |
66 | 70 | </div> |
67 | 71 | </div> |
68 | 72 | <!-- /Header Bar --> |
69 | | - |
70 | | - <!-- Gantt Chart --> |
71 | | - <div class="slds-scrollable_x"> |
72 | | - <div class="slds-p-around_medium lwc-chart_container"> |
73 | | - <!-- Timeline --> |
74 | | - <div class="slds-grid lwc-timeline"> |
75 | | - <div |
76 | | - if:false={isResourceView} |
77 | | - class="slds-col slds-size_1-of-6 slds-align-bottom"> |
78 | | - <div class="slds-text-heading_medium slds-p-around_small"> |
79 | | - Resources |
80 | | - </div> |
81 | | - </div> |
82 | | - <div class="slds-col"> |
83 | | - <div class="slds-grid"> |
84 | | - <template for:each={dates} for:item="date"> |
85 | | - <div |
86 | | - key={date} |
87 | | - class="slds-col lwc-timeline_month-container" |
88 | | - style={date.style}> |
89 | | - <div class="slds-grid"> |
90 | | - <div class="slds-col slds-has-flexi-truncate"> |
91 | | - <div |
92 | | - class="lwc-timeline_month slds-p-around_xx-small slds-theme_shade slds-text-align_center slds-text-color_weak slds-text-body_small slds-m-horizontal_x-small slds-truncate"> |
93 | | - {date.name} |
| 73 | + <div class="slds-grid"> |
| 74 | + <!-- Main Content (Gantt Chart) --> |
| 75 | + <div class="slds-col lwc-main-content"> |
| 76 | + <div class="slds-scrollable_x"> |
| 77 | + <div class="slds-p-around_medium lwc-chart_container"> |
| 78 | + <!-- Timeline, Allocation Table --> |
| 79 | + <!-- Timeline --> |
| 80 | + <div class="slds-grid lwc-timeline"> |
| 81 | + <div |
| 82 | + if:false={isResourceView} |
| 83 | + class="slds-col slds-size_1-of-6 slds-align-bottom"> |
| 84 | + <div class="slds-text-heading_medium slds-p-around_small"> |
| 85 | + Resources |
| 86 | + </div> |
| 87 | + </div> |
| 88 | + <div class="slds-col"> |
| 89 | + <div class="slds-grid"> |
| 90 | + <template for:each={dates} for:item="date"> |
| 91 | + <div key={date} class="slds-col lwc-timeline_month-container" style={date.style}> |
| 92 | + <div class="slds-grid"> |
| 93 | + <div class="slds-col slds-has-flexi-truncate"> |
| 94 | + <div |
| 95 | + class="lwc-timeline_month slds-p-around_xx-small slds-theme_shade slds-text-align_center slds-text-color_weak slds-text-body_small slds-m-horizontal_x-small slds-truncate"> |
| 96 | + {date.name} |
| 97 | + </div> |
| 98 | + </div> |
94 | 99 | </div> |
95 | | - </div> |
96 | | - </div> |
97 | | - <div class="slds-grid"> |
98 | | - <template for:each={date.days} for:item="day"> |
99 | | - <div key={day} class={day.class}> |
100 | | - <div if:true={day.dayName}>{day.dayName}</div> |
101 | | - <div>{day.label}</div> |
| 100 | + <div class="slds-grid"> |
| 101 | + <template for:each={date.days} for:item="day"> |
| 102 | + <div key={day} class={day.class}> |
| 103 | + <div if:true={day.dayName}>{day.dayName}</div> |
| 104 | + <div>{day.label}</div> |
| 105 | + </div> |
| 106 | + </template> |
102 | 107 | </div> |
103 | | - </template> |
104 | | - </div> |
| 108 | + </div> |
| 109 | + </template> |
105 | 110 | </div> |
| 111 | + </div> |
| 112 | + </div> |
| 113 | + <!-- /Timeline --> |
| 114 | + <!-- Allocation Table --> |
| 115 | + <!-- Resource Rows --> |
| 116 | + <template if:true={resources.length}> |
| 117 | + <template for:each={resources} for:item="resource"> |
| 118 | + <c-gantt_chart_resource |
| 119 | + key={resource.Id} |
| 120 | + class="lwc-resource-component" |
| 121 | + is-resource-view={isResourceView} |
| 122 | + resource={resource} |
| 123 | + project-id={projectId} |
| 124 | + date-increment={view.slotSize} |
| 125 | + start-date={startDate} |
| 126 | + end-date={endDate} |
| 127 | + onrefresh={handleRefresh}> |
| 128 | + </c-gantt_chart_resource> |
106 | 129 | </template> |
| 130 | + </template> |
| 131 | + <!-- /Resource Rows --> |
| 132 | + <!-- Empty State --> |
| 133 | + <div |
| 134 | + if:false={resources.length} |
| 135 | + class="slds-text-align_center slds-p-around_medium"> |
| 136 | + <span class="slds-text-color_weak">No Resources to Show</span> |
107 | 137 | </div> |
| 138 | + <!-- /Empty State --> |
| 139 | + <!-- /Allocation Table --> |
108 | 140 | </div> |
109 | 141 | </div> |
110 | | - <!-- /Timeline --> |
| 142 | + </div> |
| 143 | + <!-- /Main Content --> |
| 144 | + <!-- Filter Panel --> |
| 145 | + <div if:true={isFilterPanelOpen} class="lwc-filter-panel"> |
| 146 | + <div class="slds-p-around_medium slds-border_left"> |
| 147 | + <h3 class="slds-text-heading_small slds-m-bottom_medium slds-m-top_medium">Filters</h3> |
| 148 | + |
| 149 | + <!-- Resource Filter --> |
| 150 | + <template if:false={isResourceView}> |
| 151 | + <lightning-record-picker |
| 152 | + data-id="resourcePicker" |
| 153 | + label="Resource" |
| 154 | + placeholder="Search Resources..." |
| 155 | + object-api-name="Resource__c" |
| 156 | + onchange={handleResourceChange}> |
| 157 | + </lightning-record-picker> |
| 158 | + </template> |
111 | 159 |
|
112 | | - <!-- Allocation Table --> |
113 | | - <!-- Resource Rows --> |
114 | | - <template if:true={resources.length}> |
115 | | - <template for:each={resources} for:item="resource"> |
116 | | - <c-gantt_chart_resource |
117 | | - key={resource.Id} |
118 | | - class="lwc-resource-component" |
119 | | - is-resource-view={isResourceView} |
120 | | - resource={resource} |
121 | | - project-id={projectId} |
122 | | - date-increment={view.slotSize} |
123 | | - start-date={startDate} |
124 | | - end-date={endDate} |
125 | | - onrefresh={handleRefresh}> |
126 | | - </c-gantt_chart_resource> |
| 160 | + <!-- Project Filter --> |
| 161 | + <template if:false={isProjectView}> |
| 162 | + <lightning-record-picker |
| 163 | + data-id="projectPicker" |
| 164 | + label="Project" |
| 165 | + placeholder="Search Projects..." |
| 166 | + object-api-name="Project__c" |
| 167 | + onchange={handleProjectChange}> |
| 168 | + </lightning-record-picker> |
127 | 169 | </template> |
128 | | - </template> |
129 | | - <!-- /Resource Rows --> |
130 | 170 |
|
131 | | - <!-- Empty State --> |
132 | | - <div |
133 | | - if:false={resources.length} |
134 | | - class="slds-text-align_center slds-p-around_medium"> |
135 | | - <span class="slds-text-color_weak">No Resources to Show</span> |
| 171 | + <lightning-button-group class="slds-m-top_medium"> |
| 172 | + <lightning-button |
| 173 | + label="Apply Filters" |
| 174 | + variant="brand" |
| 175 | + onclick={applyFilters}> |
| 176 | + </lightning-button> |
| 177 | + <lightning-button |
| 178 | + label="Clear Filters" |
| 179 | + variant="neutral" |
| 180 | + onclick={clearFilters}> |
| 181 | + </lightning-button> |
| 182 | + </lightning-button-group> |
136 | 183 | </div> |
137 | | - <!-- /Empty State --> |
138 | | - <!-- /Allocation Table --> |
139 | 184 | </div> |
| 185 | + <!-- /Filter Panel --> |
140 | 186 | </div> |
141 | | - <!-- /Gantt Chart --> |
142 | 187 | </div> |
143 | 188 | </div> |
144 | 189 | </template> |
0 commit comments