@nside/wefa 0.3.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/README.md +46 -3
  2. package/dist/LegalConsent-9nOroDoA.cjs +1 -0
  3. package/dist/LegalConsent-CrPVZOxx.js +151 -0
  4. package/dist/LegalDocument-CVJiGmPJ.cjs +109 -0
  5. package/dist/{LegalDocument-BhoEpJ2O.js → LegalDocument-DwVhwjIf.js} +236 -215
  6. package/dist/{LoginView-kH440cCh.js → LoginView-DUPa_PsC.js} +3 -3
  7. package/dist/{LoginView-IIkXXw3R.cjs → LoginView-Dihs8n_X.cjs} +1 -1
  8. package/dist/{LogoutView-DGqh4bP7.js → LogoutView-DAh7MrFi.js} +3 -3
  9. package/dist/{LogoutView-B90MA-_Q.cjs → LogoutView-Fl3nfeJ0.cjs} +1 -1
  10. package/dist/{apiClient-DJdAL3tN.cjs → apiClient-BUS5ZclN.cjs} +1 -1
  11. package/dist/{apiClient-D-kcx_S1.js → apiClient-BbJl566D.js} +1 -1
  12. package/dist/axios-CZvsFspN.js +1887 -0
  13. package/dist/axios-DMqeKDaq.cjs +6 -0
  14. package/dist/containers.cjs +590 -5
  15. package/dist/containers.d.ts +39 -0
  16. package/dist/containers.js +3803 -977
  17. package/dist/{index-Coos428-.js → index--_rUTrqU.js} +308 -282
  18. package/dist/{index-B4vneBZh.cjs → index-B4oFnh1T.cjs} +6 -6
  19. package/dist/index-BHSxFTgZ.js +49 -0
  20. package/dist/{index-BSfhC_wu.cjs → index-BaA_oL1s.cjs} +1 -1
  21. package/dist/{index-CJmnkrIs.cjs → index-Becfy0pF.cjs} +1 -1
  22. package/dist/{index-Dj5oTSEE.js → index-C09d0pI4.js} +15 -15
  23. package/dist/{index-BXrnPbjr.cjs → index-CbQWytWd.cjs} +4 -4
  24. package/dist/{index-DmVIgb18.js → index-CgAb-gZi.js} +11 -11
  25. package/dist/{index-B53YL3vD.cjs → index-DFOQKDki.cjs} +2 -2
  26. package/dist/index-DFSkcsx-.cjs +943 -0
  27. package/dist/{index-CEz0St1t.js → index-DQFN7qxo.js} +7 -7
  28. package/dist/index-DRozw3P8.js +167 -0
  29. package/dist/index-DfCQoHSf.cjs +146 -0
  30. package/dist/index-DkuJMEY1.js +6731 -0
  31. package/dist/{index-bRjoenrr.js → index-Dv6jyKbT.js} +12 -12
  32. package/dist/{index-Bl3JVLei.cjs → index-EDm9-cRY.cjs} +1 -1
  33. package/dist/index-IGN7_cyg.cjs +2 -0
  34. package/dist/{index-DGvdYnh3.js → index-lFl6UsTa.js} +7 -7
  35. package/dist/index-lQmq7gxp.cjs +54 -0
  36. package/dist/{index-FS8xE7Mo.js → index-xUb0UC07.js} +5 -5
  37. package/dist/lib-C3DWunRS.js +26376 -0
  38. package/dist/lib-COvHzA2Y.cjs +2104 -0
  39. package/dist/lib.cjs +1 -1
  40. package/dist/lib.d.ts +160 -7
  41. package/dist/lib.js +33 -30
  42. package/dist/libRoutes-B-H3e9wZ.js +22 -0
  43. package/dist/libRoutes-Cl3TklhN.cjs +1 -0
  44. package/dist/network.cjs +1 -1
  45. package/dist/network.d.ts +19 -0
  46. package/dist/network.js +3 -3
  47. package/dist/router.cjs +1 -1
  48. package/dist/router.d.ts +26 -4
  49. package/dist/router.js +10 -10
  50. package/package.json +55 -48
  51. package/src/assets/main.css +2 -2
  52. package/src/components/AutoroutedBreadcrumb/AutoroutedBreadcrumb.mdx +8 -8
  53. package/src/components/AutoroutedBreadcrumb/AutoroutedBreadcrumb.spec.ts +86 -45
  54. package/src/components/AutoroutedBreadcrumb/AutoroutedBreadcrumb.vue +29 -21
  55. package/src/components/AvatarComponent/AvatarComponent.mdx +63 -0
  56. package/src/components/AvatarComponent/AvatarComponent.stories.ts +98 -0
  57. package/src/components/AvatarComponent/AvatarComponent.vue +115 -0
  58. package/src/components/GanttChartComponent/GanttChartComponent.mdx +143 -0
  59. package/src/components/GanttChartComponent/GanttChartComponent.spec.ts +257 -0
  60. package/src/components/GanttChartComponent/GanttChartComponent.stories.ts +253 -0
  61. package/src/components/GanttChartComponent/GanttChartComponent.vue +220 -0
  62. package/src/components/GanttChartComponent/GanttChartGrid.vue +66 -0
  63. package/src/components/GanttChartComponent/GanttChartHeaderGrid.vue +167 -0
  64. package/src/components/GanttChartComponent/GanttChartHeaderLabel.vue +23 -0
  65. package/src/components/GanttChartComponent/GanttChartLinksOverlay.vue +105 -0
  66. package/src/components/GanttChartComponent/GanttChartRowGrid.vue +288 -0
  67. package/src/components/GanttChartComponent/GanttChartRowLabel.vue +32 -0
  68. package/src/components/GanttChartComponent/composables/useGanttLinks.ts +212 -0
  69. package/src/components/GanttChartComponent/composables/useGanttSizing.ts +42 -0
  70. package/src/components/GanttChartComponent/ganttChartLayout.ts +211 -0
  71. package/src/components/GanttChartComponent/ganttChartTypes.ts +24 -0
  72. package/src/components/GanttChartComponent/index.ts +1 -0
  73. package/src/components/NetworkButton/ApiMutationButton.vue +7 -5
  74. package/src/components/NetworkButton/ApiQueryButton.vue +6 -4
  75. package/src/components/PlotlyComponent/PlotlyComponent.stories.ts +74 -45
  76. package/src/containers/BareContainer/BareContainer.mdx +1 -1
  77. package/src/containers/LayoutContainer/LayoutContainer.mdx +128 -0
  78. package/src/containers/LayoutContainer/LayoutContainer.spec.ts +151 -0
  79. package/src/containers/LayoutContainer/LayoutContainer.stories.ts +292 -0
  80. package/src/containers/LayoutContainer/LayoutContainer.vue +53 -0
  81. package/src/containers/LayoutContainer/MobileNavigationComponent/MobileNavigationComponent.spec.ts +139 -0
  82. package/src/containers/LayoutContainer/MobileNavigationComponent/MobileNavigationComponent.vue +63 -0
  83. package/src/containers/LayoutContainer/SideNavigationComponent/BottomComponent/BottomComponent.spec.ts +39 -0
  84. package/src/containers/LayoutContainer/SideNavigationComponent/BottomComponent/BottomComponent.vue +9 -0
  85. package/src/containers/LayoutContainer/SideNavigationComponent/MainComponent/MainComponent.spec.ts +175 -0
  86. package/src/containers/LayoutContainer/SideNavigationComponent/MainComponent/MainComponent.vue +163 -0
  87. package/src/containers/LayoutContainer/SideNavigationComponent/MainComponent/NavigationLinkComponent.spec.ts +105 -0
  88. package/src/containers/LayoutContainer/SideNavigationComponent/MainComponent/NavigationLinkComponent.vue +45 -0
  89. package/src/containers/LayoutContainer/SideNavigationComponent/SideNavigationComponent.spec.ts +78 -0
  90. package/src/containers/LayoutContainer/SideNavigationComponent/SideNavigationComponent.vue +29 -0
  91. package/src/containers/LayoutContainer/SideNavigationComponent/TopComponent/TopComponent.spec.ts +60 -0
  92. package/src/containers/LayoutContainer/SideNavigationComponent/TopComponent/TopComponent.vue +56 -0
  93. package/src/containers/LayoutContainer/UserMenuTriggerComponent/UserMenuTriggerComponent.spec.ts +96 -0
  94. package/src/containers/LayoutContainer/UserMenuTriggerComponent/UserMenuTriggerComponent.vue +80 -0
  95. package/src/containers/LayoutContainer/index.ts +1 -0
  96. package/src/containers/NavbarContainer/NavbarContainer.mdx +1 -1
  97. package/src/containers/RoutedTabsComponent/RoutedTabsComponent.mdx +3 -3
  98. package/src/containers/SideMenuContainer/SideMenuContainer.mdx +1 -1
  99. package/src/containers/helpers.ts +6 -3
  100. package/src/containers/index.ts +2 -0
  101. package/src/containers/storybook/PlaceholderView.vue +1 -1
  102. package/src/containers/storybook/PrimeComponents.stories.ts +17 -0
  103. package/src/containers/storybook/PrimeComponentsShowcase.vue +587 -0
  104. package/src/containers/storybook/overview.mdx +36 -36
  105. package/src/demo/App.vue +7 -0
  106. package/src/{demo.ts → demo/main.ts} +8 -9
  107. package/src/demo/router.ts +65 -19
  108. package/src/demo/views/PlaygroundView.vue +86 -0
  109. package/src/demo/views/ShowcaseView.vue +41 -0
  110. package/src/lib.ts +3 -1
  111. package/src/locales/Translation.mdx +2 -2
  112. package/src/locales/en/avatar.json +3 -0
  113. package/src/locales/en/gantt_chart.json +6 -0
  114. package/src/locales/en/navigation.json +3 -1
  115. package/src/locales/index.ts +0 -4
  116. package/src/plugins/legalConsent/views/__tests__/LegalConsent.test.ts +12 -7
  117. package/src/router/guards.ts +4 -4
  118. package/src/router/libRoutes.ts +6 -2
  119. package/src/router/router.mdx +107 -66
  120. package/src/router/types.ts +24 -3
  121. package/src/stores/__tests__/backend/jwt.test.ts +4 -4
  122. package/src/stores/__tests__/backend/oauth.test.ts +104 -0
  123. package/src/stores/__tests__/backend/token.test.ts +4 -4
  124. package/src/stores/authentication.mdx +138 -0
  125. package/src/stores/backend/common.ts +89 -0
  126. package/src/stores/backend/constants.ts +22 -0
  127. package/src/stores/backend/schemes/jwt.ts +208 -0
  128. package/src/stores/backend/schemes/oauth.ts +142 -0
  129. package/src/stores/backend/schemes/token.ts +122 -0
  130. package/src/stores/backend/types.ts +96 -0
  131. package/src/stores/backend.ts +21 -427
  132. package/src/stores/index.ts +6 -0
  133. package/src/theme/index.ts +2 -0
  134. package/src/theme/nside.ts +157 -0
  135. package/src/utils/color.spec.ts +24 -0
  136. package/src/utils/color.ts +100 -0
  137. package/src/utils/translations.ts +0 -4
  138. package/dist/LegalConsent-CEcXZml6.cjs +0 -1
  139. package/dist/LegalConsent-Dzq3fdnt.js +0 -277
  140. package/dist/LegalDocument-CS3MnOcV.cjs +0 -109
  141. package/dist/axios-ClRPr3Xn.js +0 -1777
  142. package/dist/axios-Dcidtc2l.cjs +0 -6
  143. package/dist/index-Bc699sOR.js +0 -4997
  144. package/dist/index-CL_OJMNr.cjs +0 -55
  145. package/dist/index-CTNsucOq.cjs +0 -147
  146. package/dist/index-CwLAV8WF.js +0 -210
  147. package/dist/index-FrfvunRp.cjs +0 -146
  148. package/dist/lib-BBJH9d11.cjs +0 -2792
  149. package/dist/lib-Y8FPgwH4.js +0 -20886
  150. package/dist/libRoutes-BsneoQ4G.js +0 -18
  151. package/dist/libRoutes-BzeZrIaK.cjs +0 -1
  152. package/src/demo/DemoApp.vue +0 -13
  153. package/src/demo/ShowcaseView.vue +0 -39
  154. package/src/demo/demo.css +0 -15
  155. /package/src/demo/{DemoContent.vue → views/DemoContent.vue} +0 -0
  156. /package/src/demo/{DemoView.vue → views/DemoView.vue} +0 -0
