@awes-io/ui 2.142.3 → 2.144.0

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 (264) hide show
  1. package/assets/css/components/_index.css +7 -1
  2. package/assets/css/components/action-card.css +1 -0
  3. package/assets/css/components/action-icon.css +2 -2
  4. package/assets/css/components/alert.css +28 -22
  5. package/assets/css/components/animation.css +52 -32
  6. package/assets/css/components/badge.css +1 -0
  7. package/assets/css/components/banner-text.css +15 -4
  8. package/assets/css/components/card.css +0 -1
  9. package/assets/css/components/content-placeholder.css +104 -0
  10. package/assets/css/components/dropdown.css +20 -7
  11. package/assets/css/components/empty-container.css +69 -1
  12. package/assets/css/components/filter-chosen.css +6 -0
  13. package/assets/css/components/filter-date-range.css +17 -1
  14. package/assets/css/components/filter-month.css +23 -17
  15. package/assets/css/components/filter-select.css +11 -0
  16. package/assets/css/components/icon-menu-item.css +12 -7
  17. package/assets/css/components/layout.css +1 -32
  18. package/assets/css/components/mobile-menu-nav.css +8 -4
  19. package/assets/css/components/modal.css +1 -1
  20. package/assets/css/components/number.css +12 -0
  21. package/assets/css/components/page-aside.css +54 -0
  22. package/assets/css/components/text-field.css +4 -0
  23. package/assets/js/css.js +1 -1
  24. package/assets/js/icons/mono.js +59 -91
  25. package/assets/js/icons/multicolor.js +1 -31
  26. package/components/1_atoms/AwActionIcon.vue +11 -2
  27. package/components/1_atoms/AwContentPlaceholder.vue +60 -0
  28. package/components/1_atoms/AwFlow.vue +37 -49
  29. package/components/1_atoms/AwGrid.vue +11 -3
  30. package/components/1_atoms/AwIcon/AwIcon.vue +5 -3
  31. package/components/1_atoms/AwIcon/AwIconSystemMono.vue +3 -2
  32. package/components/1_atoms/AwInput.vue +2 -2
  33. package/components/1_atoms/AwLabel.vue +1 -1
  34. package/components/1_atoms/AwList.vue +3 -1
  35. package/components/1_atoms/AwRadio.vue +1 -1
  36. package/components/1_atoms/AwSlider.vue +15 -1
  37. package/components/1_atoms/AwTag.vue +6 -1
  38. package/components/2_molecules/AwAlert.vue +63 -42
  39. package/components/2_molecules/AwBadge.vue +1 -1
  40. package/components/2_molecules/AwBannerText.vue +8 -2
  41. package/components/2_molecules/AwButton.vue +1 -1
  42. package/components/2_molecules/AwDescriptionInput.vue +19 -1
  43. package/components/2_molecules/AwEmptyContainer.vue +74 -72
  44. package/components/2_molecules/AwNumber.vue +180 -0
  45. package/components/2_molecules/AwSelect.vue +11 -4
  46. package/components/3_organisms/AwBottomBar.vue +22 -4
  47. package/components/3_organisms/AwFilterChosen.vue +73 -0
  48. package/components/3_organisms/AwFilterDateRange.vue +177 -0
  49. package/components/3_organisms/AwFilterMonth.vue +37 -40
  50. package/components/3_organisms/AwFilterSelect.vue +368 -0
  51. package/components/3_organisms/AwMultiBlockBuilder.vue +1 -1
  52. package/components/3_organisms/AwSubnav.vue +11 -1
  53. package/components/3_organisms/AwTable/AwTableBuilder.vue +20 -60
  54. package/components/3_organisms/AwTable/_AwTableCellDropdown.vue +6 -1
  55. package/components/3_organisms/AwTable/_AwTableRow.vue +2 -1
  56. package/components/4_pages/AwPage.vue +1 -0
  57. package/components/4_pages/AwPageAside.vue +108 -0
  58. package/components/5_layouts/AwLayoutCenter.vue +3 -8
  59. package/components/5_layouts/_AwMenuItemIcon.vue +9 -2
  60. package/components/5_layouts/_AwMobileMenuItem.vue +5 -3
  61. package/components/5_layouts/_AwUserMenu.vue +1 -1
  62. package/components/_config.js +26 -1
  63. package/docs/_template.md +80 -0
  64. package/docs/components/atoms/aw-accordion-fold.md +129 -0
  65. package/docs/components/atoms/aw-action-card-body.md +99 -0
  66. package/docs/components/atoms/aw-action-card.md +130 -0
  67. package/docs/components/atoms/aw-action-icon.md +126 -0
  68. package/docs/components/atoms/aw-avatar.md +106 -0
  69. package/docs/components/atoms/aw-card.md +137 -0
  70. package/docs/components/atoms/aw-checkbox.md +288 -0
  71. package/docs/components/atoms/aw-content-placeholder.md +147 -0
  72. package/docs/components/atoms/aw-description.md +83 -0
  73. package/docs/components/atoms/aw-dock.md +90 -0
  74. package/docs/components/atoms/aw-dropdown-button.md +94 -0
  75. package/docs/components/atoms/aw-dropdown.md +178 -0
  76. package/docs/components/atoms/aw-file.md +73 -0
  77. package/docs/components/atoms/aw-flow.md +140 -0
  78. package/docs/components/atoms/aw-grid.md +109 -0
  79. package/docs/components/atoms/aw-headline.md +71 -0
  80. package/docs/components/atoms/aw-icon-system-color.md +122 -0
  81. package/docs/components/atoms/aw-icon-system-mono.md +206 -0
  82. package/docs/components/atoms/aw-icon.md +235 -0
  83. package/docs/components/atoms/aw-info.md +123 -0
  84. package/docs/components/atoms/aw-input.md +212 -0
  85. package/docs/components/atoms/aw-label.md +136 -0
  86. package/docs/components/atoms/aw-link.md +151 -0
  87. package/docs/components/atoms/aw-list.md +152 -0
  88. package/docs/components/atoms/aw-progress.md +119 -0
  89. package/docs/components/atoms/aw-radio.md +182 -0
  90. package/docs/components/atoms/aw-refresh-wrapper.md +81 -0
  91. package/docs/components/atoms/aw-select-native.md +234 -0
  92. package/docs/components/atoms/aw-slider.md +189 -0
  93. package/docs/components/atoms/aw-sub-headline.md +73 -0
  94. package/docs/components/atoms/aw-switcher.md +192 -0
  95. package/docs/components/atoms/aw-tag.md +144 -0
  96. package/docs/components/atoms/aw-title.md +70 -0
  97. package/docs/components/atoms/aw-toggler.md +90 -0
  98. package/docs/components/layouts/aw-layout-center.md +168 -0
  99. package/docs/components/layouts/aw-layout-error.md +153 -0
  100. package/docs/components/layouts/aw-layout-provider.md +238 -0
  101. package/docs/components/layouts/aw-layout.md +88 -0
  102. package/docs/components/molecules/aw-action-button.md +138 -0
  103. package/docs/components/molecules/aw-alert.md +191 -0
  104. package/docs/components/molecules/aw-badge.md +129 -0
  105. package/docs/components/molecules/aw-banner-text.md +156 -0
  106. package/docs/components/molecules/aw-button-nav.md +111 -0
  107. package/docs/components/molecules/aw-button.md +193 -0
  108. package/docs/components/molecules/aw-description-input.md +124 -0
  109. package/docs/components/molecules/aw-empty-container.md +235 -0
  110. package/docs/components/molecules/aw-island.md +506 -0
  111. package/docs/components/molecules/aw-number.md +138 -0
  112. package/docs/components/molecules/aw-select-object.md +401 -0
  113. package/docs/components/molecules/aw-select.md +215 -0
  114. package/docs/components/molecules/aw-tab-nav.md +108 -0
  115. package/docs/components/molecules/aw-tel.md +129 -0
  116. package/docs/components/molecules/aw-textarea.md +83 -0
  117. package/docs/components/molecules/aw-userpic.md +115 -0
  118. package/docs/components/organisms/aw-address-block.md +64 -0
  119. package/docs/components/organisms/aw-address.md +132 -0
  120. package/docs/components/organisms/aw-birthday-picker.md +73 -0
  121. package/docs/components/organisms/aw-bottom-bar.md +66 -0
  122. package/docs/components/organisms/aw-calendar-days.md +115 -0
  123. package/docs/components/organisms/aw-calendar-nav.md +98 -0
  124. package/docs/components/organisms/aw-calendar-view.md +98 -0
  125. package/docs/components/organisms/aw-calendar.md +166 -0
  126. package/docs/components/organisms/aw-chart.md +154 -0
  127. package/docs/components/organisms/aw-chip-select.md +164 -0
  128. package/docs/components/organisms/aw-chip.md +126 -0
  129. package/docs/components/organisms/aw-code-snippet.md +94 -0
  130. package/docs/components/organisms/aw-code.md +132 -0
  131. package/docs/components/organisms/aw-context-menu.md +117 -0
  132. package/docs/components/organisms/aw-cropper.md +151 -0
  133. package/docs/components/organisms/aw-date.md +161 -0
  134. package/docs/components/organisms/aw-display-date.md +33 -0
  135. package/docs/components/organisms/aw-download-link.md +46 -0
  136. package/docs/components/organisms/aw-fetch-data.md +161 -0
  137. package/docs/components/organisms/aw-filter-chosen.md +226 -0
  138. package/docs/components/organisms/aw-filter-date-range.md +205 -0
  139. package/docs/components/organisms/aw-filter-month.md +43 -0
  140. package/docs/components/organisms/aw-filter-select.md +239 -0
  141. package/docs/components/organisms/aw-form.md +174 -0
  142. package/docs/components/organisms/aw-gmap-marker.md +86 -0
  143. package/docs/components/organisms/aw-gmap.md +90 -0
  144. package/docs/components/organisms/aw-image-upload.md +56 -0
  145. package/docs/components/organisms/aw-island-avatar.md +87 -0
  146. package/docs/components/organisms/aw-markdown-editor.md +104 -0
  147. package/docs/components/organisms/aw-modal-buttons.md +57 -0
  148. package/docs/components/organisms/aw-modal.md +246 -0
  149. package/docs/components/organisms/aw-model-edit.md +74 -0
  150. package/docs/components/organisms/aw-money.md +53 -0
  151. package/docs/components/organisms/aw-multi-block-builder.md +165 -0
  152. package/docs/components/organisms/aw-pagination.md +121 -0
  153. package/docs/components/organisms/aw-password.md +103 -0
  154. package/docs/components/organisms/aw-preview-card.md +45 -0
  155. package/docs/components/organisms/aw-search.md +116 -0
  156. package/docs/components/organisms/aw-subnav.md +122 -0
  157. package/docs/components/organisms/aw-table-builder.md +165 -0
  158. package/docs/components/organisms/aw-table-col.md +123 -0
  159. package/docs/components/organisms/aw-table-head.md +92 -0
  160. package/docs/components/organisms/aw-table-row.md +91 -0
  161. package/docs/components/organisms/aw-table.md +172 -0
  162. package/docs/components/organisms/aw-tags.md +54 -0
  163. package/docs/components/organisms/aw-toggle-show-aside.md +43 -0
  164. package/docs/components/organisms/aw-uploader-files.md +125 -0
  165. package/docs/components/organisms/aw-uploader.md +163 -0
  166. package/docs/components/organisms/aw-user-menu.md +87 -0
  167. package/docs/components/pages/aw-page-aside.md +296 -0
  168. package/docs/components/pages/aw-page-menu-buttons.md +172 -0
  169. package/docs/components/pages/aw-page-modal.md +198 -0
  170. package/docs/components/pages/aw-page-single.md +300 -0
  171. package/docs/components/pages/aw-page.md +194 -0
  172. package/docs/configuration.md +493 -0
  173. package/docs/cookbook/advanced-patterns.md +1388 -0
  174. package/docs/cookbook/common-patterns.md +965 -0
  175. package/docs/cookbook/index.md +786 -0
  176. package/docs/getting-started.md +596 -0
  177. package/docs/guides/best-practices.md +1106 -0
  178. package/docs/guides/data-fetching.md +852 -0
  179. package/docs/guides/error-handling.md +1172 -0
  180. package/docs/guides/forms-guide.md +1329 -0
  181. package/docs/guides/mobile-subnavigation.md +359 -0
  182. package/docs/guides/page-patterns/aside-pages.md +1418 -0
  183. package/docs/guides/page-patterns/dashboard-pages.md +990 -0
  184. package/docs/guides/page-patterns/detail-pages.md +1556 -0
  185. package/docs/guides/page-patterns/list-pages.md +1242 -0
  186. package/docs/index.md +263 -1
  187. package/docs/integrations.md +870 -0
  188. package/docs/reference/colors.md +232 -0
  189. package/docs/reference/icons.md +163 -0
  190. package/docs/reference/menu.md +462 -0
  191. package/docs/reference/plugins.md +970 -0
  192. package/docs/reference/troubleshooting.md +964 -0
  193. package/nuxt/awes.config.js +9 -8
  194. package/nuxt/index.js +2 -2
  195. package/nuxt/pages/more.vue +1 -1
  196. package/package.json +5 -3
  197. package/readme.md +171 -1
  198. package/store/awesIo.js +11 -0
  199. package/CHANGELOG.md +0 -4520
  200. package/docs/aw-accordion-fold.md +0 -46
  201. package/docs/aw-address.md +0 -44
  202. package/docs/aw-avatar.md +0 -51
  203. package/docs/aw-badge.md +0 -32
  204. package/docs/aw-button-nav.md +0 -44
  205. package/docs/aw-button.md +0 -50
  206. package/docs/aw-calendar-days.md +0 -46
  207. package/docs/aw-calendar-nav.md +0 -25
  208. package/docs/aw-calendar-view.md +0 -12
  209. package/docs/aw-calendar.md +0 -59
  210. package/docs/aw-card.md +0 -48
  211. package/docs/aw-chart.md +0 -51
  212. package/docs/aw-checkbox.md +0 -56
  213. package/docs/aw-chip-select.md +0 -46
  214. package/docs/aw-chip.md +0 -53
  215. package/docs/aw-code-snippet.md +0 -18
  216. package/docs/aw-code.md +0 -56
  217. package/docs/aw-content-wrapper.md +0 -40
  218. package/docs/aw-context-menu.md +0 -31
  219. package/docs/aw-cropper.md +0 -60
  220. package/docs/aw-dashboard-card.md +0 -37
  221. package/docs/aw-dashboard-donut.md +0 -30
  222. package/docs/aw-dashboard-line.md +0 -20
  223. package/docs/aw-dashboard-progress.md +0 -33
  224. package/docs/aw-dashboard-section.md +0 -32
  225. package/docs/aw-dashboard-speed.md +0 -30
  226. package/docs/aw-date.md +0 -52
  227. package/docs/aw-dropdown-button.md +0 -31
  228. package/docs/aw-dropdown.md +0 -69
  229. package/docs/aw-fetch-data.md +0 -45
  230. package/docs/aw-form.md +0 -52
  231. package/docs/aw-grid.md +0 -48
  232. package/docs/aw-icon.md +0 -50
  233. package/docs/aw-info.md +0 -53
  234. package/docs/aw-input.md +0 -55
  235. package/docs/aw-layout-default.md +0 -30
  236. package/docs/aw-layout-frame-center.md +0 -29
  237. package/docs/aw-layout-simple.md +0 -49
  238. package/docs/aw-link.md +0 -54
  239. package/docs/aw-markdown-editor.md +0 -51
  240. package/docs/aw-modal.md +0 -63
  241. package/docs/aw-multi-block-builder.md +0 -66
  242. package/docs/aw-page.md +0 -36
  243. package/docs/aw-pagination.md +0 -54
  244. package/docs/aw-password.md +0 -48
  245. package/docs/aw-radio.md +0 -54
  246. package/docs/aw-search.md +0 -49
  247. package/docs/aw-select.md +0 -93
  248. package/docs/aw-slider.md +0 -40
  249. package/docs/aw-svg-image.md +0 -19
  250. package/docs/aw-switcher.md +0 -51
  251. package/docs/aw-tab-nav.md +0 -55
  252. package/docs/aw-table-builder.md +0 -58
  253. package/docs/aw-table-col.md +0 -33
  254. package/docs/aw-table-head.md +0 -28
  255. package/docs/aw-table-row.md +0 -33
  256. package/docs/aw-table.md +0 -59
  257. package/docs/aw-tel.md +0 -47
  258. package/docs/aw-textarea.md +0 -47
  259. package/docs/aw-toggler.md +0 -41
  260. package/docs/aw-uploader-files.md +0 -20
  261. package/docs/aw-uploader.md +0 -60
  262. package/docs/aw-user-menu.md +0 -34
  263. package/docs/aw-userpic.md +0 -34
  264. /package/components/{3_organisms → 2_molecules}/AwTel.vue +0 -0
