lkt-item-crud 2.0.37 → 2.0.38

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lkt-item-crud",
3
- "version": "2.0.37",
3
+ "version": "2.0.38",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "module": "./dist/build.js",
@@ -152,6 +152,16 @@
152
152
 
153
153
  try {
154
154
  const r: HTTPResponse = await httpCall(props.readResource, props.readData);
155
+
156
+ r.notifications?.forEach(notification => {
157
+ if (notification.category === 'toast'){
158
+ openToast(<ToastConfig>{
159
+ positionX: ToastPositionX.Right,
160
+ ...notification.payload,
161
+ });
162
+ }
163
+ })
164
+
155
165
  debug('fetchItem -> response', r);
156
166
  isLoading.value = false;
157
167
  httpStatus.value = r.httpStatus;
@@ -319,6 +329,15 @@
319
329
  },
320
330
  onCreate = ($event: PointerEvent, r: HTTPResponse) => {
321
331
  debug('onCreate');
332
+ r.notifications?.forEach(notification => {
333
+ if (notification.category === 'toast'){
334
+ openToast(<ToastConfig>{
335
+ positionX: ToastPositionX.Right,
336
+ ...notification.payload,
337
+ });
338
+ }
339
+ })
340
+
322
341
  if (!ensureValidResourceSave(r, safeCreateButton.value.resource)) {
323
342
  if (props.notificationType === NotificationType.Toast) {
324
343
  openToast(<ToastConfig>{
@@ -350,6 +369,16 @@
350
369
  },
351
370
  onUpdate = ($event: PointerEvent, r: HTTPResponse) => {
352
371
  debug('onUpdate');
372
+
373
+ r.notifications?.forEach(notification => {
374
+ if (notification.category === 'toast'){
375
+ openToast(<ToastConfig>{
376
+ positionX: ToastPositionX.Right,
377
+ ...notification.payload,
378
+ });
379
+ }
380
+ })
381
+
353
382
  if (!ensureValidResourceSave(r, safeUpdateButton.value.resource)) {
354
383
  if (props.notificationType === NotificationType.Toast) {
355
384
  openToast(<ToastConfig>{
@@ -379,6 +408,15 @@
379
408
  },
380
409
  onDrop = ($event: PointerEvent, r: HTTPResponse) => {
381
410
  debug('onDrop');
411
+ r.notifications?.forEach(notification => {
412
+ if (notification.category === 'toast'){
413
+ openToast(<ToastConfig>{
414
+ positionX: ToastPositionX.Right,
415
+ ...notification.payload,
416
+ });
417
+ }
418
+ })
419
+
382
420
  if (!ensureValidResourceSave(r, safeDropButton.value.resource)) {
383
421
  if (props.notificationType === NotificationType.Toast) {
384
422
  openToast(<ToastConfig>{