@nuxt-customer-portal/service-requests 0.3.2 → 0.4.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @nuxt-customer-portal/service-requests
2
2
 
3
+ ## 0.4.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [59c8921]
8
+ - Updated dependencies [59c8921]
9
+ - Updated dependencies [59c8921]
10
+ - Updated dependencies [59c8921]
11
+ - Updated dependencies [59c8921]
12
+ - Updated dependencies [59c8921]
13
+ - Updated dependencies [59c8921]
14
+ - Updated dependencies [59c8921]
15
+ - @nuxt-customer-portal/core@0.4.0
16
+ - @nuxt-customer-portal/clients@0.4.0
17
+
18
+ ## 0.3.3
19
+
20
+ ### Patch Changes
21
+
22
+ - @nuxt-customer-portal/clients@0.3.3
23
+ - @nuxt-customer-portal/core@0.3.3
24
+
3
25
  ## 0.3.2
4
26
 
5
27
  ### Patch Changes
@@ -153,7 +153,14 @@ const handleSubmit = () => {
153
153
  >
154
154
  {{ t('common.cancel') }}
155
155
  </UButton>
156
- <UButton type="submit" color="primary" size="lg" :loading="loading">
156
+ <UButton
157
+ type="submit"
158
+ color="primary"
159
+ size="lg"
160
+ :icon="editMode ? 'i-lucide-save' : 'i-lucide-plus'"
161
+ class="ml-auto flex min-w-28 justify-center"
162
+ :loading="loading"
163
+ >
157
164
  {{ editMode ? t('common.save') : t('common.create') }}
158
165
  </UButton>
159
166
  </div>
@@ -48,16 +48,14 @@ const reset = () => {
48
48
  }
49
49
  }
50
50
  watch(request, reset, { immediate: true })
51
- onMounted(async () => {
52
- try {
53
- assignees.value = await getAssignees()
54
- reset()
55
- } catch {
56
- toast.add({ title: t('features.serviceRequests.messages.fetchError'), color: 'error' })
57
- } finally {
58
- loading.value = false
59
- }
60
- })
51
+ try {
52
+ assignees.value = await getAssignees()
53
+ reset()
54
+ } catch {
55
+ toast.add({ title: t('features.serviceRequests.messages.fetchError'), color: 'error' })
56
+ } finally {
57
+ loading.value = false
58
+ }
61
59
  const save = async () => {
62
60
  updating.value = true
63
61
  try {
@@ -102,7 +100,9 @@ const save = async () => {
102
100
  /></UFormField>
103
101
  <div class="flex justify-end gap-2 border-t border-default pt-4">
104
102
  <UButton color="neutral" variant="outline" :disabled="updating" @click="reset">{{ t('common.cancel') }}</UButton
105
- ><UButton type="submit" :loading="updating">{{ t('features.serviceRequests.actions.saveChanges') }}</UButton>
103
+ ><UButton type="submit" icon="i-lucide-save" class="ml-auto flex min-w-28 justify-center" :loading="updating">{{
104
+ t('features.serviceRequests.actions.saveChanges')
105
+ }}</UButton>
106
106
  </div>
107
107
  </UForm>
108
108
  </UCard>
@@ -60,19 +60,17 @@ const backRoute = computed(() => {
60
60
  return { path: '/requests', query }
61
61
  })
62
62
 
63
- onMounted(async () => {
64
- try {
65
- request.value = await getRequest(requestId)
66
- } catch {
67
- toast.add({
68
- title: t('common.error'),
69
- description: t('features.serviceRequests.messages.fetchError'),
70
- color: 'error'
71
- })
72
- } finally {
73
- loading.value = false
74
- }
75
- })
63
+ try {
64
+ request.value = await getRequest(requestId)
65
+ } catch {
66
+ toast.add({
67
+ title: t('common.error'),
68
+ description: t('features.serviceRequests.messages.fetchError'),
69
+ color: 'error'
70
+ })
71
+ } finally {
72
+ loading.value = false
73
+ }
76
74
 
77
75
  const handleUpdate = async (data: ServiceRequestUpdateInput) => {
78
76
  updating.value = true
@@ -140,7 +138,7 @@ const handleDelete = async () => {
140
138
  />
141
139
 
142
140
  <ServiceRequestManagement v-if="can('manage')" :request="request" @updated="request = $event" />
143
- <UModal v-model:open="showEditModal" :title="t('features.serviceRequests.edit')">
141
+ <UModal v-if="showEditModal" v-model:open="showEditModal" :title="t('features.serviceRequests.edit')">
144
142
  <template #body>
145
143
  <CustomerRequestForm
146
144
  :initial-data="request"
@@ -151,6 +149,7 @@ const handleDelete = async () => {
151
149
  </template>
152
150
  </UModal>
153
151
  <ConfirmationModal
152
+ v-if="showDeleteConfirm"
154
153
  v-model:open="showDeleteConfirm"
155
154
  title="features.serviceRequests.delete"
156
155
  message="features.serviceRequests.confirmDelete"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt-customer-portal/service-requests",
3
- "version": "0.3.2",
3
+ "version": "0.4.0",
4
4
  "license": "MIT",
5
5
  "homepage": "https://nuxt-customer-portal.com",
6
6
  "repository": {
@@ -41,8 +41,8 @@
41
41
  "nanoid": "^5.1.6",
42
42
  "pg": "^8.22.0",
43
43
  "zod": "^4.4.3",
44
- "@nuxt-customer-portal/core": "^0.3.2",
45
- "@nuxt-customer-portal/clients": "^0.3.2"
44
+ "@nuxt-customer-portal/core": "^0.4.0",
45
+ "@nuxt-customer-portal/clients": "^0.4.0"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "nuxt": "^4.5.1"
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  id: 'service-requests',
3
- version: '0.3.2',
3
+ version: '0.4.0',
4
4
  source: '@nuxt-customer-portal/service-requests',
5
5
  clientModuleId: 'service-requests',
6
6
  dependsOn: ['core', 'clients'],