@@ -0,0 +1,964 @@
1
+ # Troubleshooting Guide
2
+
3
+ Solutions to common issues when working with AwesCode UI framework.
4
+
5
+ ## Component Issues
6
+
7
+ ### Component Not Rendering
8
+
9
+ **Problem:** Component doesn't appear on the page.
10
+
11
+ **Possible Causes:**
12
+
13
+ 1. **Component not registered**
14
+ ```markup
15
+ <!-- ❌ Component not found -->
16
+ <AwCustomComponent />
17
+ ```
18
+
19
+ **Solution:** Check if component is globally registered (atoms, molecules) or needs dynamic import (organisms, pages, layouts):
20
+ ```javascript
21
+ // For organisms, pages, layouts
22
+ export default {
23
+ components: {
24
+ AwForm: () => import('@awes-io/ui/components/3_organisms/AwForm.vue')
25
+ }
26
+ }
27
+ ```
28
+
29
+ 2. **Component hidden by v-if**
30
+ ```markup
31
+ <!-- ❌ Never renders if loading=true initially -->
32
+ <AwTableBuilder v-if="!loading" :collection="customers" />
33
+ ```
34
+
35
+ **Solution:** Let component handle its own loading state:
36
+ ```markup
37
+ <!-- ✅ Component mounts and shows internal loading -->
38
+ <AwTableBuilder :collection="customers" />
39
+ ```
40
+
41
+ 3. **Wrong component path**
42
+ ```javascript
43
+ // ❌ Old path after reorganization
44
+ import AwButton from '@awes-io/ui/docs/aw-button.md'
45
+
46
+ // ✅ Correct path
47
+ // AwButton is globally registered, no import needed
48
+ ```
49
+
50
+ ### Component Props Not Working
51
+
52
+ **Problem:** Props don't seem to have any effect.
53
+
54
+ **Debugging Steps:**
55
+
56
+ 1. Check prop name spelling:
57
+ ```markup
58
+ <!-- ❌ Wrong prop name -->
59
+ <AwButton colour="accent">Save</AwButton>
60
+
61
+ <!-- ✅ Correct prop name -->
62
+ <AwButton color="accent">Save</AwButton>
63
+ ```
64
+
65
+ 2. Check prop type:
66
+ ```markup
67
+ <!-- ❌ String instead of boolean -->
68
+ <AwButton loading="true">Save</AwButton>
69
+
70
+ <!-- ✅ Boolean -->
71
+ <AwButton :loading="true">Save</AwButton>
72
+ ```
73
+
74
+ 3. Check component documentation:
75
+ ```markup
76
+ <!-- ✅ Refer to component docs for correct props -->
77
+ <!-- See: packages/ui/docs/components/molecules/aw-button.md -->
78
+ ```
79
+
80
+ ### Events Not Firing
81
+
82
+ **Problem:** Component events don't trigger methods.
83
+
84
+ **Common Causes:**
85
+
86
+ 1. **Missing v-on or @**
87
+ ```markup
88
+ <!-- ❌ Missing @ -->
89
+ <AwButton click="save">Save</AwButton>
90
+
91
+ <!-- ✅ Correct -->
92
+ <AwButton @click="save">Save</AwButton>
93
+ ```
94
+
95
+ 2. **Wrong event name**
96
+ ```markup
97
+ <!-- ❌ Wrong event name -->
98
+ <AwTableBuilder @row-click="viewRow">
99
+
100
+ <!-- ✅ Correct event name -->
101
+ <AwTableBuilder @click:row="viewRow">
102
+ ```
103
+
104
+ 3. **Event bubbling stopped**
105
+ ```markup
106
+ <!-- ❌ Click event stopped by child -->
107
+ <AwTableBuilder @click:row="viewRow">
108
+ <template #dropdown="{ cell }">
109
+ <AwDropdownButton>
110
+ <!-- This stops row click -->
111
+ </AwDropdownButton>
112
+ </template>
113
+ </AwTableBuilder>
114
+
115
+ <!-- ✅ Use dropdown slot OR click:row, not both -->
116
+ <AwTableBuilder :collection="customers">
117
+ <template #dropdown="{ cell }">
118
+ <AwDropdownButton>
119
+ <AwButton @click="edit(cell)">Edit</AwButton>
120
+ </AwDropdownButton>
121
+ </template>
122
+ </AwTableBuilder>
123
+ ```
124
+
125
+ ## Data Fetching Issues
126
+
127
+ ### AwTableBuilder Not Fetching Data
128
+
129
+ **Problem:** Table shows empty, data never loads.
130
+
131
+ **Cause:** Table wrapped in v-if/v-else, preventing mount:
132
+ ```markup
133
+ <!-- ❌ BAD - Table never mounts if loading=true -->
134
+ <template>
135
+ <AwPage title="Customers">
136
+ <div v-if="loading">Loading...</div>
137
+ <AwTableBuilder v-else :collection="customers">
138
+ <!-- Never mounts! -->
139
+ </AwTableBuilder>
140
+ </AwPage>
141
+ </template>
142
+
143
+ <script>
144
+ export default {
145
+ data() {
146
+ return {
147
+ loading: true, // Starts true
148
+ customers: new Customers([])
149
+ }
150
+ }
151
+ }
152
+ </script>
153
+ ```
154
+
155
+ **Solution:** Let AwTableBuilder handle loading:
156
+ ```markup
157
+ <!-- ✅ GOOD - Table mounts and fetches automatically -->
158
+ <template>
159
+ <AwPage title="Customers">
160
+ <AwTableBuilder :collection="customers">
161
+ <!-- Mounts immediately, shows internal loading state -->
162
+ </AwTableBuilder>
163
+ </AwPage>
164
+ </template>
165
+
166
+ <script>
167
+ export default {
168
+ data() {
169
+ return {
170
+ customers: new Customers([], {
171
+ shop_uuid: this.$route.params.shop_uuid
172
+ })
173
+ }
174
+ }
175
+ // No loading flag needed!
176
+ }
177
+ </script>
178
+ ```
179
+
180
+ ### Collection Returns Empty Array
181
+
182
+ **Problem:** API request succeeds but collection.models is empty.
183
+
184
+ **Debugging Steps:**
185
+
186
+ 1. **Check response structure**
187
+ ```javascript
188
+ // Expected structure
189
+ {
190
+ "data": [...], // Array of items
191
+ "meta": {...} // Pagination meta
192
+ }
193
+
194
+ // If your API returns different structure, configure collection
195
+ ```
196
+
197
+ 2. **Check collection route**
198
+ ```javascript
199
+ // In collection file
200
+ routes() {
201
+ return {
202
+ fetch: '/api/shops/:shop_uuid/customers' // Must match backend route
203
+ }
204
+ }
205
+ ```
206
+
207
+ 3. **Check collection options**
208
+ ```javascript
209
+ // ✅ Include shop_uuid in options
210
+ customers: new Customers([], {
211
+ shop_uuid: this.$route.params.shop_uuid
212
+ })
213
+
214
+ // ❌ Missing shop_uuid
215
+ customers: new Customers([])
216
+ ```
217
+
218
+ 4. **Inspect network request**
219
+ ```javascript
220
+ // Open browser DevTools → Network tab
221
+ // Check request URL and response
222
+ ```
223
+
224
+ ### Model Fetch Returns 404
225
+
226
+ **Problem:** Fetching model returns 404 Not Found.
227
+
228
+ **Debugging Steps:**
229
+
230
+ 1. **Check if model is new**
231
+ ```javascript
232
+ // ✅ Don't fetch new models
233
+ if (!this.model.isNew()) {
234
+ await this.model.fetch()
235
+ }
236
+
237
+ // ❌ Fetching new model fails
238
+ await this.model.fetch() // 404 if no ID
239
+ ```
240
+
241
+ 2. **Check model route**
242
+ ```javascript
243
+ // In model file
244
+ routes() {
245
+ return {
246
+ fetch: '/api/shops/:shop_uuid/customers/:id'
247
+ }
248
+ }
249
+ ```
250
+
251
+ 3. **Check model has ID**
252
+ ```javascript
253
+ // ✅ Model has ID
254
+ const customer = new Customer(
255
+ { id: this.$route.params.id },
256
+ null,
257
+ { shop_uuid: this.$route.params.shop_uuid }
258
+ )
259
+
260
+ // ❌ Model has no ID
261
+ const customer = new Customer({}, null, {})
262
+ ```
263
+
264
+ ### Infinite Loading / Fetch Loop
265
+
266
+ **Problem:** Component keeps fetching data repeatedly.
267
+
268
+ **Cause:** Watch triggers refetch, which triggers watch again:
269
+ ```javascript
270
+ // ❌ Creates infinite loop
271
+ watch: {
272
+ collection: {
273
+ handler() {
274
+ this.collection.fetch() // Triggers watch again
275
+ },
276
+ deep: true
277
+ }
278
+ }
279
+ ```
280
+
281
+ **Solution:** Watch specific properties:
282
+ ```javascript
283
+ // ✅ Watch route params instead
284
+ watch: {
285
+ '$route.query.search': {
286
+ handler() {
287
+ this.collection.fetch()
288
+ }
289
+ }
290
+ }
291
+
292
+ // ✅ Or use AwTableBuilder watch-params
293
+ <AwTableBuilder
294
+ :collection="customers"
295
+ :watch-params="['search', 'status']"
296
+ />
297
+ ```
298
+
299
+ ## Form & Validation Issues
300
+
301
+ ### Validation Errors Not Showing
302
+
303
+ **Problem:** Form submits with errors but errors don't display.
304
+
305
+ **Debugging Steps:**
306
+
307
+ 1. **Check :error binding**
308
+ ```markup
309
+ <!-- ❌ No error binding -->
310
+ <AwInput v-model="customer.name" label="Name" />
311
+
312
+ <!-- ✅ Bind error from model -->
313
+ <AwInput
314
+ v-model="customer.name"
315
+ :error="customer.errors.name"
316
+ label="Name"
317
+ />
318
+ ```
319
+
320
+ 2. **Check if errors exist**
321
+ ```javascript
322
+ async save() {
323
+ await this.customer.save()
324
+
325
+ // ✅ Check for errors
326
+ if (Object.keys(this.customer.errors).length > 0) {
327
+ console.log('Errors:', this.customer.errors)
328
+ return
329
+ }
330
+ }
331
+ ```
332
+
333
+ 3. **Check backend response format**
334
+ ```json
335
+ // Expected format for 422 validation errors
336
+ {
337
+ "message": "The given data was invalid.",
338
+ "errors": {
339
+ "name": ["The name field is required."],
340
+ "email": ["The email has already been taken."]
341
+ }
342
+ }
343
+ ```
344
+
345
+ ### Form Not Submitting
346
+
347
+ **Problem:** Clicking submit button does nothing.
348
+
349
+ **Debugging Steps:**
350
+
351
+ 1. **Check button type**
352
+ ```markup
353
+ <!-- ❌ Missing @click -->
354
+ <AwButton color="accent">Save</AwButton>
355
+
356
+ <!-- ✅ With click handler -->
357
+ <AwButton color="accent" @click="save">Save</AwButton>
358
+ ```
359
+
360
+ 2. **Check for errors in method**
361
+ ```javascript
362
+ async save() {
363
+ console.log('Save called') // Add debug log
364
+
365
+ try {
366
+ await this.customer.save()
367
+ console.log('Save successful')
368
+ } catch (error) {
369
+ console.error('Save failed:', error)
370
+ }
371
+ }
372
+ ```
373
+
374
+ 3. **Check button not disabled**
375
+ ```markup
376
+ <!-- May be disabled during loading -->
377
+ <AwButton
378
+ :disabled="saving"
379
+ :loading="saving"
380
+ @click="save"
381
+ >
382
+ Save
383
+ </AwButton>
384
+ ```
385
+
386
+ ### Model Save Succeeds but Errors Remain
387
+
388
+ **Problem:** save() succeeds but model.errors still has errors.
389
+
390
+ **Cause:** Validation errors return 422, which vue-mc treats as "success" with errors:
391
+ ```javascript
392
+ // ✅ Always check errors after save
393
+ await this.customer.save()
394
+
395
+ if (Object.keys(this.customer.errors).length > 0) {
396
+ // Has validation errors even though save() didn't throw
397
+ this.$notify({
398
+ message: 'Please fix validation errors',
399
+ type: 'error'
400
+ })
401
+ return
402
+ }
403
+
404
+ // Actually saved successfully
405
+ ```
406
+
407
+ ## Table Issues
408
+
409
+ ### Rows Not Reactive When Using vue-mc Models
410
+
411
+ **Problem:** Table rows (for example in `AwTableBuilder`) update only for the first row or only after calling `$forceUpdate` when using `@awes-io/vue-mc` models.
412
+
413
+ **Cause:** The project uses different Vue versions for `@awes-io/ui` and `@awes-io/vue-mc`, so models are created in one Vue instance and rendered in another, breaking reactivity.
414
+
415
+ **Solution:** Ensure the project has a single Vue version by configuring root `resolutions`:
416
+
417
+ ```json
418
+ // package.json (root of monorepo)
419
+ "resolutions": {
420
+ "vue": "2.7.16",
421
+ "vue-template-compiler": "2.7.16",
422
+ "vue-server-renderer": "2.7.16"
423
+ }
424
+ ```
425
+
426
+ Remove any Vue-specific `overrides` / `resolutions` from package-level configs (for example `packages/vue-mc/package.json`), reinstall dependencies, and verify a single Vue version with `yarn why vue`.
427
+
428
+ ### @click:row and #dropdown Conflict
429
+
430
+ **Problem:** Row click doesn't work when dropdown is present.
431
+
432
+ **Cause:** Cannot use both @click:row and #dropdown slot simultaneously:
433
+ ```markup
434
+ <!-- ❌ BAD - Both click:row and dropdown -->
435
+ <AwTableBuilder
436
+ :collection="customers"
437
+ @click:row="viewCustomer"
438
+ >
439
+ <template #dropdown="{ cell }">
440
+ <AwDropdownButton>
441
+ <!-- This prevents row click -->
442
+ </AwDropdownButton>
443
+ </template>
444
+ </AwTableBuilder>
445
+ ```
446
+
447
+ **Solution:** Use ONLY #dropdown slot:
448
+ ```markup
449
+ <!-- ✅ GOOD - Dropdown only -->
450
+ <AwTableBuilder :collection="customers">
451
+ <AwTableCol field="name" title="Name" />
452
+
453
+ <template #dropdown="{ cell }">
454
+ <AwDropdownButton>
455
+ <AwButton @click="viewCustomer(cell)">View</AwButton>
456
+ <AwButton @click="editCustomer(cell)">Edit</AwButton>
457
+ <AwButton @click="deleteCustomer(cell)">Delete</AwButton>
458
+ </AwDropdownButton>
459
+ </template>
460
+ </AwTableBuilder>
461
+ ```
462
+
463
+ ### Table Column Shows [object Object]
464
+
465
+ **Problem:** Table cell displays "[object Object]" instead of value.
466
+
467
+ **Cause:** Field prop behavior - with field prop, cell = value only; without field, cell = entire row:
468
+ ```markup
469
+ <!-- ❌ BAD - Trying to access object property with field prop -->
470
+ <AwTableCol field="address" title="Address">
471
+ <template #default="{ cell }">
472
+ {{ cell.city }} <!-- cell is just address object, not whole row -->
473
+ </template>
474
+ </AwTableCol>
475
+ ```
476
+
477
+ **Solution 1:** Don't use field prop:
478
+ ```markup
479
+ <!-- ✅ GOOD - No field prop, cell = entire row -->
480
+ <AwTableCol title="Address">
481
+ <template #default="{ cell }">
482
+ {{ cell.address.city }}
483
+ </template>
484
+ </AwTableCol>
485
+ ```
486
+
487
+ **Solution 2:** Use field prop correctly:
488
+ ```markup
489
+ <!-- ✅ GOOD - Format the field value directly -->
490
+ <AwTableCol field="address" title="Address">
491
+ <template #default="{ cell }">
492
+ {{ cell.city }}, {{ cell.state }}
493
+ </template>
494
+ </AwTableCol>
495
+ ```
496
+
497
+ ### Table Pagination Not Working
498
+
499
+ **Problem:** Pagination controls don't appear or don't work.
500
+
501
+ **Debugging Steps:**
502
+
503
+ 1. **Check backend returns pagination meta**
504
+ ```json
505
+ {
506
+ "data": [...],
507
+ "meta": {
508
+ "current_page": 1,
509
+ "last_page": 10,
510
+ "per_page": 15,
511
+ "total": 145
512
+ }
513
+ }
514
+ ```
515
+
516
+ 2. **Check collection route accepts page param**
517
+ ```javascript
518
+ // Backend should handle ?page=2
519
+ GET /api/customers?page=2
520
+ ```
521
+
522
+ 3. **Check AwTableBuilder has pagination prop (if needed)**
523
+ ```markup
524
+ <!-- Usually automatic, but can disable -->
525
+ <AwTableBuilder
526
+ :collection="customers"
527
+ :pagination="true"
528
+ />
529
+ ```
530
+
531
+ ## Styling Issues
532
+
533
+ ### Styles Not Applying
534
+
535
+ **Problem:** Custom styles don't apply to component.
536
+
537
+ **Common Causes:**
538
+
539
+ 1. **CSS specificity**
540
+ ```scss
541
+ // ❌ Not specific enough
542
+ .aw-button {
543
+ background: red;
544
+ }
545
+
546
+ // ✅ More specific or use !important
547
+ .custom-btn.aw-button {
548
+ background: red !important;
549
+ }
550
+ ```
551
+
552
+ 2. **Scoped styles**
553
+ ```markup
554
+ <!-- ❌ Scoped styles don't affect child components -->
555
+ <style scoped>
556
+ .aw-button {
557
+ background: red; // Won't work
558
+ }
559
+ </style>
560
+
561
+ <!-- ✅ Use deep selector -->
562
+ <style scoped>
563
+ ::v-deep .aw-button {
564
+ background: red;
565
+ }
566
+ </style>
567
+
568
+ <!-- ✅ Or remove scoped -->
569
+ <style>
570
+ .custom-page .aw-button {
571
+ background: red;
572
+ }
573
+ </style>
574
+ ```
575
+
576
+ 3. **Loading state preventing styles**
577
+ ```scss
578
+ // ❌ Applies even during loading
579
+ .custom-btn {
580
+ background-color: var(--c-accent) !important;
581
+ }
582
+
583
+ // ✅ Exclude loading state
584
+ .custom-btn:not([disabled]):not(.loading) {
585
+ background-color: var(--c-accent) !important;
586
+ }
587
+ ```
588
+
589
+ ### Dark Theme Not Working
590
+
591
+ **Problem:** Dark theme colors don't apply.
592
+
593
+ **Debugging Steps:**
594
+
595
+ 1. **Check theme plugin loaded**
596
+ ```javascript
597
+ // In nuxt.config.js, @awes-io/ui module should be registered
598
+ modules: [
599
+ '@awes-io/ui'
600
+ ]
601
+ ```
602
+
603
+ 2. **Use CSS custom properties**
604
+ ```scss
605
+ // ✅ Use theme variables
606
+ .custom-element {
607
+ background: var(--c-background);
608
+ color: var(--c-text);
609
+ }
610
+
611
+ // ❌ Hard-coded colors
612
+ .custom-element {
613
+ background: #fff;
614
+ color: #000;
615
+ }
616
+ ```
617
+
618
+ 3. **Check dark class on html**
619
+ ```javascript
620
+ // Should add .dark class to <html> when dark theme active
621
+ document.documentElement.classList.contains('dark')
622
+ ```
623
+
624
+ ## Date & Time Issues
625
+
626
+ ### Dates Not Formatting Correctly
627
+
628
+ **Problem:** Dates show as raw strings or errors.
629
+
630
+ **Solution:** Use $dayjs, not native Date:
631
+ ```markup
632
+ <!-- ❌ BAD - Raw date string -->
633
+ {{ customer.created_at }}
634
+
635
+ <!-- ❌ BAD - Native Date -->
636
+ {{ new Date(customer.created_at).toLocaleDateString() }}
637
+
638
+ <!-- ✅ GOOD - Use $dayjs -->
639
+ {{ $dayjs(customer.created_at).format('ll') }}
640
+ ```
641
+
642
+ **Remember template vs method usage:**
643
+ ```markup
644
+ <template>
645
+ <!-- ✅ Without this in templates -->
646
+ {{ $dayjs(date).format('ll') }}
647
+ </template>
648
+
649
+ <script>
650
+ export default {
651
+ methods: {
652
+ formatDate(date) {
653
+ // ✅ With this in methods
654
+ return this.$dayjs(date).format('ll')
655
+ }
656
+ }
657
+ }
658
+ </script>
659
+ ```
660
+
661
+ ### Dates in Wrong Timezone
662
+
663
+ **Problem:** Dates show in wrong timezone.
664
+
665
+ **Solution:** Configure Day.js timezone plugin:
666
+ ```javascript
667
+ // In plugin or component
668
+ import dayjs from 'dayjs'
669
+ import utc from 'dayjs/plugin/utc'
670
+ import timezone from 'dayjs/plugin/timezone'
671
+
672
+ dayjs.extend(utc)
673
+ dayjs.extend(timezone)
674
+
675
+ // Set timezone
676
+ dayjs.tz.setDefault('America/New_York')
677
+
678
+ // Use in templates
679
+ this.$dayjs(date).tz('America/New_York').format('ll')
680
+ ```
681
+
682
+ ## Router Issues
683
+
684
+ ### Navigation Not Working
685
+
686
+ **Problem:** Clicking link/button doesn't navigate.
687
+
688
+ **Debugging Steps:**
689
+
690
+ 1. **Check href vs @click**
691
+ ```markup
692
+ <!-- ✅ For navigation, use href -->
693
+ <AwButton :href="`/customers/${customer.id}`">
694
+ View
695
+ </AwButton>
696
+
697
+ <!-- ✅ Or use @click with router.push -->
698
+ <AwButton @click="$router.push(`/customers/${customer.id}`)">
699
+ View
700
+ </AwButton>
701
+
702
+ <!-- ❌ Missing navigation -->
703
+ <AwButton>View</AwButton>
704
+ ```
705
+
706
+ 2. **Check route exists**
707
+ ```javascript
708
+ // Verify route exists in pages/ directory
709
+ pages/
710
+ shops/
711
+ _shop_uuid/
712
+ customers/
713
+ _id.vue // Must exist
714
+ ```
715
+
716
+ 3. **Check route params**
717
+ ```javascript
718
+ // ✅ Include all required params
719
+ this.$router.push({
720
+ name: 'shops-shop_uuid-customers-id',
721
+ params: {
722
+ shop_uuid: this.$route.params.shop_uuid,
723
+ id: customer.id
724
+ }
725
+ })
726
+ ```
727
+
728
+ ### pushBack Not Going Anywhere
729
+
730
+ **Problem:** router.pushBack() doesn't navigate.
731
+
732
+ **Cause:** Back route not set with setBack:
733
+ ```javascript
734
+ // ❌ pushBack without setBack
735
+ this.$router.pushBack() // Does nothing
736
+ ```
737
+
738
+ **Solution:** Set back route first:
739
+ ```javascript
740
+ // ✅ On list page
741
+ mounted() {
742
+ this.$router.setBack(`/shops/${this.$route.params.shop_uuid}/customers`)
743
+ }
744
+
745
+ // ✅ On detail page
746
+ methods: {
747
+ cancel() {
748
+ // Goes to route set by setBack
749
+ this.$router.pushBack()
750
+ }
751
+ }
752
+ ```
753
+
754
+ ## Performance Issues
755
+
756
+ ### Page Slow to Load
757
+
758
+ **Problem:** Page takes long time to render.
759
+
760
+ **Common Causes:**
761
+
762
+ 1. **Loading too much data**
763
+ ```javascript
764
+ // ❌ Fetching all records
765
+ customers: new Customers([]) // Could be thousands
766
+
767
+ // ✅ Use pagination
768
+ customers: new Customers([], {
769
+ shop_uuid: this.$route.params.shop_uuid,
770
+ per_page: 25
771
+ })
772
+ ```
773
+
774
+ 2. **Too many watchers**
775
+ ```javascript
776
+ // ❌ Deep watchers on large objects
777
+ watch: {
778
+ customers: {
779
+ handler() { ... },
780
+ deep: true // Expensive
781
+ }
782
+ }
783
+
784
+ // ✅ Watch specific properties
785
+ watch: {
786
+ 'customers.models.length': {
787
+ handler() { ... }
788
+ }
789
+ }
790
+ ```
791
+
792
+ 3. **Inefficient computed properties**
793
+ ```javascript
794
+ // ❌ Filters array every time
795
+ computed: {
796
+ activeCustomers() {
797
+ return this.customers.models.filter(c => c.active) // Runs on every change
798
+ }
799
+ }
800
+
801
+ // ✅ Cache or use backend filtering
802
+ customers: new Customers([], {
803
+ shop_uuid: this.$route.params.shop_uuid,
804
+ status: 'active' // Filter on backend
805
+ })
806
+ ```
807
+
808
+ ### Table Slow to Render
809
+
810
+ **Problem:** AwTableBuilder slow with many rows.
811
+
812
+ **Solutions:**
813
+
814
+ 1. **Reduce per_page**
815
+ ```javascript
816
+ customers: new Customers([], {
817
+ shop_uuid: this.$route.params.shop_uuid,
818
+ per_page: 15 // Fewer rows per page
819
+ })
820
+ ```
821
+
822
+ 2. **Simplify cell templates**
823
+ ```markup
824
+ <!-- ❌ Complex calculations in cell -->
825
+ <AwTableCol field="total" title="Total">
826
+ <template #default="{ cell, row }">
827
+ {{ complexCalculation(row) }}
828
+ </template>
829
+ </AwTableCol>
830
+
831
+ <!-- ✅ Calculate on backend or cache -->
832
+ <AwTableCol field="total_formatted" title="Total" />
833
+ ```
834
+
835
+ 3. **Use field prop when possible**
836
+ ```markup
837
+ <!-- ✅ Fast - direct field access -->
838
+ <AwTableCol field="name" title="Name" />
839
+
840
+ <!-- ❌ Slower - custom template -->
841
+ <AwTableCol title="Name">
842
+ <template #default="{ cell }">
843
+ {{ cell.name }}
844
+ </template>
845
+ </AwTableCol>
846
+ ```
847
+
848
+ ## Authentication Issues
849
+
850
+ ### User Not Redirected to Login
851
+
852
+ **Problem:** Accessing protected page doesn't redirect to login.
853
+
854
+ **Debugging Steps:**
855
+
856
+ 1. **Check middleware**
857
+ ```javascript
858
+ // ✅ Page has auth middleware
859
+ export default {
860
+ middleware: 'auth'
861
+ }
862
+ ```
863
+
864
+ 2. **Check nuxt-auth config**
865
+ ```javascript
866
+ // In nuxt.config.js
867
+ auth: {
868
+ strategies: {
869
+ laravelJWT: {
870
+ // ...
871
+ redirect: {
872
+ login: '/login',
873
+ logout: '/login',
874
+ home: '/dashboard'
875
+ }
876
+ }
877
+ }
878
+ }
879
+ ```
880
+
881
+ 3. **Check token**
882
+ ```javascript
883
+ // In browser console
884
+ console.log(this.$auth.loggedIn)
885
+ console.log(this.$auth.token)
886
+ ```
887
+
888
+ ### API Requests Return 401
889
+
890
+ **Problem:** API requests fail with 401 Unauthorized.
891
+
892
+ **Debugging Steps:**
893
+
894
+ 1. **Check token in request headers**
895
+ ```javascript
896
+ // Open DevTools → Network → Select request → Headers
897
+ // Should have: Authorization: Bearer <token>
898
+ ```
899
+
900
+ 2. **Check token expiration**
901
+ ```javascript
902
+ // In browser console
903
+ const payload = JSON.parse(atob(this.$auth.token.split('.')[1]))
904
+ console.log('Expires:', new Date(payload.exp * 1000))
905
+ ```
906
+
907
+ 3. **Check nuxt-auth strategy config**
908
+ ```javascript
909
+ auth: {
910
+ strategies: {
911
+ laravelJWT: {
912
+ url: process.env.LARAVEL_URL,
913
+ endpoints: {
914
+ login: { url: '/api/auth/login', method: 'post' },
915
+ refresh: { url: '/api/auth/refresh', method: 'post' },
916
+ user: { url: '/api/auth/me', method: 'get' }
917
+ }
918
+ }
919
+ }
920
+ }
921
+ ```
922
+
923
+ ## Getting Help
924
+
925
+ If you can't find a solution here:
926
+
927
+ 1. **Check component documentation**
928
+ - [Component Index](../index.md)
929
+ - Individual component docs in [components/](../components/)
930
+
931
+ 2. **Check integration guides**
932
+ - [Integration Guide](../integrations.md)
933
+ - [Best Practices](../guides/best-practices.md)
934
+
935
+ 3. **Enable debug mode**
936
+ ```javascript
937
+ // In nuxt.config.js
938
+ export default {
939
+ build: {
940
+ extend(config, { isDev }) {
941
+ if (isDev) {
942
+ config.devtool = 'source-map'
943
+ }
944
+ }
945
+ }
946
+ }
947
+ ```
948
+
949
+ 4. **Check browser console**
950
+ - Look for errors or warnings
951
+ - Check network requests (DevTools → Network)
952
+ - Inspect Vue component tree (Vue DevTools)
953
+
954
+ 5. **Minimal reproduction**
955
+ - Create minimal example that reproduces issue
956
+ - Isolate component causing problem
957
+ - Test with default props
958
+
959
+ ## See Also
960
+
961
+ - [Error Handling Guide](../guides/error-handling.md) - Handling errors properly
962
+ - [Data Fetching Guide](../guides/data-fetching.md) - Collection and model patterns
963
+ - [Best Practices Guide](../guides/best-practices.md) - Avoiding common issues
964
+ - [Plugins Reference](./plugins.md) - Using framework utilities