@@ -0,0 +1,587 @@
1
+ <template>
2
+ <div class="min-h-[980px] bg-surface-50 p-6 text-surface-900">
3
+ <div class="mx-auto flex w-full max-w-6xl flex-col gap-6">
4
+ <Toolbar class="rounded-2xl border border-surface-200 bg-surface-0 px-4 py-3 shadow-sm">
5
+ <template #start>
6
+ <div class="flex items-center gap-3">
7
+ <Avatar label="WF" shape="circle" class="bg-primary-500 text-surface-0" />
8
+ <div>
9
+ <div class="text-sm font-semibold">Prime Components Lab</div>
10
+ <div class="text-xs text-surface-500">Operations demo workspace</div>
11
+ </div>
12
+ <Badge value="Live" severity="success" />
13
+ </div>
14
+ </template>
15
+ <template #end>
16
+ <div class="flex items-center gap-2">
17
+ <Button label="Sync" icon="pi pi-refresh" outlined />
18
+ <SplitButton label="New" icon="pi pi-plus" :model="splitButtonItems" />
19
+ <div class="flex items-center gap-2 text-xs text-surface-500">
20
+ <span>Live mode</span>
21
+ <ToggleSwitch v-model="liveMode" />
22
+ </div>
23
+ </div>
24
+ </template>
25
+ </Toolbar>
26
+
27
+ <div class="flex flex-wrap items-center justify-between gap-4">
28
+ <Breadcrumb :home="breadcrumbHome" :model="breadcrumbItems" class="max-w-full" />
29
+ <Steps :model="steps" :active-step="1" class="min-w-[280px]" />
30
+ </div>
31
+
32
+ <div class="grid gap-4 lg:grid-cols-3">
33
+ <Card class="border border-surface-200 shadow-sm">
34
+ <template #title>Active Orders</template>
35
+ <template #subtitle>Last 24 hours</template>
36
+ <template #content>
37
+ <div class="flex items-center justify-between">
38
+ <div>
39
+ <div class="text-3xl font-semibold">42</div>
40
+ <div class="text-xs text-surface-500">12% above baseline</div>
41
+ </div>
42
+ <Knob v-model="orderCompletion" :size="80" :stroke-width="8" :min="0" :max="100" />
43
+ </div>
44
+ <Divider class="my-4" />
45
+ <div class="flex items-center justify-between text-xs text-surface-600">
46
+ <span>Completion</span>
47
+ <span>{{ orderCompletion }}%</span>
48
+ </div>
49
+ <ProgressBar :value="orderCompletion" />
50
+ </template>
51
+ </Card>
52
+
53
+ <Card class="border border-surface-200 shadow-sm">
54
+ <template #title>Team Coverage</template>
55
+ <template #subtitle>Shift rotation</template>
56
+ <template #content>
57
+ <div class="flex items-center gap-3">
58
+ <AvatarGroup>
59
+ <Avatar label="AM" />
60
+ <Avatar label="KS" />
61
+ <Avatar label="JL" />
62
+ <Avatar label="TR" />
63
+ </AvatarGroup>
64
+ <Badge value="8" severity="info" />
65
+ </div>
66
+ <Divider class="my-4" />
67
+ <div class="flex items-center justify-between">
68
+ <div class="flex flex-wrap gap-2">
69
+ <Chip label="On-call" icon="pi pi-bell" />
70
+ <Chip label="Remote" icon="pi pi-home" />
71
+ </div>
72
+ <Tag value="Balanced" severity="success" />
73
+ </div>
74
+ <div class="mt-4 flex items-center gap-2">
75
+ <ProgressSpinner class="h-8 w-8" stroke-width="6" />
76
+ <span class="text-xs text-surface-500">Syncing roster</span>
77
+ </div>
78
+ </template>
79
+ </Card>
80
+
81
+ <Card class="border border-surface-200 shadow-sm">
82
+ <template #title>Inventory Alerts</template>
83
+ <template #subtitle>Critical materials</template>
84
+ <template #content>
85
+ <div class="flex items-center justify-between">
86
+ <div>
87
+ <div class="text-3xl font-semibold text-amber-600">7</div>
88
+ <div class="text-xs text-surface-500">Items below threshold</div>
89
+ </div>
90
+ <Tag value="Priority" severity="warning" />
91
+ </div>
92
+ <Divider class="my-4" />
93
+ <div class="flex flex-col gap-2 text-xs text-surface-600">
94
+ <div class="flex items-center justify-between">
95
+ <span>Cooling Modules</span>
96
+ <Badge value="2" severity="danger" />
97
+ </div>
98
+ <div class="flex items-center justify-between">
99
+ <span>Packaging</span>
100
+ <Badge value="5" severity="warning" />
101
+ </div>
102
+ </div>
103
+ </template>
104
+ </Card>
105
+ </div>
106
+
107
+ <div class="grid gap-6 lg:grid-cols-3">
108
+ <div class="flex flex-col gap-6 lg:col-span-2">
109
+ <Panel header="Work Orders" class="border border-surface-200 shadow-sm">
110
+ <DataTable :value="workOrders" paginator :rows="5" striped-rows class="text-sm">
111
+ <Column field="id" header="ID" />
112
+ <Column field="title" header="Title" />
113
+ <Column field="owner" header="Owner" />
114
+ <Column field="status" header="Status">
115
+ <template #body="{ data }">
116
+ <Tag :value="data.status" :severity="statusSeverity(data.status)" />
117
+ </template>
118
+ </Column>
119
+ <Column field="progress" header="Progress">
120
+ <template #body="{ data }">
121
+ <div class="flex items-center gap-2">
122
+ <ProgressBar :value="data.progress" class="w-28" />
123
+ <span class="text-xs text-surface-500">{{ data.progress }}%</span>
124
+ </div>
125
+ </template>
126
+ </Column>
127
+ </DataTable>
128
+ </Panel>
129
+
130
+ <Panel header="New Work Order" class="border border-surface-200 shadow-sm">
131
+ <Tabs v-model:value="activeTab">
132
+ <TabList>
133
+ <Tab :value="0">Details</Tab>
134
+ <Tab :value="1">Review</Tab>
135
+ </TabList>
136
+ <TabPanels>
137
+ <TabPanel :value="0">
138
+ <div class="grid gap-4 md:grid-cols-2">
139
+ <div class="flex flex-col gap-2">
140
+ <label class="text-xs font-semibold text-surface-600" for="title"
141
+ >Title</label
142
+ >
143
+ <InputText id="title" v-model="form.title" placeholder="Calibration sweep" />
144
+ </div>
145
+ <div class="flex flex-col gap-2">
146
+ <label class="text-xs font-semibold text-surface-600" for="code"
147
+ >Work code</label
148
+ >
149
+ <InputMask id="code" v-model="form.code" mask="AA-999" placeholder="WF-301" />
150
+ </div>
151
+ <div class="flex flex-col gap-2">
152
+ <label class="text-xs font-semibold text-surface-600">Priority</label>
153
+ <Select
154
+ v-model="form.priority"
155
+ :options="priorityOptions"
156
+ option-label="label"
157
+ placeholder="Select"
158
+ />
159
+ </div>
160
+ <div class="flex flex-col gap-2">
161
+ <label class="text-xs font-semibold text-surface-600">Assignee</label>
162
+ <AutoComplete
163
+ v-model="form.assignee"
164
+ :suggestions="filteredAssignees"
165
+ placeholder="Search team"
166
+ @complete="onAssigneeComplete"
167
+ />
168
+ </div>
169
+ <div class="flex flex-col gap-2">
170
+ <label class="text-xs font-semibold text-surface-600">Due date</label>
171
+ <Calendar v-model="form.dueDate" show-icon date-format="M dd, yy" />
172
+ </div>
173
+ <div class="flex flex-col gap-2">
174
+ <label class="text-xs font-semibold text-surface-600">Budget</label>
175
+ <InputNumber
176
+ v-model="form.budget"
177
+ mode="currency"
178
+ currency="USD"
179
+ locale="en-US"
180
+ />
181
+ </div>
182
+ <div class="flex flex-col gap-2">
183
+ <label class="text-xs font-semibold text-surface-600">Teams</label>
184
+ <MultiSelect
185
+ v-model="form.teams"
186
+ :options="teamOptions"
187
+ option-label="label"
188
+ placeholder="Assign teams"
189
+ />
190
+ </div>
191
+ <div class="flex flex-col gap-2">
192
+ <label class="text-xs font-semibold text-surface-600">Stage</label>
193
+ <SelectButton v-model="form.stage" :options="stageOptions" />
194
+ </div>
195
+ </div>
196
+
197
+ <Divider class="my-4" />
198
+
199
+ <div class="grid gap-4 lg:grid-cols-3">
200
+ <div class="flex flex-col gap-2">
201
+ <label class="text-xs font-semibold text-surface-600">Confidence</label>
202
+ <Slider v-model="form.confidence" class="mt-2" />
203
+ <span class="text-xs text-surface-500">{{ form.confidence }}%</span>
204
+ </div>
205
+ <div class="flex flex-col gap-2">
206
+ <label class="text-xs font-semibold text-surface-600">Quality rating</label>
207
+ <Rating v-model="form.rating" :cancel="false" />
208
+ </div>
209
+ <div class="flex flex-col gap-2">
210
+ <label class="text-xs font-semibold text-surface-600">Highlight color</label>
211
+ <ColorPicker v-model="form.color" format="hex" />
212
+ </div>
213
+ <div class="flex items-center gap-2">
214
+ <Checkbox v-model="form.notify" :binary="true" input-id="notify" />
215
+ <label class="text-xs text-surface-600" for="notify"
216
+ >Notify stakeholders</label
217
+ >
218
+ </div>
219
+ <div class="flex items-center gap-2">
220
+ <RadioButton v-model="form.urgency" input-id="urgent" value="urgent" />
221
+ <label class="text-xs text-surface-600" for="urgent">Urgent</label>
222
+ <RadioButton v-model="form.urgency" input-id="standard" value="standard" />
223
+ <label class="text-xs text-surface-600" for="standard">Standard</label>
224
+ </div>
225
+ <div class="flex items-center gap-2">
226
+ <ToggleSwitch v-model="form.requiresAudit" />
227
+ <span class="text-xs text-surface-600">Audit required</span>
228
+ </div>
229
+ </div>
230
+ </TabPanel>
231
+ <TabPanel :value="1">
232
+ <div class="flex flex-col gap-4">
233
+ <Message severity="info"
234
+ >Ready to submit when validations are complete.</Message
235
+ >
236
+ <InlineMessage severity="success"
237
+ >All required fields are filled.</InlineMessage
238
+ >
239
+ <Accordion :value="['0']" multiple>
240
+ <AccordionPanel value="0">
241
+ <AccordionHeader>Checklist</AccordionHeader>
242
+ <AccordionContent>
243
+ <div class="flex flex-col gap-2 text-sm">
244
+ <div class="flex items-center gap-2">
245
+ <Checkbox
246
+ v-model="form.checklist"
247
+ value="brief"
248
+ input-id="check-brief"
249
+ />
250
+ <label for="check-brief">Brief attached</label>
251
+ </div>
252
+ <div class="flex items-center gap-2">
253
+ <Checkbox
254
+ v-model="form.checklist"
255
+ value="resources"
256
+ input-id="check-resources"
257
+ />
258
+ <label for="check-resources">Resources confirmed</label>
259
+ </div>
260
+ </div>
261
+ </AccordionContent>
262
+ </AccordionPanel>
263
+ <AccordionPanel value="1">
264
+ <AccordionHeader>Risk Summary</AccordionHeader>
265
+ <AccordionContent>
266
+ <div class="text-sm text-surface-600">
267
+ Low exposure. Equipment redundancy verified and vendor response within 4
268
+ hours.
269
+ </div>
270
+ </AccordionContent>
271
+ </AccordionPanel>
272
+ </Accordion>
273
+ </div>
274
+ </TabPanel>
275
+ </TabPanels>
276
+ </Tabs>
277
+ </Panel>
278
+ </div>
279
+
280
+ <div class="flex flex-col gap-6">
281
+ <Panel header="Navigation" class="border border-surface-200 shadow-sm">
282
+ <PanelMenu :model="panelMenuItems" class="w-full" />
283
+ </Panel>
284
+
285
+ <Panel header="Focus Queue" class="border border-surface-200 shadow-sm">
286
+ <Listbox
287
+ v-model="selectedQueue"
288
+ :options="queueOptions"
289
+ option-label="label"
290
+ class="w-full"
291
+ />
292
+ <Divider class="my-4" />
293
+ <Timeline :value="timelineEvents" class="text-xs">
294
+ <template #opposite="slotProps">
295
+ <span class="text-surface-500">{{ slotProps.item.time }}</span>
296
+ </template>
297
+ <template #content="slotProps">
298
+ <div class="flex flex-col gap-1">
299
+ <span class="font-semibold text-surface-700">{{ slotProps.item.title }}</span>
300
+ <span class="text-surface-500">{{ slotProps.item.owner }}</span>
301
+ </div>
302
+ </template>
303
+ </Timeline>
304
+ </Panel>
305
+ </div>
306
+ </div>
307
+
308
+ <div class="grid gap-6 lg:grid-cols-2">
309
+ <Panel header="Controls" class="border border-surface-200 shadow-sm">
310
+ <div class="grid gap-4 md:grid-cols-2">
311
+ <div class="flex flex-col gap-2">
312
+ <label class="text-xs font-semibold text-surface-600">Status</label>
313
+ <SelectButton v-model="controls.status" :options="statusOptions" />
314
+ </div>
315
+ <div class="flex flex-col gap-2">
316
+ <label class="text-xs font-semibold text-surface-600">Access</label>
317
+ <Password v-model="controls.accessKey" toggle-mask placeholder="Enter access key" />
318
+ </div>
319
+ <div class="flex flex-col gap-2">
320
+ <label class="text-xs font-semibold text-surface-600">Regions</label>
321
+ <MultiSelect
322
+ v-model="controls.regions"
323
+ :options="regionOptions"
324
+ option-label="label"
325
+ />
326
+ </div>
327
+ <div class="flex flex-col gap-2">
328
+ <label class="text-xs font-semibold text-surface-600">Tags</label>
329
+ <Chips v-model="controls.tags" />
330
+ </div>
331
+ <div class="flex flex-col gap-2">
332
+ <label class="text-xs font-semibold text-surface-600">Throughput</label>
333
+ <InputNumber v-model="controls.throughput" suffix="%" />
334
+ </div>
335
+ <div class="flex flex-col gap-2">
336
+ <label class="text-xs font-semibold text-surface-600">Quick toggle</label>
337
+ <ToggleSwitch v-model="controls.quickToggle" />
338
+ </div>
339
+ </div>
340
+ </Panel>
341
+
342
+ <Panel header="Notes & Files" class="border border-surface-200 shadow-sm">
343
+ <div class="flex flex-col gap-4">
344
+ <Textarea v-model="notes" rows="4" placeholder="Add operational notes" />
345
+ <FileUpload mode="basic" name="files[]" choose-label="Attach" />
346
+ <div class="flex items-center justify-between">
347
+ <div class="flex items-center gap-2">
348
+ <Tag value="Draft" severity="info" />
349
+ <Badge value="3" severity="contrast" />
350
+ </div>
351
+ <Button label="Submit" icon="pi pi-send" />
352
+ </div>
353
+ </div>
354
+ </Panel>
355
+ </div>
356
+ </div>
357
+ </div>
358
+ </template>
359
+
360
+ <script setup lang="ts">
361
+ import { ref } from 'vue'
362
+ import Accordion from 'primevue/accordion'
363
+ import AccordionContent from 'primevue/accordioncontent'
364
+ import AccordionHeader from 'primevue/accordionheader'
365
+ import AccordionPanel from 'primevue/accordionpanel'
366
+ import AutoComplete from 'primevue/autocomplete'
367
+ import Avatar from 'primevue/avatar'
368
+ import AvatarGroup from 'primevue/avatargroup'
369
+ import Badge from 'primevue/badge'
370
+ import Breadcrumb from 'primevue/breadcrumb'
371
+ import Button from 'primevue/button'
372
+ import Calendar from 'primevue/calendar'
373
+ import Card from 'primevue/card'
374
+ import Checkbox from 'primevue/checkbox'
375
+ import Chip from 'primevue/chip'
376
+ import Chips from 'primevue/chips'
377
+ import ColorPicker from 'primevue/colorpicker'
378
+ import Column from 'primevue/column'
379
+ import DataTable from 'primevue/datatable'
380
+ import Divider from 'primevue/divider'
381
+ import FileUpload from 'primevue/fileupload'
382
+ import InlineMessage from 'primevue/inlinemessage'
383
+ import InputMask from 'primevue/inputmask'
384
+ import InputNumber from 'primevue/inputnumber'
385
+ import InputText from 'primevue/inputtext'
386
+ import Knob from 'primevue/knob'
387
+ import Listbox from 'primevue/listbox'
388
+ import Message from 'primevue/message'
389
+ import MultiSelect from 'primevue/multiselect'
390
+ import Panel from 'primevue/panel'
391
+ import PanelMenu from 'primevue/panelmenu'
392
+ import Password from 'primevue/password'
393
+ import ProgressBar from 'primevue/progressbar'
394
+ import ProgressSpinner from 'primevue/progressspinner'
395
+ import RadioButton from 'primevue/radiobutton'
396
+ import Rating from 'primevue/rating'
397
+ import Select from 'primevue/select'
398
+ import SelectButton from 'primevue/selectbutton'
399
+ import Slider from 'primevue/slider'
400
+ import SplitButton from 'primevue/splitbutton'
401
+ import Steps from 'primevue/steps'
402
+ import Tab from 'primevue/tab'
403
+ import TabList from 'primevue/tablist'
404
+ import TabPanel from 'primevue/tabpanel'
405
+ import TabPanels from 'primevue/tabpanels'
406
+ import Tabs from 'primevue/tabs'
407
+ import Tag from 'primevue/tag'
408
+ import Textarea from 'primevue/textarea'
409
+ import Timeline from 'primevue/timeline'
410
+ import ToggleSwitch from 'primevue/toggleswitch'
411
+ import Toolbar from 'primevue/toolbar'
412
+
413
+ const breadcrumbHome = { icon: 'pi pi-home', label: 'Home' }
414
+ const breadcrumbItems = [
415
+ { label: 'Operations', icon: 'pi pi-briefcase' },
416
+ { label: 'Prime Showcase' },
417
+ ]
418
+
419
+ const steps = [{ label: 'Brief' }, { label: 'Design' }, { label: 'Build' }, { label: 'Launch' }]
420
+
421
+ const splitButtonItems = [
422
+ { label: 'Duplicate', icon: 'pi pi-clone' },
423
+ { label: 'Export', icon: 'pi pi-download' },
424
+ { label: 'Archive', icon: 'pi pi-folder' },
425
+ ]
426
+
427
+ const panelMenuItems = [
428
+ {
429
+ label: 'Dashboards',
430
+ icon: 'pi pi-chart-line',
431
+ items: [
432
+ { label: 'Operations', icon: 'pi pi-cog' },
433
+ { label: 'Inventory', icon: 'pi pi-box' },
434
+ { label: 'Compliance', icon: 'pi pi-shield' },
435
+ ],
436
+ },
437
+ {
438
+ label: 'Reports',
439
+ icon: 'pi pi-file',
440
+ items: [
441
+ { label: 'Daily Snapshot', icon: 'pi pi-calendar' },
442
+ { label: 'Quarterly Review', icon: 'pi pi-chart-bar' },
443
+ ],
444
+ },
445
+ ]
446
+
447
+ const statusOptions = ['Active', 'Hold', 'Closed']
448
+
449
+ const priorityOptions = [
450
+ { label: 'Critical', value: 'critical' },
451
+ { label: 'High', value: 'high' },
452
+ { label: 'Normal', value: 'normal' },
453
+ { label: 'Low', value: 'low' },
454
+ ]
455
+
456
+ const teamOptions = [
457
+ { label: 'Calibration', value: 'calibration' },
458
+ { label: 'QA', value: 'qa' },
459
+ { label: 'Reliability', value: 'reliability' },
460
+ ]
461
+
462
+ const regionOptions = [
463
+ { label: 'North America', value: 'na' },
464
+ { label: 'EMEA', value: 'emea' },
465
+ { label: 'APAC', value: 'apac' },
466
+ ]
467
+
468
+ const stageOptions = ['Draft', 'Ready', 'Approved']
469
+
470
+ const assignees = ['Alex Morgan', 'Kai Santos', 'Jo Lee', 'Tariq Reed', 'Rina Park', 'Devon Hall']
471
+ const filteredAssignees = ref<string[]>([])
472
+
473
+ const workOrders = ref([
474
+ {
475
+ id: 'WO-1042',
476
+ title: 'Sensor calibration sweep',
477
+ owner: 'Alex M.',
478
+ status: 'In Review',
479
+ progress: 62,
480
+ },
481
+ {
482
+ id: 'WO-1047',
483
+ title: 'Packaging quality audit',
484
+ owner: 'Jo L.',
485
+ status: 'Queued',
486
+ progress: 28,
487
+ },
488
+ {
489
+ id: 'WO-1051',
490
+ title: 'Line 4 throughput test',
491
+ owner: 'Rina P.',
492
+ status: 'In Progress',
493
+ progress: 74,
494
+ },
495
+ {
496
+ id: 'WO-1059',
497
+ title: 'Cooling module retrofit',
498
+ owner: 'Kai S.',
499
+ status: 'Blocked',
500
+ progress: 15,
501
+ },
502
+ {
503
+ id: 'WO-1063',
504
+ title: 'Safety signage refresh',
505
+ owner: 'Devon H.',
506
+ status: 'Complete',
507
+ progress: 100,
508
+ },
509
+ {
510
+ id: 'WO-1068',
511
+ title: 'Dock scheduling update',
512
+ owner: 'Tariq R.',
513
+ status: 'In Review',
514
+ progress: 46,
515
+ },
516
+ ])
517
+
518
+ const queueOptions = [
519
+ { label: 'Line 4 Repairs' },
520
+ { label: 'Cold Storage Audit' },
521
+ { label: 'Vendor Onboarding' },
522
+ { label: 'Safety Training' },
523
+ ]
524
+
525
+ const timelineEvents = [
526
+ { time: '08:30', title: 'Morning handoff', owner: 'Operations' },
527
+ { time: '10:15', title: 'Supplier check-in', owner: 'Procurement' },
528
+ { time: '13:00', title: 'QA walkthrough', owner: 'Quality' },
529
+ { time: '16:45', title: 'Shift recap', owner: 'Ops Lead' },
530
+ ]
531
+
532
+ const orderCompletion = ref(68)
533
+ const liveMode = ref(true)
534
+ const activeTab = ref(0)
535
+ const selectedQueue = ref(queueOptions[0])
536
+
537
+ const form = ref({
538
+ title: 'Calibration sweep',
539
+ code: 'WF-301',
540
+ priority: priorityOptions[1],
541
+ assignee: 'Alex Morgan',
542
+ dueDate: new Date(2026, 1, 28),
543
+ budget: 12500,
544
+ teams: [teamOptions[0], teamOptions[1]],
545
+ stage: 'Ready',
546
+ confidence: 72,
547
+ rating: 4,
548
+ color: '2563eb',
549
+ notify: true,
550
+ urgency: 'standard',
551
+ requiresAudit: false,
552
+ checklist: ['brief', 'resources'],
553
+ })
554
+
555
+ const controls = ref({
556
+ status: 'Active',
557
+ accessKey: '',
558
+ regions: [regionOptions[0], regionOptions[2]],
559
+ tags: ['priority', 'dock-7'],
560
+ throughput: 82,
561
+ quickToggle: true,
562
+ })
563
+
564
+ const notes = ref('Dock 7 retrofit scheduled for next week. Coordinate vendor access badges.')
565
+
566
+ const onAssigneeComplete = (event: { query: string }) => {
567
+ const query = event.query.toLowerCase()
568
+ filteredAssignees.value = assignees.filter((assignee) => assignee.toLowerCase().includes(query))
569
+ }
570
+
571
+ const statusSeverity = (status: string) => {
572
+ switch (status) {
573
+ case 'Complete':
574
+ return 'success'
575
+ case 'In Progress':
576
+ return 'info'
577
+ case 'Queued':
578
+ return 'secondary'
579
+ case 'Blocked':
580
+ return 'danger'
581
+ case 'In Review':
582
+ return 'warning'
583
+ default:
584
+ return 'contrast'
585
+ }
586
+ }
587
+ </script>