@awes-io/ui 2.142.3 → 2.143.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 (236) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/assets/css/components/_index.css +7 -1
  3. package/assets/css/components/animation.css +38 -32
  4. package/assets/css/components/content-placeholder.css +103 -0
  5. package/assets/css/components/empty-container.css +69 -1
  6. package/assets/css/components/filter-chosen.css +6 -0
  7. package/assets/css/components/filter-date-range.css +17 -1
  8. package/assets/css/components/filter-month.css +23 -17
  9. package/assets/css/components/filter-select.css +11 -0
  10. package/assets/css/components/layout.css +1 -32
  11. package/assets/css/components/modal.css +1 -1
  12. package/assets/css/components/number.css +12 -0
  13. package/assets/css/components/page-aside.css +54 -0
  14. package/assets/js/css.js +1 -1
  15. package/assets/js/icons/mono.js +59 -91
  16. package/assets/js/icons/multicolor.js +1 -31
  17. package/components/1_atoms/AwContentPlaceholder.vue +60 -0
  18. package/components/1_atoms/AwFlow.vue +21 -48
  19. package/components/1_atoms/AwLabel.vue +1 -1
  20. package/components/2_molecules/AwButton.vue +1 -1
  21. package/components/2_molecules/AwEmptyContainer.vue +74 -72
  22. package/components/2_molecules/AwNumber.vue +180 -0
  23. package/components/2_molecules/AwSelect.vue +11 -4
  24. package/components/3_organisms/AwFilterChosen.vue +73 -0
  25. package/components/3_organisms/AwFilterDateRange.vue +177 -0
  26. package/components/3_organisms/AwFilterMonth.vue +37 -40
  27. package/components/3_organisms/AwFilterSelect.vue +368 -0
  28. package/components/3_organisms/AwMultiBlockBuilder.vue +1 -1
  29. package/components/3_organisms/AwTable/AwTableBuilder.vue +12 -60
  30. package/components/4_pages/AwPageAside.vue +108 -0
  31. package/components/5_layouts/AwLayoutCenter.vue +3 -8
  32. package/components/5_layouts/_AwUserMenu.vue +1 -1
  33. package/dist/css/aw-icons.css +26 -0
  34. package/dist/fonts/aw-icons.svg +18 -0
  35. package/dist/fonts/aw-icons.ttf +0 -0
  36. package/dist/fonts/aw-icons.woff +0 -0
  37. package/dist/fonts/aw-icons.woff2 +0 -0
  38. package/docs/_template.md +80 -0
  39. package/docs/components/atoms/aw-accordion-fold.md +91 -0
  40. package/docs/components/atoms/aw-action-card-body.md +67 -0
  41. package/docs/components/atoms/aw-action-card.md +94 -0
  42. package/docs/components/atoms/aw-action-icon.md +88 -0
  43. package/docs/components/atoms/aw-avatar.md +106 -0
  44. package/docs/components/atoms/aw-card.md +112 -0
  45. package/docs/components/atoms/aw-checkbox.md +112 -0
  46. package/docs/components/atoms/aw-content-placeholder.md +116 -0
  47. package/docs/components/atoms/aw-description.md +83 -0
  48. package/docs/components/atoms/aw-dock.md +84 -0
  49. package/docs/components/atoms/aw-dropdown-button.md +94 -0
  50. package/docs/components/atoms/aw-dropdown.md +128 -0
  51. package/docs/components/atoms/aw-file.md +73 -0
  52. package/docs/components/atoms/aw-flow.md +92 -0
  53. package/docs/components/atoms/aw-grid.md +91 -0
  54. package/docs/components/atoms/aw-headline.md +71 -0
  55. package/docs/components/atoms/aw-icon-system-color.md +121 -0
  56. package/docs/components/atoms/aw-icon-system-mono.md +205 -0
  57. package/docs/components/atoms/aw-icon.md +235 -0
  58. package/docs/components/atoms/aw-info.md +85 -0
  59. package/docs/components/atoms/aw-input.md +120 -0
  60. package/docs/components/atoms/aw-label.md +83 -0
  61. package/docs/components/atoms/aw-link.md +99 -0
  62. package/docs/components/atoms/aw-list.md +88 -0
  63. package/docs/components/atoms/aw-progress.md +70 -0
  64. package/docs/components/atoms/aw-radio.md +109 -0
  65. package/docs/components/atoms/aw-refresh-wrapper.md +81 -0
  66. package/docs/components/atoms/aw-select-native.md +106 -0
  67. package/docs/components/atoms/aw-slider.md +82 -0
  68. package/docs/components/atoms/aw-sub-headline.md +73 -0
  69. package/docs/components/atoms/aw-switcher.md +115 -0
  70. package/docs/components/atoms/aw-tag.md +80 -0
  71. package/docs/components/atoms/aw-title.md +70 -0
  72. package/docs/components/atoms/aw-toggler.md +69 -0
  73. package/docs/components/layouts/aw-layout-center.md +168 -0
  74. package/docs/components/layouts/aw-layout-error.md +153 -0
  75. package/docs/components/layouts/aw-layout-provider.md +238 -0
  76. package/docs/components/layouts/aw-layout.md +88 -0
  77. package/docs/components/molecules/aw-action-button.md +91 -0
  78. package/docs/components/molecules/aw-alert.md +96 -0
  79. package/docs/components/molecules/aw-badge.md +108 -0
  80. package/docs/components/molecules/aw-banner-text.md +90 -0
  81. package/docs/components/molecules/aw-button-nav.md +46 -0
  82. package/docs/components/molecules/aw-button.md +123 -0
  83. package/docs/components/molecules/aw-description-input.md +67 -0
  84. package/docs/components/molecules/aw-empty-container.md +86 -0
  85. package/docs/components/molecules/aw-island.md +234 -0
  86. package/docs/components/molecules/aw-number.md +138 -0
  87. package/docs/components/molecules/aw-select-object.md +401 -0
  88. package/docs/components/molecules/aw-select.md +215 -0
  89. package/docs/components/molecules/aw-tab-nav.md +108 -0
  90. package/docs/components/molecules/aw-tel.md +129 -0
  91. package/docs/components/molecules/aw-textarea.md +83 -0
  92. package/docs/components/molecules/aw-userpic.md +115 -0
  93. package/docs/components/organisms/aw-address-block.md +64 -0
  94. package/docs/components/organisms/aw-address.md +132 -0
  95. package/docs/components/organisms/aw-birthday-picker.md +73 -0
  96. package/docs/components/organisms/aw-bottom-bar.md +66 -0
  97. package/docs/components/organisms/aw-calendar-days.md +115 -0
  98. package/docs/components/organisms/aw-calendar-nav.md +98 -0
  99. package/docs/components/organisms/aw-calendar-view.md +98 -0
  100. package/docs/components/organisms/aw-calendar.md +166 -0
  101. package/docs/components/organisms/aw-chart.md +154 -0
  102. package/docs/components/organisms/aw-chip-select.md +164 -0
  103. package/docs/components/organisms/aw-chip.md +126 -0
  104. package/docs/components/organisms/aw-code-snippet.md +94 -0
  105. package/docs/components/organisms/aw-code.md +132 -0
  106. package/docs/components/organisms/aw-context-menu.md +117 -0
  107. package/docs/components/organisms/aw-cropper.md +151 -0
  108. package/docs/components/organisms/aw-date.md +161 -0
  109. package/docs/components/organisms/aw-display-date.md +33 -0
  110. package/docs/components/organisms/aw-download-link.md +46 -0
  111. package/docs/components/organisms/aw-fetch-data.md +161 -0
  112. package/docs/components/organisms/aw-filter-chosen.md +226 -0
  113. package/docs/components/organisms/aw-filter-date-range.md +205 -0
  114. package/docs/components/organisms/aw-filter-month.md +43 -0
  115. package/docs/components/organisms/aw-filter-select.md +225 -0
  116. package/docs/components/organisms/aw-form.md +174 -0
  117. package/docs/components/organisms/aw-gmap-marker.md +86 -0
  118. package/docs/components/organisms/aw-gmap.md +90 -0
  119. package/docs/components/organisms/aw-image-upload.md +56 -0
  120. package/docs/components/organisms/aw-island-avatar.md +87 -0
  121. package/docs/components/organisms/aw-markdown-editor.md +104 -0
  122. package/docs/components/organisms/aw-modal-buttons.md +57 -0
  123. package/docs/components/organisms/aw-modal.md +246 -0
  124. package/docs/components/organisms/aw-model-edit.md +74 -0
  125. package/docs/components/organisms/aw-money.md +53 -0
  126. package/docs/components/organisms/aw-multi-block-builder.md +165 -0
  127. package/docs/components/organisms/aw-pagination.md +121 -0
  128. package/docs/components/organisms/aw-password.md +103 -0
  129. package/docs/components/organisms/aw-preview-card.md +45 -0
  130. package/docs/components/organisms/aw-search.md +116 -0
  131. package/docs/components/organisms/aw-subnav.md +122 -0
  132. package/docs/components/organisms/aw-table-builder.md +165 -0
  133. package/docs/components/organisms/aw-table-col.md +123 -0
  134. package/docs/components/organisms/aw-table-head.md +92 -0
  135. package/docs/components/organisms/aw-table-row.md +91 -0
  136. package/docs/components/organisms/aw-table.md +172 -0
  137. package/docs/components/organisms/aw-tags.md +54 -0
  138. package/docs/components/organisms/aw-toggle-show-aside.md +43 -0
  139. package/docs/components/organisms/aw-uploader-files.md +125 -0
  140. package/docs/components/organisms/aw-uploader.md +163 -0
  141. package/docs/components/organisms/aw-user-menu.md +87 -0
  142. package/docs/components/pages/aw-page-aside.md +296 -0
  143. package/docs/components/pages/aw-page-menu-buttons.md +172 -0
  144. package/docs/components/pages/aw-page-modal.md +198 -0
  145. package/docs/components/pages/aw-page-single.md +253 -0
  146. package/docs/components/pages/aw-page.md +194 -0
  147. package/docs/configuration.md +493 -0
  148. package/docs/cookbook/advanced-patterns.md +1388 -0
  149. package/docs/cookbook/common-patterns.md +965 -0
  150. package/docs/cookbook/index.md +786 -0
  151. package/docs/getting-started.md +596 -0
  152. package/docs/guides/best-practices.md +1106 -0
  153. package/docs/guides/data-fetching.md +852 -0
  154. package/docs/guides/error-handling.md +1172 -0
  155. package/docs/guides/forms-guide.md +1329 -0
  156. package/docs/guides/mobile-subnavigation.md +359 -0
  157. package/docs/guides/page-patterns/aside-pages.md +1418 -0
  158. package/docs/guides/page-patterns/dashboard-pages.md +990 -0
  159. package/docs/guides/page-patterns/detail-pages.md +1493 -0
  160. package/docs/guides/page-patterns/list-pages.md +1094 -0
  161. package/docs/index.md +263 -1
  162. package/docs/integrations.md +870 -0
  163. package/docs/reference/menu.md +462 -0
  164. package/docs/reference/plugins.md +970 -0
  165. package/docs/reference/troubleshooting.md +945 -0
  166. package/nuxt/awes.config.js +9 -8
  167. package/nuxt/icons.css +26 -0
  168. package/nuxt/index.js +2 -2
  169. package/nuxt/pages/more.vue +1 -1
  170. package/package.json +5 -3
  171. package/readme.md +171 -1
  172. package/docs/aw-accordion-fold.md +0 -46
  173. package/docs/aw-address.md +0 -44
  174. package/docs/aw-avatar.md +0 -51
  175. package/docs/aw-badge.md +0 -32
  176. package/docs/aw-button-nav.md +0 -44
  177. package/docs/aw-button.md +0 -50
  178. package/docs/aw-calendar-days.md +0 -46
  179. package/docs/aw-calendar-nav.md +0 -25
  180. package/docs/aw-calendar-view.md +0 -12
  181. package/docs/aw-calendar.md +0 -59
  182. package/docs/aw-card.md +0 -48
  183. package/docs/aw-chart.md +0 -51
  184. package/docs/aw-checkbox.md +0 -56
  185. package/docs/aw-chip-select.md +0 -46
  186. package/docs/aw-chip.md +0 -53
  187. package/docs/aw-code-snippet.md +0 -18
  188. package/docs/aw-code.md +0 -56
  189. package/docs/aw-content-wrapper.md +0 -40
  190. package/docs/aw-context-menu.md +0 -31
  191. package/docs/aw-cropper.md +0 -60
  192. package/docs/aw-dashboard-card.md +0 -37
  193. package/docs/aw-dashboard-donut.md +0 -30
  194. package/docs/aw-dashboard-line.md +0 -20
  195. package/docs/aw-dashboard-progress.md +0 -33
  196. package/docs/aw-dashboard-section.md +0 -32
  197. package/docs/aw-dashboard-speed.md +0 -30
  198. package/docs/aw-date.md +0 -52
  199. package/docs/aw-dropdown-button.md +0 -31
  200. package/docs/aw-dropdown.md +0 -69
  201. package/docs/aw-fetch-data.md +0 -45
  202. package/docs/aw-form.md +0 -52
  203. package/docs/aw-grid.md +0 -48
  204. package/docs/aw-icon.md +0 -50
  205. package/docs/aw-info.md +0 -53
  206. package/docs/aw-input.md +0 -55
  207. package/docs/aw-layout-default.md +0 -30
  208. package/docs/aw-layout-frame-center.md +0 -29
  209. package/docs/aw-layout-simple.md +0 -49
  210. package/docs/aw-link.md +0 -54
  211. package/docs/aw-markdown-editor.md +0 -51
  212. package/docs/aw-modal.md +0 -63
  213. package/docs/aw-multi-block-builder.md +0 -66
  214. package/docs/aw-page.md +0 -36
  215. package/docs/aw-pagination.md +0 -54
  216. package/docs/aw-password.md +0 -48
  217. package/docs/aw-radio.md +0 -54
  218. package/docs/aw-search.md +0 -49
  219. package/docs/aw-select.md +0 -93
  220. package/docs/aw-slider.md +0 -40
  221. package/docs/aw-svg-image.md +0 -19
  222. package/docs/aw-switcher.md +0 -51
  223. package/docs/aw-tab-nav.md +0 -55
  224. package/docs/aw-table-builder.md +0 -58
  225. package/docs/aw-table-col.md +0 -33
  226. package/docs/aw-table-head.md +0 -28
  227. package/docs/aw-table-row.md +0 -33
  228. package/docs/aw-table.md +0 -59
  229. package/docs/aw-tel.md +0 -47
  230. package/docs/aw-textarea.md +0 -47
  231. package/docs/aw-toggler.md +0 -41
  232. package/docs/aw-uploader-files.md +0 -20
  233. package/docs/aw-uploader.md +0 -60
  234. package/docs/aw-user-menu.md +0 -34
  235. package/docs/aw-userpic.md +0 -34
  236. /package/components/{3_organisms → 2_molecules}/AwTel.vue +0 -0
@@ -0,0 +1,945 @@
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
+ ### @click:row and #dropdown Conflict
410
+
411
+ **Problem:** Row click doesn't work when dropdown is present.
412
+
413
+ **Cause:** Cannot use both @click:row and #dropdown slot simultaneously:
414
+ ```markup
415
+ <!-- ❌ BAD - Both click:row and dropdown -->
416
+ <AwTableBuilder
417
+ :collection="customers"
418
+ @click:row="viewCustomer"
419
+ >
420
+ <template #dropdown="{ cell }">
421
+ <AwDropdownButton>
422
+ <!-- This prevents row click -->
423
+ </AwDropdownButton>
424
+ </template>
425
+ </AwTableBuilder>
426
+ ```
427
+
428
+ **Solution:** Use ONLY #dropdown slot:
429
+ ```markup
430
+ <!-- ✅ GOOD - Dropdown only -->
431
+ <AwTableBuilder :collection="customers">
432
+ <AwTableCol field="name" title="Name" />
433
+
434
+ <template #dropdown="{ cell }">
435
+ <AwDropdownButton>
436
+ <AwButton @click="viewCustomer(cell)">View</AwButton>
437
+ <AwButton @click="editCustomer(cell)">Edit</AwButton>
438
+ <AwButton @click="deleteCustomer(cell)">Delete</AwButton>
439
+ </AwDropdownButton>
440
+ </template>
441
+ </AwTableBuilder>
442
+ ```
443
+
444
+ ### Table Column Shows [object Object]
445
+
446
+ **Problem:** Table cell displays "[object Object]" instead of value.
447
+
448
+ **Cause:** Field prop behavior - with field prop, cell = value only; without field, cell = entire row:
449
+ ```markup
450
+ <!-- ❌ BAD - Trying to access object property with field prop -->
451
+ <AwTableCol field="address" title="Address">
452
+ <template #default="{ cell }">
453
+ {{ cell.city }} <!-- cell is just address object, not whole row -->
454
+ </template>
455
+ </AwTableCol>
456
+ ```
457
+
458
+ **Solution 1:** Don't use field prop:
459
+ ```markup
460
+ <!-- ✅ GOOD - No field prop, cell = entire row -->
461
+ <AwTableCol title="Address">
462
+ <template #default="{ cell }">
463
+ {{ cell.address.city }}
464
+ </template>
465
+ </AwTableCol>
466
+ ```
467
+
468
+ **Solution 2:** Use field prop correctly:
469
+ ```markup
470
+ <!-- ✅ GOOD - Format the field value directly -->
471
+ <AwTableCol field="address" title="Address">
472
+ <template #default="{ cell }">
473
+ {{ cell.city }}, {{ cell.state }}
474
+ </template>
475
+ </AwTableCol>
476
+ ```
477
+
478
+ ### Table Pagination Not Working
479
+
480
+ **Problem:** Pagination controls don't appear or don't work.
481
+
482
+ **Debugging Steps:**
483
+
484
+ 1. **Check backend returns pagination meta**
485
+ ```json
486
+ {
487
+ "data": [...],
488
+ "meta": {
489
+ "current_page": 1,
490
+ "last_page": 10,
491
+ "per_page": 15,
492
+ "total": 145
493
+ }
494
+ }
495
+ ```
496
+
497
+ 2. **Check collection route accepts page param**
498
+ ```javascript
499
+ // Backend should handle ?page=2
500
+ GET /api/customers?page=2
501
+ ```
502
+
503
+ 3. **Check AwTableBuilder has pagination prop (if needed)**
504
+ ```markup
505
+ <!-- Usually automatic, but can disable -->
506
+ <AwTableBuilder
507
+ :collection="customers"
508
+ :pagination="true"
509
+ />
510
+ ```
511
+
512
+ ## Styling Issues
513
+
514
+ ### Styles Not Applying
515
+
516
+ **Problem:** Custom styles don't apply to component.
517
+
518
+ **Common Causes:**
519
+
520
+ 1. **CSS specificity**
521
+ ```scss
522
+ // ❌ Not specific enough
523
+ .aw-button {
524
+ background: red;
525
+ }
526
+
527
+ // ✅ More specific or use !important
528
+ .custom-btn.aw-button {
529
+ background: red !important;
530
+ }
531
+ ```
532
+
533
+ 2. **Scoped styles**
534
+ ```markup
535
+ <!-- ❌ Scoped styles don't affect child components -->
536
+ <style scoped>
537
+ .aw-button {
538
+ background: red; // Won't work
539
+ }
540
+ </style>
541
+
542
+ <!-- ✅ Use deep selector -->
543
+ <style scoped>
544
+ ::v-deep .aw-button {
545
+ background: red;
546
+ }
547
+ </style>
548
+
549
+ <!-- ✅ Or remove scoped -->
550
+ <style>
551
+ .custom-page .aw-button {
552
+ background: red;
553
+ }
554
+ </style>
555
+ ```
556
+
557
+ 3. **Loading state preventing styles**
558
+ ```scss
559
+ // ❌ Applies even during loading
560
+ .custom-btn {
561
+ background-color: var(--c-accent) !important;
562
+ }
563
+
564
+ // ✅ Exclude loading state
565
+ .custom-btn:not([disabled]):not(.loading) {
566
+ background-color: var(--c-accent) !important;
567
+ }
568
+ ```
569
+
570
+ ### Dark Theme Not Working
571
+
572
+ **Problem:** Dark theme colors don't apply.
573
+
574
+ **Debugging Steps:**
575
+
576
+ 1. **Check theme plugin loaded**
577
+ ```javascript
578
+ // In nuxt.config.js, @awes-io/ui module should be registered
579
+ modules: [
580
+ '@awes-io/ui'
581
+ ]
582
+ ```
583
+
584
+ 2. **Use CSS custom properties**
585
+ ```scss
586
+ // ✅ Use theme variables
587
+ .custom-element {
588
+ background: var(--c-background);
589
+ color: var(--c-text);
590
+ }
591
+
592
+ // ❌ Hard-coded colors
593
+ .custom-element {
594
+ background: #fff;
595
+ color: #000;
596
+ }
597
+ ```
598
+
599
+ 3. **Check dark class on html**
600
+ ```javascript
601
+ // Should add .dark class to <html> when dark theme active
602
+ document.documentElement.classList.contains('dark')
603
+ ```
604
+
605
+ ## Date & Time Issues
606
+
607
+ ### Dates Not Formatting Correctly
608
+
609
+ **Problem:** Dates show as raw strings or errors.
610
+
611
+ **Solution:** Use $dayjs, not native Date:
612
+ ```markup
613
+ <!-- ❌ BAD - Raw date string -->
614
+ {{ customer.created_at }}
615
+
616
+ <!-- ❌ BAD - Native Date -->
617
+ {{ new Date(customer.created_at).toLocaleDateString() }}
618
+
619
+ <!-- ✅ GOOD - Use $dayjs -->
620
+ {{ $dayjs(customer.created_at).format('ll') }}
621
+ ```
622
+
623
+ **Remember template vs method usage:**
624
+ ```markup
625
+ <template>
626
+ <!-- ✅ Without this in templates -->
627
+ {{ $dayjs(date).format('ll') }}
628
+ </template>
629
+
630
+ <script>
631
+ export default {
632
+ methods: {
633
+ formatDate(date) {
634
+ // ✅ With this in methods
635
+ return this.$dayjs(date).format('ll')
636
+ }
637
+ }
638
+ }
639
+ </script>
640
+ ```
641
+
642
+ ### Dates in Wrong Timezone
643
+
644
+ **Problem:** Dates show in wrong timezone.
645
+
646
+ **Solution:** Configure Day.js timezone plugin:
647
+ ```javascript
648
+ // In plugin or component
649
+ import dayjs from 'dayjs'
650
+ import utc from 'dayjs/plugin/utc'
651
+ import timezone from 'dayjs/plugin/timezone'
652
+
653
+ dayjs.extend(utc)
654
+ dayjs.extend(timezone)
655
+
656
+ // Set timezone
657
+ dayjs.tz.setDefault('America/New_York')
658
+
659
+ // Use in templates
660
+ this.$dayjs(date).tz('America/New_York').format('ll')
661
+ ```
662
+
663
+ ## Router Issues
664
+
665
+ ### Navigation Not Working
666
+
667
+ **Problem:** Clicking link/button doesn't navigate.
668
+
669
+ **Debugging Steps:**
670
+
671
+ 1. **Check href vs @click**
672
+ ```markup
673
+ <!-- ✅ For navigation, use href -->
674
+ <AwButton :href="`/customers/${customer.id}`">
675
+ View
676
+ </AwButton>
677
+
678
+ <!-- ✅ Or use @click with router.push -->
679
+ <AwButton @click="$router.push(`/customers/${customer.id}`)">
680
+ View
681
+ </AwButton>
682
+
683
+ <!-- ❌ Missing navigation -->
684
+ <AwButton>View</AwButton>
685
+ ```
686
+
687
+ 2. **Check route exists**
688
+ ```javascript
689
+ // Verify route exists in pages/ directory
690
+ pages/
691
+ shops/
692
+ _shop_uuid/
693
+ customers/
694
+ _id.vue // Must exist
695
+ ```
696
+
697
+ 3. **Check route params**
698
+ ```javascript
699
+ // ✅ Include all required params
700
+ this.$router.push({
701
+ name: 'shops-shop_uuid-customers-id',
702
+ params: {
703
+ shop_uuid: this.$route.params.shop_uuid,
704
+ id: customer.id
705
+ }
706
+ })
707
+ ```
708
+
709
+ ### pushBack Not Going Anywhere
710
+
711
+ **Problem:** router.pushBack() doesn't navigate.
712
+
713
+ **Cause:** Back route not set with setBack:
714
+ ```javascript
715
+ // ❌ pushBack without setBack
716
+ this.$router.pushBack() // Does nothing
717
+ ```
718
+
719
+ **Solution:** Set back route first:
720
+ ```javascript
721
+ // ✅ On list page
722
+ mounted() {
723
+ this.$router.setBack(`/shops/${this.$route.params.shop_uuid}/customers`)
724
+ }
725
+
726
+ // ✅ On detail page
727
+ methods: {
728
+ cancel() {
729
+ // Goes to route set by setBack
730
+ this.$router.pushBack()
731
+ }
732
+ }
733
+ ```
734
+
735
+ ## Performance Issues
736
+
737
+ ### Page Slow to Load
738
+
739
+ **Problem:** Page takes long time to render.
740
+
741
+ **Common Causes:**
742
+
743
+ 1. **Loading too much data**
744
+ ```javascript
745
+ // ❌ Fetching all records
746
+ customers: new Customers([]) // Could be thousands
747
+
748
+ // ✅ Use pagination
749
+ customers: new Customers([], {
750
+ shop_uuid: this.$route.params.shop_uuid,
751
+ per_page: 25
752
+ })
753
+ ```
754
+
755
+ 2. **Too many watchers**
756
+ ```javascript
757
+ // ❌ Deep watchers on large objects
758
+ watch: {
759
+ customers: {
760
+ handler() { ... },
761
+ deep: true // Expensive
762
+ }
763
+ }
764
+
765
+ // ✅ Watch specific properties
766
+ watch: {
767
+ 'customers.models.length': {
768
+ handler() { ... }
769
+ }
770
+ }
771
+ ```
772
+
773
+ 3. **Inefficient computed properties**
774
+ ```javascript
775
+ // ❌ Filters array every time
776
+ computed: {
777
+ activeCustomers() {
778
+ return this.customers.models.filter(c => c.active) // Runs on every change
779
+ }
780
+ }
781
+
782
+ // ✅ Cache or use backend filtering
783
+ customers: new Customers([], {
784
+ shop_uuid: this.$route.params.shop_uuid,
785
+ status: 'active' // Filter on backend
786
+ })
787
+ ```
788
+
789
+ ### Table Slow to Render
790
+
791
+ **Problem:** AwTableBuilder slow with many rows.
792
+
793
+ **Solutions:**
794
+
795
+ 1. **Reduce per_page**
796
+ ```javascript
797
+ customers: new Customers([], {
798
+ shop_uuid: this.$route.params.shop_uuid,
799
+ per_page: 15 // Fewer rows per page
800
+ })
801
+ ```
802
+
803
+ 2. **Simplify cell templates**
804
+ ```markup
805
+ <!-- ❌ Complex calculations in cell -->
806
+ <AwTableCol field="total" title="Total">
807
+ <template #default="{ cell, row }">
808
+ {{ complexCalculation(row) }}
809
+ </template>
810
+ </AwTableCol>
811
+
812
+ <!-- ✅ Calculate on backend or cache -->
813
+ <AwTableCol field="total_formatted" title="Total" />
814
+ ```
815
+
816
+ 3. **Use field prop when possible**
817
+ ```markup
818
+ <!-- ✅ Fast - direct field access -->
819
+ <AwTableCol field="name" title="Name" />
820
+
821
+ <!-- ❌ Slower - custom template -->
822
+ <AwTableCol title="Name">
823
+ <template #default="{ cell }">
824
+ {{ cell.name }}
825
+ </template>
826
+ </AwTableCol>
827
+ ```
828
+
829
+ ## Authentication Issues
830
+
831
+ ### User Not Redirected to Login
832
+
833
+ **Problem:** Accessing protected page doesn't redirect to login.
834
+
835
+ **Debugging Steps:**
836
+
837
+ 1. **Check middleware**
838
+ ```javascript
839
+ // ✅ Page has auth middleware
840
+ export default {
841
+ middleware: 'auth'
842
+ }
843
+ ```
844
+
845
+ 2. **Check nuxt-auth config**
846
+ ```javascript
847
+ // In nuxt.config.js
848
+ auth: {
849
+ strategies: {
850
+ laravelJWT: {
851
+ // ...
852
+ redirect: {
853
+ login: '/login',
854
+ logout: '/login',
855
+ home: '/dashboard'
856
+ }
857
+ }
858
+ }
859
+ }
860
+ ```
861
+
862
+ 3. **Check token**
863
+ ```javascript
864
+ // In browser console
865
+ console.log(this.$auth.loggedIn)
866
+ console.log(this.$auth.token)
867
+ ```
868
+
869
+ ### API Requests Return 401
870
+
871
+ **Problem:** API requests fail with 401 Unauthorized.
872
+
873
+ **Debugging Steps:**
874
+
875
+ 1. **Check token in request headers**
876
+ ```javascript
877
+ // Open DevTools → Network → Select request → Headers
878
+ // Should have: Authorization: Bearer <token>
879
+ ```
880
+
881
+ 2. **Check token expiration**
882
+ ```javascript
883
+ // In browser console
884
+ const payload = JSON.parse(atob(this.$auth.token.split('.')[1]))
885
+ console.log('Expires:', new Date(payload.exp * 1000))
886
+ ```
887
+
888
+ 3. **Check nuxt-auth strategy config**
889
+ ```javascript
890
+ auth: {
891
+ strategies: {
892
+ laravelJWT: {
893
+ url: process.env.LARAVEL_URL,
894
+ endpoints: {
895
+ login: { url: '/api/auth/login', method: 'post' },
896
+ refresh: { url: '/api/auth/refresh', method: 'post' },
897
+ user: { url: '/api/auth/me', method: 'get' }
898
+ }
899
+ }
900
+ }
901
+ }
902
+ ```
903
+
904
+ ## Getting Help
905
+
906
+ If you can't find a solution here:
907
+
908
+ 1. **Check component documentation**
909
+ - [Component Index](../index.md)
910
+ - Individual component docs in [components/](../components/)
911
+
912
+ 2. **Check integration guides**
913
+ - [Integration Guide](../integrations.md)
914
+ - [Best Practices](../guides/best-practices.md)
915
+
916
+ 3. **Enable debug mode**
917
+ ```javascript
918
+ // In nuxt.config.js
919
+ export default {
920
+ build: {
921
+ extend(config, { isDev }) {
922
+ if (isDev) {
923
+ config.devtool = 'source-map'
924
+ }
925
+ }
926
+ }
927
+ }
928
+ ```
929
+
930
+ 4. **Check browser console**
931
+ - Look for errors or warnings
932
+ - Check network requests (DevTools → Network)
933
+ - Inspect Vue component tree (Vue DevTools)
934
+
935
+ 5. **Minimal reproduction**
936
+ - Create minimal example that reproduces issue
937
+ - Isolate component causing problem
938
+ - Test with default props
939
+
940
+ ## See Also
941
+
942
+ - [Error Handling Guide](../guides/error-handling.md) - Handling errors properly
943
+ - [Data Fetching Guide](../guides/data-fetching.md) - Collection and model patterns
944
+ - [Best Practices Guide](../guides/best-practices.md) - Avoiding common issues
945
+ - [Plugins Reference](./plugins.md) - Using framework utilities