Browse Source

fix: button export and report reference link

Muhammad Iqbal Afandi 3 years ago
parent
commit
dff307a0d2
38 changed files with 596 additions and 470 deletions
  1. 2
    7
      app/Http/Controllers/ReportTransactionController.php
  2. 13
    8
      app/Http/Controllers/TransactionController.php
  3. 2
    6
      app/Http/Middleware/HandleInertiaRequests.php
  4. 0
    1
      app/Models/Mutation.php
  5. 0
    1
      app/Models/Transaction.php
  6. 0
    1
      app/Models/TransactionDetail.php
  7. 27
    14
      public/js/resources_js_pages_customer_Create_vue.js
  8. 27
    14
      public/js/resources_js_pages_customer_Edit_vue.js
  9. 27
    14
      public/js/resources_js_pages_customer_Index_vue.js
  10. 27
    14
      public/js/resources_js_pages_expense_Create_vue.js
  11. 27
    14
      public/js/resources_js_pages_expense_Index_vue.js
  12. 1
    1
      public/js/resources_js_pages_expense_Show_vue.js
  13. 27
    14
      public/js/resources_js_pages_laundry_Create_vue.js
  14. 27
    14
      public/js/resources_js_pages_laundry_Edit_vue.js
  15. 27
    14
      public/js/resources_js_pages_laundry_Index_vue.js
  16. 32
    19
      public/js/resources_js_pages_mutation_Report_vue.js
  17. 4
    4
      public/js/resources_js_pages_mutation_TableHeader_js.js
  18. 27
    14
      public/js/resources_js_pages_outlet_Create_vue.js
  19. 27
    14
      public/js/resources_js_pages_outlet_Edit_vue.js
  20. 27
    14
      public/js/resources_js_pages_outlet_Index_vue.js
  21. 36
    29
      public/js/resources_js_pages_transaction_Create_vue.js
  22. 37
    30
      public/js/resources_js_pages_transaction_Index_vue.js
  23. 42
    90
      public/js/resources_js_pages_transaction_Report_vue.js
  24. 14
    19
      public/js/resources_js_pages_transaction_Show_vue.js
  25. 9
    15
      public/js/resources_js_pages_transaction_TableHeader_js.js
  26. 27
    14
      public/js/resources_js_pages_user_Create_vue.js
  27. 27
    14
      public/js/resources_js_pages_user_Edit_vue.js
  28. 27
    14
      public/js/resources_js_pages_user_Index_vue.js
  29. 1
    1
      public/js/resources_js_pages_user_Show_vue.js
  30. 1
    1
      public/js/vue.js
  31. 8
    5
      resources/js/components/AppButton.vue
  32. 1
    1
      resources/js/components/AppSubSidebar.vue
  33. 1
    1
      resources/js/pages/mutation/Report.vue
  34. 2
    2
      resources/js/pages/mutation/TableHeader.js
  35. 1
    1
      resources/js/pages/transaction/Index.vue
  36. 3
    22
      resources/js/pages/transaction/Report.vue
  37. 4
    3
      resources/js/pages/transaction/Show.vue
  38. 4
    6
      resources/js/pages/transaction/TableHeader.js

+ 2
- 7
app/Http/Controllers/ReportTransactionController.php View File

@@ -5,7 +5,7 @@ namespace App\Http\Controllers;
5 5
 use App\Exports\TransactionExport;
6 6
 use App\Models\Outlet;
7 7
 use App\Models\Transaction;
8
-use Illuminate\Http\Request;
8
+use Carbon\Carbon;
9 9
 use Maatwebsite\Excel\Facades\Excel;
10 10
 
11 11
 class ReportTransactionController extends Controller
@@ -24,14 +24,9 @@ class ReportTransactionController extends Controller
24 24
                 ->paginate(10)
25 25
                 ->withQueryString()
26 26
                 ->through(fn($transaction) => [
27
-                    'id' => $transaction->id,
28
-                    'transactionNumber' => $transaction->transaction_number,
27
+                    'startDate' => Carbon::parse($transaction->getRawOriginal('created_at'))->translatedFormat('Y-m-d'),
29 28
                     'createdAt' => $transaction->created_at,
30
-                    'outlet' => $transaction->outlet->name,
31 29
                     'price' => $transaction->totalPriceAsFullString(),
32
-                    'transactionStatusName' => $transaction->transactionStatus->name,
33
-                    'transactionStatusId' => $transaction->transactionStatus->id,
34
-                    'user' => $transaction->user->name,
35 30
                 ]),
36 31
             'outlets' => Outlet::all()
37 32
                 ->transform(fn($outlet) => [

+ 13
- 8
app/Http/Controllers/TransactionController.php View File

@@ -3,7 +3,6 @@
3 3
 namespace App\Http\Controllers;
4 4
 
5 5
 use App\Http\Controllers\Controller;
6
-// use App\Http\Requests\Transaction\StoreTransactionRequest;
7 6
 use App\Http\Requests\Transaction\StoreTransactionRequest;
8 7
 use App\Http\Requests\Transaction\UpdateTransactionRequest;
9 8
 use App\Models\Customer;
@@ -12,6 +11,7 @@ use App\Models\Outlet;
12 11
 use App\Models\Transaction;
13 12
 use App\Models\TransactionStatus;
14 13
 use Exception;
14
+use FontLib\Table\Type\name;
15 15
 use Hoa\Socket\Client as SocketClient;
16 16
 use Hoa\Websocket\Client as WebsocketClient;
17 17
 use Illuminate\Database\QueryException;
@@ -43,7 +43,7 @@ class TransactionController extends Controller
43 43
                 ->through(fn($transaction) => [
44 44
                     'id' => $transaction->id,
45 45
                     'transactionNumber' => $transaction->transaction_number,
46
-                    'dateLaundry' => $transaction->created_at,
46
+                    'createdAt' => $transaction->created_at,
47 47
                     'customer' => [
48 48
                         'number' => $transaction->customer->customer_number,
49 49
                         'name' => $transaction->customer->name,
@@ -183,7 +183,7 @@ class TransactionController extends Controller
183 183
     /**
184 184
      * Display the specified resource.
185 185
      *
186
-     * @param  Int  $id
186
+     * @param  Transaction  $transaction
187 187
      * @return \Inertia\Response
188 188
      */
189 189
     public function show(Transaction $transaction)
@@ -197,6 +197,11 @@ class TransactionController extends Controller
197 197
                 'price' => $transaction->totalPriceAsFullString(),
198 198
                 'dateLaundry' => $transaction->created_at,
199 199
             ],
200
+            'user' => [
201
+                'name' => $transaction->user->name,
202
+                'phone' => $transaction->user->phone,
203
+                'email' => $transaction->user->email,
204
+            ],
200 205
             'customer' => [
201 206
                 'number' => $transaction->customer->customer_number,
202 207
                 'name' => $transaction->customer->name,
@@ -233,7 +238,7 @@ class TransactionController extends Controller
233 238
      * Update the specified resource in storage.
234 239
      *
235 240
      * @param  \Illuminate\Http\Request  $request
236
-     * @param  Int  $id
241
+     * @param  Transaction  $transaction
237 242
      * @return \Illuminate\Http\Response
238 243
      */
239 244
     public function update(UpdateTransactionRequest $request, Transaction $transaction)
@@ -241,16 +246,16 @@ class TransactionController extends Controller
241 246
         $transaction->update($request->validated());
242 247
 
243 248
         if ($transaction->transaction_status_id == 2) {
244
-            $status_message = " sudah diproses, harap menunggu sampai pemberitahuan selanjutnya.";
249
+            $statusMessage = " sudah diproses, harap menunggu sampai pemberitahuan selanjutnya.";
245 250
         } else if ($transaction->transaction_status_id == 3) {
246
-            $status_message = " sudah selesai, silahkan diambil.";
251
+            $statusMessage = " sudah selesai, silahkan diambil.";
247 252
         } else {
248
-            $status_message = " sudah diambil. Silahkan datang lagi di kemudian hari jika ingin laundry kembali, terima kasih.";
253
+            $statusMessage = " sudah diambil. Silahkan datang lagi di kemudian hari jika ingin laundry kembali, terima kasih.";
249 254
         }
250 255
 
251 256
         Http::post('https://gerbangchatapi.dijitalcode.com/chat/send?id=bambslaundry', [
252 257
             'receiver' => $transaction->customer->phone,
253
-            'message' => 'Layanan laundry Anda dengan nomor transaksi *' . $transaction->transaction_number . '*' . $status_message,
258
+            'message' => 'Layanan laundry Anda dengan nomor transaksi *' . $transaction->transaction_number . '*' . $statusMessage,
254 259
         ]);
255 260
 
256 261
         return back()->with('success', __('messages.success.update.transaction_status'));

+ 2
- 6
app/Http/Middleware/HandleInertiaRequests.php View File

@@ -38,18 +38,14 @@ class HandleInertiaRequests extends Middleware
38 38
     public function share(Request $request): array
39 39
     {
40 40
         return array_merge(parent::share($request), [
41
-            'auth' => function () use ($request) {
42
-                return [
43
-                    'user' => $request->user() ?? null,
44
-                ];
45
-            },
41
+            'auth.user' => fn() => $request->user() ? $request->user()->only('id', 'name', 'email') : null,
46 42
             'flash' => function () use ($request) {
47 43
                 return [
48 44
                     'success' => $request->session()->get('success'),
49 45
                     'error' => $request->session()->get('error'),
50 46
                 ];
51 47
             },
52
-            'isAdmin' => Auth::check() ? Auth::user()->hasRole('Admin') : null,
48
+            'isAdmin' => fn() => Auth::check() ? Auth::user()->hasRole('Admin') : null,
53 49
         ]);
54 50
     }
55 51
 }

+ 0
- 1
app/Models/Mutation.php View File

@@ -57,5 +57,4 @@ class Mutation extends Model
57 57
             $query->where('outlet_id', $outlet);
58 58
         });
59 59
     }
60
-
61 60
 }

+ 0
- 1
app/Models/Transaction.php View File

@@ -131,5 +131,4 @@ class Transaction extends Model
131 131
 
132 132
         return $this->setRupiahFormat($discount * $this->subTotal());
133 133
     }
134
-
135 134
 }

+ 0
- 1
app/Models/TransactionDetail.php View File

@@ -62,5 +62,4 @@ class TransactionDetail extends Model
62 62
     {
63 63
         return $this->setRupiahFormat($this->totalPrice(), 2, true);
64 64
     }
65
-
66 65
 }

+ 27
- 14
public/js/resources_js_pages_customer_Create_vue.js View File

@@ -15,12 +15,13 @@ __webpack_require__.r(__webpack_exports__);
15 15
 
16 16
 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
17 17
   props: {
18
-    icon: String,
19
-    label: String,
20 18
     inertiaLink: {
21 19
       type: Boolean,
22 20
       "default": true
23
-    }
21
+    },
22
+    icon: String,
23
+    label: String,
24
+    classButton: String
24 25
   },
25 26
   setup: function setup(__props, _ref) {
26 27
     var expose = _ref.expose;
@@ -590,14 +591,15 @@ var _hoisted_1 = {
590 591
   "class": "p-button-label"
591 592
 };
592 593
 var _hoisted_2 = {
593
-  key: 1,
594
-  "class": "p-button p-component"
594
+  key: 1
595 595
 };
596 596
 var _hoisted_3 = {
597 597
   key: 1,
598 598
   "class": "p-button-label"
599 599
 };
600 600
 function render(_ctx, _cache, $props, $setup, $data, $options) {
601
+  var _component_Button = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Button");
602
+
601 603
   return $props.inertiaLink ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["Link"], {
602 604
     key: 0,
603 605
     "class": "p-button p-component",
@@ -617,14 +619,25 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
617 619
     _: 1
618 620
     /* STABLE */
619 621
 
620
-  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
621
-    key: 0,
622
-    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
623
-  }, null, 2
624
-  /* CLASS */
625
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
626
-  /* TEXT */
627
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)]));
622
+  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Button, {
623
+    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)($props.classButton)
624
+  }, {
625
+    "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
626
+      return [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
627
+        key: 0,
628
+        "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
629
+      }, null, 2
630
+      /* CLASS */
631
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
632
+      /* TEXT */
633
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)];
634
+    }),
635
+    _: 1
636
+    /* STABLE */
637
+
638
+  }, 8
639
+  /* PROPS */
640
+  , ["class"])]));
628 641
 }
629 642
 
630 643
 /***/ }),
@@ -972,7 +985,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
972 985
       href: item.to,
973 986
       "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([item["class"], 'p-ripple', {
974 987
         'p-disabled': item.disabled,
975
-        'router-link-exact-active': _ctx.$page.component === item.component
988
+        'router-link-exact-active': _ctx.$page.component.startsWith(item.component) || _ctx.$page.url.startsWith(item.to)
976 989
       }]),
977 990
       style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)(item.style),
978 991
       target: item.target,

+ 27
- 14
public/js/resources_js_pages_customer_Edit_vue.js View File

@@ -15,12 +15,13 @@ __webpack_require__.r(__webpack_exports__);
15 15
 
16 16
 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
17 17
   props: {
18
-    icon: String,
19
-    label: String,
20 18
     inertiaLink: {
21 19
       type: Boolean,
22 20
       "default": true
23
-    }
21
+    },
22
+    icon: String,
23
+    label: String,
24
+    classButton: String
24 25
   },
25 26
   setup: function setup(__props, _ref) {
26 27
     var expose = _ref.expose;
@@ -659,14 +660,15 @@ var _hoisted_1 = {
659 660
   "class": "p-button-label"
660 661
 };
661 662
 var _hoisted_2 = {
662
-  key: 1,
663
-  "class": "p-button p-component"
663
+  key: 1
664 664
 };
665 665
 var _hoisted_3 = {
666 666
   key: 1,
667 667
   "class": "p-button-label"
668 668
 };
669 669
 function render(_ctx, _cache, $props, $setup, $data, $options) {
670
+  var _component_Button = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Button");
671
+
670 672
   return $props.inertiaLink ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["Link"], {
671 673
     key: 0,
672 674
     "class": "p-button p-component",
@@ -686,14 +688,25 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
686 688
     _: 1
687 689
     /* STABLE */
688 690
 
689
-  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
690
-    key: 0,
691
-    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
692
-  }, null, 2
693
-  /* CLASS */
694
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
695
-  /* TEXT */
696
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)]));
691
+  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Button, {
692
+    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)($props.classButton)
693
+  }, {
694
+    "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
695
+      return [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
696
+        key: 0,
697
+        "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
698
+      }, null, 2
699
+      /* CLASS */
700
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
701
+      /* TEXT */
702
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)];
703
+    }),
704
+    _: 1
705
+    /* STABLE */
706
+
707
+  }, 8
708
+  /* PROPS */
709
+  , ["class"])]));
697 710
 }
698 711
 
699 712
 /***/ }),
@@ -1120,7 +1133,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1120 1133
       href: item.to,
1121 1134
       "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([item["class"], 'p-ripple', {
1122 1135
         'p-disabled': item.disabled,
1123
-        'router-link-exact-active': _ctx.$page.component === item.component
1136
+        'router-link-exact-active': _ctx.$page.component.startsWith(item.component) || _ctx.$page.url.startsWith(item.to)
1124 1137
       }]),
1125 1138
       style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)(item.style),
1126 1139
       target: item.target,

+ 27
- 14
public/js/resources_js_pages_customer_Index_vue.js View File

@@ -15,12 +15,13 @@ __webpack_require__.r(__webpack_exports__);
15 15
 
16 16
 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
17 17
   props: {
18
-    icon: String,
19
-    label: String,
20 18
     inertiaLink: {
21 19
       type: Boolean,
22 20
       "default": true
23
-    }
21
+    },
22
+    icon: String,
23
+    label: String,
24
+    classButton: String
24 25
   },
25 26
   setup: function setup(__props, _ref) {
26 27
     var expose = _ref.expose;
@@ -477,14 +478,15 @@ var _hoisted_1 = {
477 478
   "class": "p-button-label"
478 479
 };
479 480
 var _hoisted_2 = {
480
-  key: 1,
481
-  "class": "p-button p-component"
481
+  key: 1
482 482
 };
483 483
 var _hoisted_3 = {
484 484
   key: 1,
485 485
   "class": "p-button-label"
486 486
 };
487 487
 function render(_ctx, _cache, $props, $setup, $data, $options) {
488
+  var _component_Button = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Button");
489
+
488 490
   return $props.inertiaLink ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["Link"], {
489 491
     key: 0,
490 492
     "class": "p-button p-component",
@@ -504,14 +506,25 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
504 506
     _: 1
505 507
     /* STABLE */
506 508
 
507
-  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
508
-    key: 0,
509
-    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
510
-  }, null, 2
511
-  /* CLASS */
512
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
513
-  /* TEXT */
514
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)]));
509
+  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Button, {
510
+    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)($props.classButton)
511
+  }, {
512
+    "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
513
+      return [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
514
+        key: 0,
515
+        "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
516
+      }, null, 2
517
+      /* CLASS */
518
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
519
+      /* TEXT */
520
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)];
521
+    }),
522
+    _: 1
523
+    /* STABLE */
524
+
525
+  }, 8
526
+  /* PROPS */
527
+  , ["class"])]));
515 528
 }
516 529
 
517 530
 /***/ }),
@@ -780,7 +793,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
780 793
       href: item.to,
781 794
       "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([item["class"], 'p-ripple', {
782 795
         'p-disabled': item.disabled,
783
-        'router-link-exact-active': _ctx.$page.component === item.component
796
+        'router-link-exact-active': _ctx.$page.component.startsWith(item.component) || _ctx.$page.url.startsWith(item.to)
784 797
       }]),
785 798
       style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)(item.style),
786 799
       target: item.target,

+ 27
- 14
public/js/resources_js_pages_expense_Create_vue.js View File

@@ -15,12 +15,13 @@ __webpack_require__.r(__webpack_exports__);
15 15
 
16 16
 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
17 17
   props: {
18
-    icon: String,
19
-    label: String,
20 18
     inertiaLink: {
21 19
       type: Boolean,
22 20
       "default": true
23
-    }
21
+    },
22
+    icon: String,
23
+    label: String,
24
+    classButton: String
24 25
   },
25 26
   setup: function setup(__props, _ref) {
26 27
     var expose = _ref.expose;
@@ -622,14 +623,15 @@ var _hoisted_1 = {
622 623
   "class": "p-button-label"
623 624
 };
624 625
 var _hoisted_2 = {
625
-  key: 1,
626
-  "class": "p-button p-component"
626
+  key: 1
627 627
 };
628 628
 var _hoisted_3 = {
629 629
   key: 1,
630 630
   "class": "p-button-label"
631 631
 };
632 632
 function render(_ctx, _cache, $props, $setup, $data, $options) {
633
+  var _component_Button = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Button");
634
+
633 635
   return $props.inertiaLink ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["Link"], {
634 636
     key: 0,
635 637
     "class": "p-button p-component",
@@ -649,14 +651,25 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
649 651
     _: 1
650 652
     /* STABLE */
651 653
 
652
-  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
653
-    key: 0,
654
-    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
655
-  }, null, 2
656
-  /* CLASS */
657
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
658
-  /* TEXT */
659
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)]));
654
+  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Button, {
655
+    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)($props.classButton)
656
+  }, {
657
+    "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
658
+      return [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
659
+        key: 0,
660
+        "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
661
+      }, null, 2
662
+      /* CLASS */
663
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
664
+      /* TEXT */
665
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)];
666
+    }),
667
+    _: 1
668
+    /* STABLE */
669
+
670
+  }, 8
671
+  /* PROPS */
672
+  , ["class"])]));
660 673
 }
661 674
 
662 675
 /***/ }),
@@ -995,7 +1008,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
995 1008
       href: item.to,
996 1009
       "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([item["class"], 'p-ripple', {
997 1010
         'p-disabled': item.disabled,
998
-        'router-link-exact-active': _ctx.$page.component === item.component
1011
+        'router-link-exact-active': _ctx.$page.component.startsWith(item.component) || _ctx.$page.url.startsWith(item.to)
999 1012
       }]),
1000 1013
       style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)(item.style),
1001 1014
       target: item.target,

+ 27
- 14
public/js/resources_js_pages_expense_Index_vue.js View File

@@ -15,12 +15,13 @@ __webpack_require__.r(__webpack_exports__);
15 15
 
16 16
 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
17 17
   props: {
18
-    icon: String,
19
-    label: String,
20 18
     inertiaLink: {
21 19
       type: Boolean,
22 20
       "default": true
23
-    }
21
+    },
22
+    icon: String,
23
+    label: String,
24
+    classButton: String
24 25
   },
25 26
   setup: function setup(__props, _ref) {
26 27
     var expose = _ref.expose;
@@ -515,14 +516,15 @@ var _hoisted_1 = {
515 516
   "class": "p-button-label"
516 517
 };
517 518
 var _hoisted_2 = {
518
-  key: 1,
519
-  "class": "p-button p-component"
519
+  key: 1
520 520
 };
521 521
 var _hoisted_3 = {
522 522
   key: 1,
523 523
   "class": "p-button-label"
524 524
 };
525 525
 function render(_ctx, _cache, $props, $setup, $data, $options) {
526
+  var _component_Button = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Button");
527
+
526 528
   return $props.inertiaLink ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["Link"], {
527 529
     key: 0,
528 530
     "class": "p-button p-component",
@@ -542,14 +544,25 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
542 544
     _: 1
543 545
     /* STABLE */
544 546
 
545
-  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
546
-    key: 0,
547
-    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
548
-  }, null, 2
549
-  /* CLASS */
550
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
551
-  /* TEXT */
552
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)]));
547
+  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Button, {
548
+    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)($props.classButton)
549
+  }, {
550
+    "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
551
+      return [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
552
+        key: 0,
553
+        "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
554
+      }, null, 2
555
+      /* CLASS */
556
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
557
+      /* TEXT */
558
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)];
559
+    }),
560
+    _: 1
561
+    /* STABLE */
562
+
563
+  }, 8
564
+  /* PROPS */
565
+  , ["class"])]));
553 566
 }
554 567
 
555 568
 /***/ }),
@@ -818,7 +831,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
818 831
       href: item.to,
819 832
       "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([item["class"], 'p-ripple', {
820 833
         'p-disabled': item.disabled,
821
-        'router-link-exact-active': _ctx.$page.component === item.component
834
+        'router-link-exact-active': _ctx.$page.component.startsWith(item.component) || _ctx.$page.url.startsWith(item.to)
822 835
       }]),
823 836
       style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)(item.style),
824 837
       target: item.target,

+ 1
- 1
public/js/resources_js_pages_expense_Show_vue.js View File

@@ -554,7 +554,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
554 554
       href: item.to,
555 555
       "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([item["class"], 'p-ripple', {
556 556
         'p-disabled': item.disabled,
557
-        'router-link-exact-active': _ctx.$page.component === item.component
557
+        'router-link-exact-active': _ctx.$page.component.startsWith(item.component) || _ctx.$page.url.startsWith(item.to)
558 558
       }]),
559 559
       style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)(item.style),
560 560
       target: item.target,

+ 27
- 14
public/js/resources_js_pages_laundry_Create_vue.js View File

@@ -15,12 +15,13 @@ __webpack_require__.r(__webpack_exports__);
15 15
 
16 16
 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
17 17
   props: {
18
-    icon: String,
19
-    label: String,
20 18
     inertiaLink: {
21 19
       type: Boolean,
22 20
       "default": true
23
-    }
21
+    },
22
+    icon: String,
23
+    label: String,
24
+    classButton: String
24 25
   },
25 26
   setup: function setup(__props, _ref) {
26 27
     var expose = _ref.expose;
@@ -627,14 +628,15 @@ var _hoisted_1 = {
627 628
   "class": "p-button-label"
628 629
 };
629 630
 var _hoisted_2 = {
630
-  key: 1,
631
-  "class": "p-button p-component"
631
+  key: 1
632 632
 };
633 633
 var _hoisted_3 = {
634 634
   key: 1,
635 635
   "class": "p-button-label"
636 636
 };
637 637
 function render(_ctx, _cache, $props, $setup, $data, $options) {
638
+  var _component_Button = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Button");
639
+
638 640
   return $props.inertiaLink ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["Link"], {
639 641
     key: 0,
640 642
     "class": "p-button p-component",
@@ -654,14 +656,25 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
654 656
     _: 1
655 657
     /* STABLE */
656 658
 
657
-  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
658
-    key: 0,
659
-    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
660
-  }, null, 2
661
-  /* CLASS */
662
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
663
-  /* TEXT */
664
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)]));
659
+  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Button, {
660
+    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)($props.classButton)
661
+  }, {
662
+    "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
663
+      return [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
664
+        key: 0,
665
+        "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
666
+      }, null, 2
667
+      /* CLASS */
668
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
669
+      /* TEXT */
670
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)];
671
+    }),
672
+    _: 1
673
+    /* STABLE */
674
+
675
+  }, 8
676
+  /* PROPS */
677
+  , ["class"])]));
665 678
 }
666 679
 
667 680
 /***/ }),
@@ -998,7 +1011,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
998 1011
       href: item.to,
999 1012
       "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([item["class"], 'p-ripple', {
1000 1013
         'p-disabled': item.disabled,
1001
-        'router-link-exact-active': _ctx.$page.component === item.component
1014
+        'router-link-exact-active': _ctx.$page.component.startsWith(item.component) || _ctx.$page.url.startsWith(item.to)
1002 1015
       }]),
1003 1016
       style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)(item.style),
1004 1017
       target: item.target,

+ 27
- 14
public/js/resources_js_pages_laundry_Edit_vue.js View File

@@ -15,12 +15,13 @@ __webpack_require__.r(__webpack_exports__);
15 15
 
16 16
 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
17 17
   props: {
18
-    icon: String,
19
-    label: String,
20 18
     inertiaLink: {
21 19
       type: Boolean,
22 20
       "default": true
23
-    }
21
+    },
22
+    icon: String,
23
+    label: String,
24
+    classButton: String
24 25
   },
25 26
   setup: function setup(__props, _ref) {
26 27
     var expose = _ref.expose;
@@ -701,14 +702,15 @@ var _hoisted_1 = {
701 702
   "class": "p-button-label"
702 703
 };
703 704
 var _hoisted_2 = {
704
-  key: 1,
705
-  "class": "p-button p-component"
705
+  key: 1
706 706
 };
707 707
 var _hoisted_3 = {
708 708
   key: 1,
709 709
   "class": "p-button-label"
710 710
 };
711 711
 function render(_ctx, _cache, $props, $setup, $data, $options) {
712
+  var _component_Button = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Button");
713
+
712 714
   return $props.inertiaLink ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["Link"], {
713 715
     key: 0,
714 716
     "class": "p-button p-component",
@@ -728,14 +730,25 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
728 730
     _: 1
729 731
     /* STABLE */
730 732
 
731
-  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
732
-    key: 0,
733
-    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
734
-  }, null, 2
735
-  /* CLASS */
736
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
737
-  /* TEXT */
738
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)]));
733
+  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Button, {
734
+    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)($props.classButton)
735
+  }, {
736
+    "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
737
+      return [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
738
+        key: 0,
739
+        "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
740
+      }, null, 2
741
+      /* CLASS */
742
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
743
+      /* TEXT */
744
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)];
745
+    }),
746
+    _: 1
747
+    /* STABLE */
748
+
749
+  }, 8
750
+  /* PROPS */
751
+  , ["class"])]));
739 752
 }
740 753
 
741 754
 /***/ }),
@@ -1151,7 +1164,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1151 1164
       href: item.to,
1152 1165
       "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([item["class"], 'p-ripple', {
1153 1166
         'p-disabled': item.disabled,
1154
-        'router-link-exact-active': _ctx.$page.component === item.component
1167
+        'router-link-exact-active': _ctx.$page.component.startsWith(item.component) || _ctx.$page.url.startsWith(item.to)
1155 1168
       }]),
1156 1169
       style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)(item.style),
1157 1170
       target: item.target,

+ 27
- 14
public/js/resources_js_pages_laundry_Index_vue.js View File

@@ -15,12 +15,13 @@ __webpack_require__.r(__webpack_exports__);
15 15
 
16 16
 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
17 17
   props: {
18
-    icon: String,
19
-    label: String,
20 18
     inertiaLink: {
21 19
       type: Boolean,
22 20
       "default": true
23
-    }
21
+    },
22
+    icon: String,
23
+    label: String,
24
+    classButton: String
24 25
   },
25 26
   setup: function setup(__props, _ref) {
26 27
     var expose = _ref.expose;
@@ -477,14 +478,15 @@ var _hoisted_1 = {
477 478
   "class": "p-button-label"
478 479
 };
479 480
 var _hoisted_2 = {
480
-  key: 1,
481
-  "class": "p-button p-component"
481
+  key: 1
482 482
 };
483 483
 var _hoisted_3 = {
484 484
   key: 1,
485 485
   "class": "p-button-label"
486 486
 };
487 487
 function render(_ctx, _cache, $props, $setup, $data, $options) {
488
+  var _component_Button = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Button");
489
+
488 490
   return $props.inertiaLink ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["Link"], {
489 491
     key: 0,
490 492
     "class": "p-button p-component",
@@ -504,14 +506,25 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
504 506
     _: 1
505 507
     /* STABLE */
506 508
 
507
-  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
508
-    key: 0,
509
-    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
510
-  }, null, 2
511
-  /* CLASS */
512
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
513
-  /* TEXT */
514
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)]));
509
+  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Button, {
510
+    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)($props.classButton)
511
+  }, {
512
+    "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
513
+      return [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
514
+        key: 0,
515
+        "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
516
+      }, null, 2
517
+      /* CLASS */
518
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
519
+      /* TEXT */
520
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)];
521
+    }),
522
+    _: 1
523
+    /* STABLE */
524
+
525
+  }, 8
526
+  /* PROPS */
527
+  , ["class"])]));
515 528
 }
516 529
 
517 530
 /***/ }),
@@ -780,7 +793,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
780 793
       href: item.to,
781 794
       "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([item["class"], 'p-ripple', {
782 795
         'p-disabled': item.disabled,
783
-        'router-link-exact-active': _ctx.$page.component === item.component
796
+        'router-link-exact-active': _ctx.$page.component.startsWith(item.component) || _ctx.$page.url.startsWith(item.to)
784 797
       }]),
785 798
       style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)(item.style),
786 799
       target: item.target,

+ 32
- 19
public/js/resources_js_pages_mutation_Report_vue.js View File

@@ -15,12 +15,13 @@ __webpack_require__.r(__webpack_exports__);
15 15
 
16 16
 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
17 17
   props: {
18
-    icon: String,
19
-    label: String,
20 18
     inertiaLink: {
21 19
       type: Boolean,
22 20
       "default": true
23
-    }
21
+    },
22
+    icon: String,
23
+    label: String,
24
+    classButton: String
24 25
   },
25 26
   setup: function setup(__props, _ref) {
26 27
     var expose = _ref.expose;
@@ -530,14 +531,15 @@ var _hoisted_1 = {
530 531
   "class": "p-button-label"
531 532
 };
532 533
 var _hoisted_2 = {
533
-  key: 1,
534
-  "class": "p-button p-component"
534
+  key: 1
535 535
 };
536 536
 var _hoisted_3 = {
537 537
   key: 1,
538 538
   "class": "p-button-label"
539 539
 };
540 540
 function render(_ctx, _cache, $props, $setup, $data, $options) {
541
+  var _component_Button = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Button");
542
+
541 543
   return $props.inertiaLink ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["Link"], {
542 544
     key: 0,
543 545
     "class": "p-button p-component",
@@ -557,14 +559,25 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
557 559
     _: 1
558 560
     /* STABLE */
559 561
 
560
-  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
561
-    key: 0,
562
-    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
563
-  }, null, 2
564
-  /* CLASS */
565
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
566
-  /* TEXT */
567
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)]));
562
+  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Button, {
563
+    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)($props.classButton)
564
+  }, {
565
+    "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
566
+      return [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
567
+        key: 0,
568
+        "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
569
+      }, null, 2
570
+      /* CLASS */
571
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
572
+      /* TEXT */
573
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)];
574
+    }),
575
+    _: 1
576
+    /* STABLE */
577
+
578
+  }, 8
579
+  /* PROPS */
580
+  , ["class"])]));
568 581
 }
569 582
 
570 583
 /***/ }),
@@ -833,7 +846,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
833 846
       href: item.to,
834 847
       "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([item["class"], 'p-ripple', {
835 848
         'p-disabled': item.disabled,
836
-        'router-link-exact-active': _ctx.$page.component === item.component
849
+        'router-link-exact-active': _ctx.$page.component.startsWith(item.component) || _ctx.$page.url.startsWith(item.to)
837 850
       }]),
838 851
       style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)(item.style),
839 852
       target: item.target,
@@ -1192,7 +1205,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1192 1205
           , ["modelValue", "options"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_7, [$props.mutations.data.length ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["AppButton"], {
1193 1206
             key: 0,
1194 1207
             label: "Export excel",
1195
-            "class": "p-button-text md:w-16rem",
1208
+            "class-button": "p-button-text md:w-16rem",
1196 1209
             icon: "pi pi-file-excel",
1197 1210
             "inertia-link": false,
1198 1211
             href: $setup.exportExcelLink
@@ -1261,14 +1274,14 @@ __webpack_require__.r(__webpack_exports__);
1261 1274
   field: 'createdAt',
1262 1275
   header: 'Tanggal'
1263 1276
 }, {
1264
-  field: 'outlet',
1265
-  header: 'Outlet'
1277
+  field: 'type',
1278
+  header: 'Tipe'
1266 1279
 }, {
1267 1280
   field: 'amount',
1268 1281
   header: 'Nilai'
1269 1282
 }, {
1270
-  field: 'type',
1271
-  header: 'Tipe'
1283
+  field: 'outlet',
1284
+  header: 'Outlet'
1272 1285
 }]);
1273 1286
 
1274 1287
 /***/ }),

+ 4
- 4
public/js/resources_js_pages_mutation_TableHeader_js.js View File

@@ -15,14 +15,14 @@ __webpack_require__.r(__webpack_exports__);
15 15
   field: 'createdAt',
16 16
   header: 'Tanggal'
17 17
 }, {
18
-  field: 'outlet',
19
-  header: 'Outlet'
18
+  field: 'type',
19
+  header: 'Tipe'
20 20
 }, {
21 21
   field: 'amount',
22 22
   header: 'Nilai'
23 23
 }, {
24
-  field: 'type',
25
-  header: 'Tipe'
24
+  field: 'outlet',
25
+  header: 'Outlet'
26 26
 }]);
27 27
 
28 28
 /***/ })

+ 27
- 14
public/js/resources_js_pages_outlet_Create_vue.js View File

@@ -15,12 +15,13 @@ __webpack_require__.r(__webpack_exports__);
15 15
 
16 16
 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
17 17
   props: {
18
-    icon: String,
19
-    label: String,
20 18
     inertiaLink: {
21 19
       type: Boolean,
22 20
       "default": true
23
-    }
21
+    },
22
+    icon: String,
23
+    label: String,
24
+    classButton: String
24 25
   },
25 26
   setup: function setup(__props, _ref) {
26 27
     var expose = _ref.expose;
@@ -498,14 +499,15 @@ var _hoisted_1 = {
498 499
   "class": "p-button-label"
499 500
 };
500 501
 var _hoisted_2 = {
501
-  key: 1,
502
-  "class": "p-button p-component"
502
+  key: 1
503 503
 };
504 504
 var _hoisted_3 = {
505 505
   key: 1,
506 506
   "class": "p-button-label"
507 507
 };
508 508
 function render(_ctx, _cache, $props, $setup, $data, $options) {
509
+  var _component_Button = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Button");
510
+
509 511
   return $props.inertiaLink ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["Link"], {
510 512
     key: 0,
511 513
     "class": "p-button p-component",
@@ -525,14 +527,25 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
525 527
     _: 1
526 528
     /* STABLE */
527 529
 
528
-  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
529
-    key: 0,
530
-    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
531
-  }, null, 2
532
-  /* CLASS */
533
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
534
-  /* TEXT */
535
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)]));
530
+  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Button, {
531
+    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)($props.classButton)
532
+  }, {
533
+    "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
534
+      return [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
535
+        key: 0,
536
+        "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
537
+      }, null, 2
538
+      /* CLASS */
539
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
540
+      /* TEXT */
541
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)];
542
+    }),
543
+    _: 1
544
+    /* STABLE */
545
+
546
+  }, 8
547
+  /* PROPS */
548
+  , ["class"])]));
536 549
 }
537 550
 
538 551
 /***/ }),
@@ -800,7 +813,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
800 813
       href: item.to,
801 814
       "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([item["class"], 'p-ripple', {
802 815
         'p-disabled': item.disabled,
803
-        'router-link-exact-active': _ctx.$page.component === item.component
816
+        'router-link-exact-active': _ctx.$page.component.startsWith(item.component) || _ctx.$page.url.startsWith(item.to)
804 817
       }]),
805 818
       style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)(item.style),
806 819
       target: item.target,

+ 27
- 14
public/js/resources_js_pages_outlet_Edit_vue.js View File

@@ -15,12 +15,13 @@ __webpack_require__.r(__webpack_exports__);
15 15
 
16 16
 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
17 17
   props: {
18
-    icon: String,
19
-    label: String,
20 18
     inertiaLink: {
21 19
       type: Boolean,
22 20
       "default": true
23
-    }
21
+    },
22
+    icon: String,
23
+    label: String,
24
+    classButton: String
24 25
   },
25 26
   setup: function setup(__props, _ref) {
26 27
     var expose = _ref.expose;
@@ -567,14 +568,15 @@ var _hoisted_1 = {
567 568
   "class": "p-button-label"
568 569
 };
569 570
 var _hoisted_2 = {
570
-  key: 1,
571
-  "class": "p-button p-component"
571
+  key: 1
572 572
 };
573 573
 var _hoisted_3 = {
574 574
   key: 1,
575 575
   "class": "p-button-label"
576 576
 };
577 577
 function render(_ctx, _cache, $props, $setup, $data, $options) {
578
+  var _component_Button = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Button");
579
+
578 580
   return $props.inertiaLink ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["Link"], {
579 581
     key: 0,
580 582
     "class": "p-button p-component",
@@ -594,14 +596,25 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
594 596
     _: 1
595 597
     /* STABLE */
596 598
 
597
-  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
598
-    key: 0,
599
-    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
600
-  }, null, 2
601
-  /* CLASS */
602
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
603
-  /* TEXT */
604
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)]));
599
+  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Button, {
600
+    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)($props.classButton)
601
+  }, {
602
+    "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
603
+      return [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
604
+        key: 0,
605
+        "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
606
+      }, null, 2
607
+      /* CLASS */
608
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
609
+      /* TEXT */
610
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)];
611
+    }),
612
+    _: 1
613
+    /* STABLE */
614
+
615
+  }, 8
616
+  /* PROPS */
617
+  , ["class"])]));
605 618
 }
606 619
 
607 620
 /***/ }),
@@ -948,7 +961,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
948 961
       href: item.to,
949 962
       "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([item["class"], 'p-ripple', {
950 963
         'p-disabled': item.disabled,
951
-        'router-link-exact-active': _ctx.$page.component === item.component
964
+        'router-link-exact-active': _ctx.$page.component.startsWith(item.component) || _ctx.$page.url.startsWith(item.to)
952 965
       }]),
953 966
       style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)(item.style),
954 967
       target: item.target,

+ 27
- 14
public/js/resources_js_pages_outlet_Index_vue.js View File

@@ -15,12 +15,13 @@ __webpack_require__.r(__webpack_exports__);
15 15
 
16 16
 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
17 17
   props: {
18
-    icon: String,
19
-    label: String,
20 18
     inertiaLink: {
21 19
       type: Boolean,
22 20
       "default": true
23
-    }
21
+    },
22
+    icon: String,
23
+    label: String,
24
+    classButton: String
24 25
   },
25 26
   setup: function setup(__props, _ref) {
26 27
     var expose = _ref.expose;
@@ -477,14 +478,15 @@ var _hoisted_1 = {
477 478
   "class": "p-button-label"
478 479
 };
479 480
 var _hoisted_2 = {
480
-  key: 1,
481
-  "class": "p-button p-component"
481
+  key: 1
482 482
 };
483 483
 var _hoisted_3 = {
484 484
   key: 1,
485 485
   "class": "p-button-label"
486 486
 };
487 487
 function render(_ctx, _cache, $props, $setup, $data, $options) {
488
+  var _component_Button = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Button");
489
+
488 490
   return $props.inertiaLink ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["Link"], {
489 491
     key: 0,
490 492
     "class": "p-button p-component",
@@ -504,14 +506,25 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
504 506
     _: 1
505 507
     /* STABLE */
506 508
 
507
-  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
508
-    key: 0,
509
-    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
510
-  }, null, 2
511
-  /* CLASS */
512
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
513
-  /* TEXT */
514
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)]));
509
+  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Button, {
510
+    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)($props.classButton)
511
+  }, {
512
+    "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
513
+      return [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
514
+        key: 0,
515
+        "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
516
+      }, null, 2
517
+      /* CLASS */
518
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
519
+      /* TEXT */
520
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)];
521
+    }),
522
+    _: 1
523
+    /* STABLE */
524
+
525
+  }, 8
526
+  /* PROPS */
527
+  , ["class"])]));
515 528
 }
516 529
 
517 530
 /***/ }),
@@ -780,7 +793,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
780 793
       href: item.to,
781 794
       "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([item["class"], 'p-ripple', {
782 795
         'p-disabled': item.disabled,
783
-        'router-link-exact-active': _ctx.$page.component === item.component
796
+        'router-link-exact-active': _ctx.$page.component.startsWith(item.component) || _ctx.$page.url.startsWith(item.to)
784 797
       }]),
785 798
       style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)(item.style),
786 799
       target: item.target,

+ 36
- 29
public/js/resources_js_pages_transaction_Create_vue.js View File

@@ -90,12 +90,13 @@ __webpack_require__.r(__webpack_exports__);
90 90
 
91 91
 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
92 92
   props: {
93
-    icon: String,
94
-    label: String,
95 93
     inertiaLink: {
96 94
       type: Boolean,
97 95
       "default": true
98
-    }
96
+    },
97
+    icon: String,
98
+    label: String,
99
+    classButton: String
99 100
   },
100 101
   setup: function setup(__props, _ref) {
101 102
     var expose = _ref.expose;
@@ -1039,14 +1040,15 @@ var _hoisted_1 = {
1039 1040
   "class": "p-button-label"
1040 1041
 };
1041 1042
 var _hoisted_2 = {
1042
-  key: 1,
1043
-  "class": "p-button p-component"
1043
+  key: 1
1044 1044
 };
1045 1045
 var _hoisted_3 = {
1046 1046
   key: 1,
1047 1047
   "class": "p-button-label"
1048 1048
 };
1049 1049
 function render(_ctx, _cache, $props, $setup, $data, $options) {
1050
+  var _component_Button = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Button");
1051
+
1050 1052
   return $props.inertiaLink ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["Link"], {
1051 1053
     key: 0,
1052 1054
     "class": "p-button p-component",
@@ -1066,14 +1068,25 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1066 1068
     _: 1
1067 1069
     /* STABLE */
1068 1070
 
1069
-  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
1070
-    key: 0,
1071
-    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
1072
-  }, null, 2
1073
-  /* CLASS */
1074
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
1075
-  /* TEXT */
1076
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)]));
1071
+  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Button, {
1072
+    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)($props.classButton)
1073
+  }, {
1074
+    "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
1075
+      return [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
1076
+        key: 0,
1077
+        "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
1078
+      }, null, 2
1079
+      /* CLASS */
1080
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
1081
+      /* TEXT */
1082
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)];
1083
+    }),
1084
+    _: 1
1085
+    /* STABLE */
1086
+
1087
+  }, 8
1088
+  /* PROPS */
1089
+  , ["class"])]));
1077 1090
 }
1078 1091
 
1079 1092
 /***/ }),
@@ -1490,7 +1503,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1490 1503
       href: item.to,
1491 1504
       "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([item["class"], 'p-ripple', {
1492 1505
         'p-disabled': item.disabled,
1493
-        'router-link-exact-active': _ctx.$page.component === item.component
1506
+        'router-link-exact-active': _ctx.$page.component.startsWith(item.component) || _ctx.$page.url.startsWith(item.to)
1494 1507
       }]),
1495 1508
       style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)(item.style),
1496 1509
       target: item.target,
@@ -2261,12 +2274,12 @@ var IndexTable = [{
2261 2274
 }, {
2262 2275
   field: 'price',
2263 2276
   header: 'Total Harga'
2264
-}, {
2265
-  field: 'outlet',
2266
-  header: 'Outlet'
2267 2277
 }, {
2268 2278
   field: 'transactionStatusName',
2269 2279
   header: 'Status'
2280
+}, {
2281
+  field: 'outlet',
2282
+  header: 'Outlet'
2270 2283
 }];
2271 2284
 var TransactionBasketTable = [{
2272 2285
   field: 'laundry',
@@ -2285,20 +2298,14 @@ var TransactionBasketTable = [{
2285 2298
   header: 'Total Harga'
2286 2299
 }];
2287 2300
 var TransactionReportTable = [{
2288
-  field: 'transactionNumber',
2289
-  header: 'Id Transaksi'
2301
+  field: 'createdAt',
2302
+  header: 'Tanggal'
2290 2303
 }, {
2291
-  field: 'price',
2292
-  header: 'Total Harga'
2304
+  field: 'numberOfTransaction',
2305
+  header: 'Jumlah Transaksi'
2293 2306
 }, {
2294
-  field: 'outlet',
2295
-  header: 'Outlet'
2296
-}, {
2297
-  field: 'transactionStatusName',
2298
-  header: 'Status'
2299
-}, {
2300
-  field: 'user',
2301
-  header: 'User'
2307
+  field: 'price',
2308
+  header: 'Total Nilai'
2302 2309
 }];
2303 2310
 
2304 2311
 /***/ }),

+ 37
- 30
public/js/resources_js_pages_transaction_Index_vue.js View File

@@ -15,12 +15,13 @@ __webpack_require__.r(__webpack_exports__);
15 15
 
16 16
 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
17 17
   props: {
18
-    icon: String,
19
-    label: String,
20 18
     inertiaLink: {
21 19
       type: Boolean,
22 20
       "default": true
23
-    }
21
+    },
22
+    icon: String,
23
+    label: String,
24
+    classButton: String
24 25
   },
25 26
   setup: function setup(__props, _ref) {
26 27
     var expose = _ref.expose;
@@ -963,14 +964,15 @@ var _hoisted_1 = {
963 964
   "class": "p-button-label"
964 965
 };
965 966
 var _hoisted_2 = {
966
-  key: 1,
967
-  "class": "p-button p-component"
967
+  key: 1
968 968
 };
969 969
 var _hoisted_3 = {
970 970
   key: 1,
971 971
   "class": "p-button-label"
972 972
 };
973 973
 function render(_ctx, _cache, $props, $setup, $data, $options) {
974
+  var _component_Button = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Button");
975
+
974 976
   return $props.inertiaLink ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["Link"], {
975 977
     key: 0,
976 978
     "class": "p-button p-component",
@@ -990,14 +992,25 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
990 992
     _: 1
991 993
     /* STABLE */
992 994
 
993
-  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
994
-    key: 0,
995
-    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
996
-  }, null, 2
997
-  /* CLASS */
998
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
999
-  /* TEXT */
1000
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)]));
995
+  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Button, {
996
+    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)($props.classButton)
997
+  }, {
998
+    "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
999
+      return [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
1000
+        key: 0,
1001
+        "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
1002
+      }, null, 2
1003
+      /* CLASS */
1004
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
1005
+      /* TEXT */
1006
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)];
1007
+    }),
1008
+    _: 1
1009
+    /* STABLE */
1010
+
1011
+  }, 8
1012
+  /* PROPS */
1013
+  , ["class"])]));
1001 1014
 }
1002 1015
 
1003 1016
 /***/ }),
@@ -1548,7 +1561,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1548 1561
       href: item.to,
1549 1562
       "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([item["class"], 'p-ripple', {
1550 1563
         'p-disabled': item.disabled,
1551
-        'router-link-exact-active': _ctx.$page.component === item.component
1564
+        'router-link-exact-active': _ctx.$page.component.startsWith(item.component) || _ctx.$page.url.startsWith(item.to)
1552 1565
       }]),
1553 1566
       style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)(item.style),
1554 1567
       target: item.target,
@@ -1962,7 +1975,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1962 1975
                   key: 0
1963 1976
                 }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_9, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(data[field]), 1
1964 1977
                 /* TEXT */
1965
-                ), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(data.dateLaundry), 1
1978
+                ), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(data.createdAt), 1
1966 1979
                 /* TEXT */
1967 1980
                 )], 64
1968 1981
                 /* STABLE_FRAGMENT */
@@ -2127,12 +2140,12 @@ var IndexTable = [{
2127 2140
 }, {
2128 2141
   field: 'price',
2129 2142
   header: 'Total Harga'
2130
-}, {
2131
-  field: 'outlet',
2132
-  header: 'Outlet'
2133 2143
 }, {
2134 2144
   field: 'transactionStatusName',
2135 2145
   header: 'Status'
2146
+}, {
2147
+  field: 'outlet',
2148
+  header: 'Outlet'
2136 2149
 }];
2137 2150
 var TransactionBasketTable = [{
2138 2151
   field: 'laundry',
@@ -2151,20 +2164,14 @@ var TransactionBasketTable = [{
2151 2164
   header: 'Total Harga'
2152 2165
 }];
2153 2166
 var TransactionReportTable = [{
2154
-  field: 'transactionNumber',
2155
-  header: 'Id Transaksi'
2167
+  field: 'createdAt',
2168
+  header: 'Tanggal'
2156 2169
 }, {
2157
-  field: 'price',
2158
-  header: 'Total Harga'
2170
+  field: 'numberOfTransaction',
2171
+  header: 'Jumlah Transaksi'
2159 2172
 }, {
2160
-  field: 'outlet',
2161
-  header: 'Outlet'
2162
-}, {
2163
-  field: 'transactionStatusName',
2164
-  header: 'Status'
2165
-}, {
2166
-  field: 'user',
2167
-  header: 'User'
2173
+  field: 'price',
2174
+  header: 'Total Nilai'
2168 2175
 }];
2169 2176
 
2170 2177
 /***/ }),

+ 42
- 90
public/js/resources_js_pages_transaction_Report_vue.js View File

@@ -15,12 +15,13 @@ __webpack_require__.r(__webpack_exports__);
15 15
 
16 16
 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
17 17
   props: {
18
-    icon: String,
19
-    label: String,
20 18
     inertiaLink: {
21 19
       type: Boolean,
22 20
       "default": true
23
-    }
21
+    },
22
+    icon: String,
23
+    label: String,
24
+    classButton: String
24 25
   },
25 26
   setup: function setup(__props, _ref) {
26 27
     var expose = _ref.expose;
@@ -467,11 +468,6 @@ __webpack_require__.r(__webpack_exports__);
467 468
       var params = window.location.search;
468 469
       exportExcelLink.value = "/reports/transactions/export/excel".concat(params);
469 470
     }, 300));
470
-
471
-    var linkReference = function linkReference(data) {
472
-      return route('transactions.show', data.id);
473
-    };
474
-
475 471
     var exportExcelLink = (0,vue__WEBPACK_IMPORTED_MODULE_1__.ref)('/reports/transactions/export/excel');
476 472
     var isAdmin = (0,vue__WEBPACK_IMPORTED_MODULE_1__.computed)(function () {
477 473
       return (0,_inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_2__.usePage)().props.value.isAdmin;
@@ -479,7 +475,6 @@ __webpack_require__.r(__webpack_exports__);
479 475
     var __returned__ = {
480 476
       props: props,
481 477
       filterForm: filterForm,
482
-      linkReference: linkReference,
483 478
       exportExcelLink: exportExcelLink,
484 479
       isAdmin: isAdmin,
485 480
       Inertia: _inertiajs_inertia__WEBPACK_IMPORTED_MODULE_0__.Inertia,
@@ -526,14 +521,15 @@ var _hoisted_1 = {
526 521
   "class": "p-button-label"
527 522
 };
528 523
 var _hoisted_2 = {
529
-  key: 1,
530
-  "class": "p-button p-component"
524
+  key: 1
531 525
 };
532 526
 var _hoisted_3 = {
533 527
   key: 1,
534 528
   "class": "p-button-label"
535 529
 };
536 530
 function render(_ctx, _cache, $props, $setup, $data, $options) {
531
+  var _component_Button = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Button");
532
+
537 533
   return $props.inertiaLink ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["Link"], {
538 534
     key: 0,
539 535
     "class": "p-button p-component",
@@ -553,14 +549,25 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
553 549
     _: 1
554 550
     /* STABLE */
555 551
 
556
-  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
557
-    key: 0,
558
-    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
559
-  }, null, 2
560
-  /* CLASS */
561
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
562
-  /* TEXT */
563
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)]));
552
+  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Button, {
553
+    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)($props.classButton)
554
+  }, {
555
+    "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
556
+      return [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
557
+        key: 0,
558
+        "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
559
+      }, null, 2
560
+      /* CLASS */
561
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
562
+      /* TEXT */
563
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)];
564
+    }),
565
+    _: 1
566
+    /* STABLE */
567
+
568
+  }, 8
569
+  /* PROPS */
570
+  , ["class"])]));
564 571
 }
565 572
 
566 573
 /***/ }),
@@ -829,7 +836,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
829 836
       href: item.to,
830 837
       "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([item["class"], 'p-ripple', {
831 838
         'p-disabled': item.disabled,
832
-        'router-link-exact-active': _ctx.$page.component === item.component
839
+        'router-link-exact-active': _ctx.$page.component.startsWith(item.component) || _ctx.$page.url.startsWith(item.to)
833 840
       }]),
834 841
       style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)(item.style),
835 842
       target: item.target,
@@ -1138,16 +1145,11 @@ var _hoisted_6 = {
1138 1145
 var _hoisted_7 = {
1139 1146
   "class": "col-12 md:col-4 flex justify-content-end"
1140 1147
 };
1141
-var _hoisted_8 = {
1142
-  "class": "font-bold"
1143
-};
1144 1148
 function render(_ctx, _cache, $props, $setup, $data, $options) {
1145 1149
   var _component_Calendar = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Calendar");
1146 1150
 
1147 1151
   var _component_Dropdown = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Dropdown");
1148 1152
 
1149
-  var _component_Badge = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Badge");
1150
-
1151 1153
   var _component_Column = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Column");
1152 1154
 
1153 1155
   var _component_DataTable = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("DataTable");
@@ -1193,7 +1195,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1193 1195
           , ["modelValue", "options"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_7, [$props.transactions.data.length ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["AppButton"], {
1194 1196
             key: 0,
1195 1197
             label: "Export excel",
1196
-            "class": "p-button-text md:w-16rem",
1198
+            "class-button": "p-button-text md:w-16rem",
1197 1199
             icon: "pi pi-file-excel",
1198 1200
             "inertia-link": false,
1199 1201
             href: $setup.exportExcelLink
@@ -1207,62 +1209,18 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1207 1209
               field: tableHeader.field,
1208 1210
               header: tableHeader.header,
1209 1211
               key: tableHeader.field
1210
-            }, {
1211
-              body: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function (_ref) {
1212
-                var data = _ref.data,
1213
-                    field = _ref.field;
1214
-                return [field === 'transactionNumber' ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
1215
-                  key: 0
1216
-                }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", _hoisted_8, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(data[field]), 1
1217
-                /* TEXT */
1218
-                ), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(data.createdAt), 1
1219
-                /* TEXT */
1220
-                )], 64
1221
-                /* STABLE_FRAGMENT */
1222
-                )) : field === 'transactionStatusName' ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
1223
-                  key: 1
1224
-                }, [data['transactionStatusId'] === 1 ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_Badge, {
1225
-                  key: 0,
1226
-                  value: data[field]
1227
-                }, null, 8
1228
-                /* PROPS */
1229
-                , ["value"])) : data['transactionStatusId'] === 2 ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_Badge, {
1230
-                  key: 1,
1231
-                  value: data[field],
1232
-                  severity: "warning"
1233
-                }, null, 8
1234
-                /* PROPS */
1235
-                , ["value"])) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_Badge, {
1236
-                  key: 2,
1237
-                  value: data[field],
1238
-                  severity: "success"
1239
-                }, null, 8
1240
-                /* PROPS */
1241
-                , ["value"]))], 2112
1242
-                /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
1243
-                )) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
1244
-                  key: 2
1245
-                }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(data[field]), 1
1246
-                /* TEXT */
1247
-                )], 2112
1248
-                /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
1249
-                ))];
1250
-              }),
1251
-              _: 2
1252
-              /* DYNAMIC */
1253
-
1254
-            }, 1032
1255
-            /* PROPS, DYNAMIC_SLOTS */
1212
+            }, null, 8
1213
+            /* PROPS */
1256 1214
             , ["field", "header"]);
1257 1215
           }), 128
1258 1216
           /* KEYED_FRAGMENT */
1259 1217
           )), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Column, null, {
1260
-            body: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function (_ref2) {
1261
-              var data = _ref2.data;
1218
+            body: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function (_ref) {
1219
+              var data = _ref.data;
1262 1220
               return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["AppButton"], {
1263 1221
                 icon: "pi pi-link",
1264 1222
                 "class": "p-button-text p-button-icon-only p-button-rounded p-button-text",
1265
-                href: $setup.linkReference(data)
1223
+                href: "/transactions?startDate=".concat(data.startDate, "&endDate=").concat(data.startDate)
1266 1224
               }, null, 8
1267 1225
               /* PROPS */
1268 1226
               , ["href"])];
@@ -1313,12 +1271,12 @@ var IndexTable = [{
1313 1271
 }, {
1314 1272
   field: 'price',
1315 1273
   header: 'Total Harga'
1316
-}, {
1317
-  field: 'outlet',
1318
-  header: 'Outlet'
1319 1274
 }, {
1320 1275
   field: 'transactionStatusName',
1321 1276
   header: 'Status'
1277
+}, {
1278
+  field: 'outlet',
1279
+  header: 'Outlet'
1322 1280
 }];
1323 1281
 var TransactionBasketTable = [{
1324 1282
   field: 'laundry',
@@ -1337,20 +1295,14 @@ var TransactionBasketTable = [{
1337 1295
   header: 'Total Harga'
1338 1296
 }];
1339 1297
 var TransactionReportTable = [{
1340
-  field: 'transactionNumber',
1341
-  header: 'Id Transaksi'
1342
-}, {
1343
-  field: 'price',
1344
-  header: 'Total Harga'
1298
+  field: 'createdAt',
1299
+  header: 'Tanggal'
1345 1300
 }, {
1346
-  field: 'outlet',
1347
-  header: 'Outlet'
1348
-}, {
1349
-  field: 'transactionStatusName',
1350
-  header: 'Status'
1301
+  field: 'numberOfTransaction',
1302
+  header: 'Jumlah Transaksi'
1351 1303
 }, {
1352
-  field: 'user',
1353
-  header: 'User'
1304
+  field: 'price',
1305
+  header: 'Total Nilai'
1354 1306
 }];
1355 1307
 
1356 1308
 /***/ }),

+ 14
- 19
public/js/resources_js_pages_transaction_Show_vue.js View File

@@ -328,6 +328,7 @@ __webpack_require__.r(__webpack_exports__);
328 328
 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
329 329
   props: {
330 330
     transaction: Object,
331
+    user: Object,
331 332
     customer: Object,
332 333
     outlet: Object,
333 334
     transactionDetails: Object
@@ -560,7 +561,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
560 561
       href: item.to,
561 562
       "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([item["class"], 'p-ripple', {
562 563
         'p-disabled': item.disabled,
563
-        'router-link-exact-active': _ctx.$page.component === item.component
564
+        'router-link-exact-active': _ctx.$page.component.startsWith(item.component) || _ctx.$page.url.startsWith(item.to)
564 565
       }]),
565 566
       style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)(item.style),
566 567
       target: item.target,
@@ -1075,11 +1076,11 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1075 1076
           )]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Divider, {
1076 1077
             type: "dashed",
1077 1078
             "class": "block md:hidden"
1078
-          }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_23, [_hoisted_24, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.$page.props.auth.user.name), 1
1079
+          }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_23, [_hoisted_24, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.user.name), 1
1079 1080
           /* TEXT */
1080
-          ), _hoisted_25, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.$page.props.auth.user.phone), 1
1081
+          ), _hoisted_25, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.user.phone), 1
1081 1082
           /* TEXT */
1082
-          ), _hoisted_26, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.$page.props.auth.user.email), 1
1083
+          ), _hoisted_26, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("p", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.user.email), 1
1083 1084
           /* TEXT */
1084 1085
           )]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Divider, {
1085 1086
             type: "dashed",
@@ -1185,12 +1186,12 @@ var IndexTable = [{
1185 1186
 }, {
1186 1187
   field: 'price',
1187 1188
   header: 'Total Harga'
1188
-}, {
1189
-  field: 'outlet',
1190
-  header: 'Outlet'
1191 1189
 }, {
1192 1190
   field: 'transactionStatusName',
1193 1191
   header: 'Status'
1192
+}, {
1193
+  field: 'outlet',
1194
+  header: 'Outlet'
1194 1195
 }];
1195 1196
 var TransactionBasketTable = [{
1196 1197
   field: 'laundry',
@@ -1209,20 +1210,14 @@ var TransactionBasketTable = [{
1209 1210
   header: 'Total Harga'
1210 1211
 }];
1211 1212
 var TransactionReportTable = [{
1212
-  field: 'transactionNumber',
1213
-  header: 'Id Transaksi'
1213
+  field: 'createdAt',
1214
+  header: 'Tanggal'
1214 1215
 }, {
1215
-  field: 'price',
1216
-  header: 'Total Harga'
1217
-}, {
1218
-  field: 'outlet',
1219
-  header: 'Outlet'
1216
+  field: 'numberOfTransaction',
1217
+  header: 'Jumlah Transaksi'
1220 1218
 }, {
1221
-  field: 'transactionStatusName',
1222
-  header: 'Status'
1223
-}, {
1224
-  field: 'user',
1225
-  header: 'User'
1219
+  field: 'price',
1220
+  header: 'Total Nilai'
1226 1221
 }];
1227 1222
 
1228 1223
 /***/ }),

+ 9
- 15
public/js/resources_js_pages_transaction_TableHeader_js.js View File

@@ -22,12 +22,12 @@ var IndexTable = [{
22 22
 }, {
23 23
   field: 'price',
24 24
   header: 'Total Harga'
25
-}, {
26
-  field: 'outlet',
27
-  header: 'Outlet'
28 25
 }, {
29 26
   field: 'transactionStatusName',
30 27
   header: 'Status'
28
+}, {
29
+  field: 'outlet',
30
+  header: 'Outlet'
31 31
 }];
32 32
 var TransactionBasketTable = [{
33 33
   field: 'laundry',
@@ -46,20 +46,14 @@ var TransactionBasketTable = [{
46 46
   header: 'Total Harga'
47 47
 }];
48 48
 var TransactionReportTable = [{
49
-  field: 'transactionNumber',
50
-  header: 'Id Transaksi'
49
+  field: 'createdAt',
50
+  header: 'Tanggal'
51 51
 }, {
52
-  field: 'price',
53
-  header: 'Total Harga'
54
-}, {
55
-  field: 'outlet',
56
-  header: 'Outlet'
52
+  field: 'numberOfTransaction',
53
+  header: 'Jumlah Transaksi'
57 54
 }, {
58
-  field: 'transactionStatusName',
59
-  header: 'Status'
60
-}, {
61
-  field: 'user',
62
-  header: 'User'
55
+  field: 'price',
56
+  header: 'Total Nilai'
63 57
 }];
64 58
 
65 59
 /***/ })

+ 27
- 14
public/js/resources_js_pages_user_Create_vue.js View File

@@ -15,12 +15,13 @@ __webpack_require__.r(__webpack_exports__);
15 15
 
16 16
 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
17 17
   props: {
18
-    icon: String,
19
-    label: String,
20 18
     inertiaLink: {
21 19
       type: Boolean,
22 20
       "default": true
23
-    }
21
+    },
22
+    icon: String,
23
+    label: String,
24
+    classButton: String
24 25
   },
25 26
   setup: function setup(__props, _ref) {
26 27
     var expose = _ref.expose;
@@ -591,14 +592,15 @@ var _hoisted_1 = {
591 592
   "class": "p-button-label"
592 593
 };
593 594
 var _hoisted_2 = {
594
-  key: 1,
595
-  "class": "p-button p-component"
595
+  key: 1
596 596
 };
597 597
 var _hoisted_3 = {
598 598
   key: 1,
599 599
   "class": "p-button-label"
600 600
 };
601 601
 function render(_ctx, _cache, $props, $setup, $data, $options) {
602
+  var _component_Button = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Button");
603
+
602 604
   return $props.inertiaLink ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["Link"], {
603 605
     key: 0,
604 606
     "class": "p-button p-component",
@@ -618,14 +620,25 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
618 620
     _: 1
619 621
     /* STABLE */
620 622
 
621
-  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
622
-    key: 0,
623
-    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
624
-  }, null, 2
625
-  /* CLASS */
626
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
627
-  /* TEXT */
628
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)]));
623
+  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Button, {
624
+    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)($props.classButton)
625
+  }, {
626
+    "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
627
+      return [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
628
+        key: 0,
629
+        "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
630
+      }, null, 2
631
+      /* CLASS */
632
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
633
+      /* TEXT */
634
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)];
635
+    }),
636
+    _: 1
637
+    /* STABLE */
638
+
639
+  }, 8
640
+  /* PROPS */
641
+  , ["class"])]));
629 642
 }
630 643
 
631 644
 /***/ }),
@@ -973,7 +986,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
973 986
       href: item.to,
974 987
       "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([item["class"], 'p-ripple', {
975 988
         'p-disabled': item.disabled,
976
-        'router-link-exact-active': _ctx.$page.component === item.component
989
+        'router-link-exact-active': _ctx.$page.component.startsWith(item.component) || _ctx.$page.url.startsWith(item.to)
977 990
       }]),
978 991
       style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)(item.style),
979 992
       target: item.target,

+ 27
- 14
public/js/resources_js_pages_user_Edit_vue.js View File

@@ -15,12 +15,13 @@ __webpack_require__.r(__webpack_exports__);
15 15
 
16 16
 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
17 17
   props: {
18
-    icon: String,
19
-    label: String,
20 18
     inertiaLink: {
21 19
       type: Boolean,
22 20
       "default": true
23
-    }
21
+    },
22
+    icon: String,
23
+    label: String,
24
+    classButton: String
24 25
   },
25 26
   setup: function setup(__props, _ref) {
26 27
     var expose = _ref.expose;
@@ -663,14 +664,15 @@ var _hoisted_1 = {
663 664
   "class": "p-button-label"
664 665
 };
665 666
 var _hoisted_2 = {
666
-  key: 1,
667
-  "class": "p-button p-component"
667
+  key: 1
668 668
 };
669 669
 var _hoisted_3 = {
670 670
   key: 1,
671 671
   "class": "p-button-label"
672 672
 };
673 673
 function render(_ctx, _cache, $props, $setup, $data, $options) {
674
+  var _component_Button = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Button");
675
+
674 676
   return $props.inertiaLink ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["Link"], {
675 677
     key: 0,
676 678
     "class": "p-button p-component",
@@ -690,14 +692,25 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
690 692
     _: 1
691 693
     /* STABLE */
692 694
 
693
-  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
694
-    key: 0,
695
-    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
696
-  }, null, 2
697
-  /* CLASS */
698
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
699
-  /* TEXT */
700
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)]));
695
+  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Button, {
696
+    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)($props.classButton)
697
+  }, {
698
+    "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
699
+      return [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
700
+        key: 0,
701
+        "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
702
+      }, null, 2
703
+      /* CLASS */
704
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
705
+      /* TEXT */
706
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)];
707
+    }),
708
+    _: 1
709
+    /* STABLE */
710
+
711
+  }, 8
712
+  /* PROPS */
713
+  , ["class"])]));
701 714
 }
702 715
 
703 716
 /***/ }),
@@ -1124,7 +1137,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
1124 1137
       href: item.to,
1125 1138
       "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([item["class"], 'p-ripple', {
1126 1139
         'p-disabled': item.disabled,
1127
-        'router-link-exact-active': _ctx.$page.component === item.component
1140
+        'router-link-exact-active': _ctx.$page.component.startsWith(item.component) || _ctx.$page.url.startsWith(item.to)
1128 1141
       }]),
1129 1142
       style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)(item.style),
1130 1143
       target: item.target,

+ 27
- 14
public/js/resources_js_pages_user_Index_vue.js View File

@@ -15,12 +15,13 @@ __webpack_require__.r(__webpack_exports__);
15 15
 
16 16
 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
17 17
   props: {
18
-    icon: String,
19
-    label: String,
20 18
     inertiaLink: {
21 19
       type: Boolean,
22 20
       "default": true
23
-    }
21
+    },
22
+    icon: String,
23
+    label: String,
24
+    classButton: String
24 25
   },
25 26
   setup: function setup(__props, _ref) {
26 27
     var expose = _ref.expose;
@@ -477,14 +478,15 @@ var _hoisted_1 = {
477 478
   "class": "p-button-label"
478 479
 };
479 480
 var _hoisted_2 = {
480
-  key: 1,
481
-  "class": "p-button p-component"
481
+  key: 1
482 482
 };
483 483
 var _hoisted_3 = {
484 484
   key: 1,
485 485
   "class": "p-button-label"
486 486
 };
487 487
 function render(_ctx, _cache, $props, $setup, $data, $options) {
488
+  var _component_Button = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Button");
489
+
488 490
   return $props.inertiaLink ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)($setup["Link"], {
489 491
     key: 0,
490 492
     "class": "p-button p-component",
@@ -504,14 +506,25 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
504 506
     _: 1
505 507
     /* STABLE */
506 508
 
507
-  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
508
-    key: 0,
509
-    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
510
-  }, null, 2
511
-  /* CLASS */
512
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
513
-  /* TEXT */
514
-  )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)]));
509
+  })) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Button, {
510
+    "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)($props.classButton)
511
+  }, {
512
+    "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
513
+      return [$props.icon ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", {
514
+        key: 0,
515
+        "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(["p-button-icon p-button-icon-left", $props.icon])
516
+      }, null, 2
517
+      /* CLASS */
518
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true), $props.label ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("span", _hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.label), 1
519
+      /* TEXT */
520
+      )) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)];
521
+    }),
522
+    _: 1
523
+    /* STABLE */
524
+
525
+  }, 8
526
+  /* PROPS */
527
+  , ["class"])]));
515 528
 }
516 529
 
517 530
 /***/ }),
@@ -780,7 +793,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
780 793
       href: item.to,
781 794
       "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([item["class"], 'p-ripple', {
782 795
         'p-disabled': item.disabled,
783
-        'router-link-exact-active': _ctx.$page.component === item.component
796
+        'router-link-exact-active': _ctx.$page.component.startsWith(item.component) || _ctx.$page.url.startsWith(item.to)
784 797
       }]),
785 798
       style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)(item.style),
786 799
       target: item.target,

+ 1
- 1
public/js/resources_js_pages_user_Show_vue.js View File

@@ -556,7 +556,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
556 556
       href: item.to,
557 557
       "class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([item["class"], 'p-ripple', {
558 558
         'p-disabled': item.disabled,
559
-        'router-link-exact-active': _ctx.$page.component === item.component
559
+        'router-link-exact-active': _ctx.$page.component.startsWith(item.component) || _ctx.$page.url.startsWith(item.to)
560 560
       }]),
561 561
       style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)(item.style),
562 562
       target: item.target,

+ 1
- 1
public/js/vue.js View File

@@ -57374,7 +57374,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
57374 57374
 /******/ 		// This function allow to reference async chunks
57375 57375
 /******/ 		__webpack_require__.u = (chunkId) => {
57376 57376
 /******/ 			// return url for filenames based on template
57377
-/******/ 			return "js/" + chunkId + ".js?id=" + {"resources_js_pages_Access_vue":"f8bbe21f8e264f5e","resources_js_pages_auth_ForgotPassword_vue":"9db08b886f3acf35","resources_js_pages_auth_Login_vue":"8066395135ce093d","resources_js_pages_auth_ResetPassword_vue":"3191258dc6d8a4b7","resources_js_pages_auth_VerifyEmail_vue":"632c69e9e8e9c0af","resources_js_pages_customer_Create_vue":"a4c3c08d336ece20","resources_js_pages_customer_Edit_vue":"82541bc522347b21","resources_js_pages_customer_Index_vue":"f62106417d698a05","resources_js_pages_customer_TableHeader_js":"5a71001a3c75e000","resources_js_pages_expense_Create_vue":"4cd78c011990ec2f","resources_js_pages_expense_Index_vue":"59feb6e060f64f0d","resources_js_pages_expense_Show_vue":"86cda5a4cc84f7fa","resources_js_pages_expense_TableHeader_js":"72e3dee74175b1c0","resources_js_pages_laundry_Create_vue":"9256a543dbbc51e0","resources_js_pages_laundry_Edit_vue":"8abc0e8e072452f4","resources_js_pages_laundry_Index_vue":"7cc1b150fecdd1bc","resources_js_pages_laundry_TableHeader_js":"494e577855bbcaf6","resources_js_pages_mutation_Report_vue":"3c24cde67463afbe","resources_js_pages_mutation_TableHeader_js":"831017a8dedc0b22","resources_js_pages_outlet_Create_vue":"d46b995ce6eef131","resources_js_pages_outlet_Edit_vue":"393ffafbfaf0ad40","resources_js_pages_outlet_Index_vue":"9cc6ffbe88f45a35","resources_js_pages_outlet_TableHeader_js":"498bf7e64bc0d0c4","resources_js_pages_transaction_Create_vue":"c90c01d53dea9ce1","resources_js_pages_transaction_Index_vue":"67066faccf48ad64","resources_js_pages_transaction_Report_vue":"410fadf4f59d865d","resources_js_pages_transaction_Show_vue":"b99e9de6af1e016c","resources_js_pages_transaction_TableHeader_js":"13113988b091bd7a","resources_js_pages_user_Create_vue":"34e9e408919d1f74","resources_js_pages_user_Edit_vue":"9e2fd96e23a7c37e","resources_js_pages_user_Index_vue":"732108f69e4976b0","resources_js_pages_user_Show_vue":"6d2a6264ab74d1f1","resources_js_pages_user_TableHeader_js":"5653ecbcd70fd235"}[chunkId] + "";
57377
+/******/ 			return "js/" + chunkId + ".js?id=" + {"resources_js_pages_Access_vue":"f8bbe21f8e264f5e","resources_js_pages_auth_ForgotPassword_vue":"9db08b886f3acf35","resources_js_pages_auth_Login_vue":"8066395135ce093d","resources_js_pages_auth_ResetPassword_vue":"3191258dc6d8a4b7","resources_js_pages_auth_VerifyEmail_vue":"632c69e9e8e9c0af","resources_js_pages_customer_Create_vue":"76102a3e41d58505","resources_js_pages_customer_Edit_vue":"b9502a71cf0e4b3d","resources_js_pages_customer_Index_vue":"bd33e48a520817fc","resources_js_pages_customer_TableHeader_js":"5a71001a3c75e000","resources_js_pages_expense_Create_vue":"dd0f9009035fdca7","resources_js_pages_expense_Index_vue":"b76d76c63d9c521e","resources_js_pages_expense_Show_vue":"fb96fb2582edb08a","resources_js_pages_expense_TableHeader_js":"72e3dee74175b1c0","resources_js_pages_laundry_Create_vue":"1275019227445a05","resources_js_pages_laundry_Edit_vue":"6a60c8a25fc2a015","resources_js_pages_laundry_Index_vue":"6f7ebb4ab21997b3","resources_js_pages_laundry_TableHeader_js":"494e577855bbcaf6","resources_js_pages_mutation_Report_vue":"e1b01b6fc17557b8","resources_js_pages_mutation_TableHeader_js":"82c2999bd7d098a1","resources_js_pages_outlet_Create_vue":"bdf84a50c3faa05a","resources_js_pages_outlet_Edit_vue":"e21d84901ad53def","resources_js_pages_outlet_Index_vue":"1fd470c9489678bb","resources_js_pages_outlet_TableHeader_js":"498bf7e64bc0d0c4","resources_js_pages_transaction_Create_vue":"b44a2307e1710a8c","resources_js_pages_transaction_Index_vue":"b2b5b370af5b0de8","resources_js_pages_transaction_Report_vue":"e7bbc96dd3eb641d","resources_js_pages_transaction_Show_vue":"ac0757b5e7f33553","resources_js_pages_transaction_TableHeader_js":"d68dc2c7bf975527","resources_js_pages_user_Create_vue":"785ab47ffc8af3f0","resources_js_pages_user_Edit_vue":"d9aa7ec5cdcc9086","resources_js_pages_user_Index_vue":"c9c1e8656d890ed7","resources_js_pages_user_Show_vue":"d6f1973b545cc111","resources_js_pages_user_TableHeader_js":"5653ecbcd70fd235"}[chunkId] + "";
57378 57378
 /******/ 		};
57379 57379
 /******/ 	})();
57380 57380
 /******/ 	

+ 8
- 5
resources/js/components/AppButton.vue View File

@@ -2,12 +2,13 @@
2 2
 import { Link } from '@inertiajs/inertia-vue3'
3 3
 
4 4
 defineProps({
5
-  icon: String,
6
-  label: String,
7 5
   inertiaLink: {
8 6
     type: Boolean,
9 7
     default: true,
10 8
   },
9
+  icon: String,
10
+  label: String,
11
+  classButton: String,
11 12
 })
12 13
 </script>
13 14
 
@@ -16,8 +17,10 @@ defineProps({
16 17
     <span v-if="icon" class="p-button-icon p-button-icon-left" :class="icon"></span>
17 18
     <span v-if="label" class="p-button-label">{{ label }}</span>
18 19
   </Link>
19
-  <a v-else class="p-button p-component">
20
-    <span v-if="icon" class="p-button-icon p-button-icon-left" :class="icon"></span>
21
-    <span v-if="label" class="p-button-label">{{ label }}</span>
20
+  <a v-else>
21
+    <Button :class="classButton">
22
+      <span v-if="icon" class="p-button-icon p-button-icon-left" :class="icon"></span>
23
+      <span v-if="label" class="p-button-label">{{ label }}</span>
24
+    </Button>
22 25
   </a>
23 26
 </template>

+ 1
- 1
resources/js/components/AppSubSidebar.vue View File

@@ -66,7 +66,7 @@ const visible = (item) => {
66 66
               'p-ripple',
67 67
               {
68 68
                 'p-disabled': item.disabled,
69
-                'router-link-exact-active': $page.component === item.component,
69
+                'router-link-exact-active': $page.component.startsWith(item.component) || $page.url.startsWith(item.to),
70 70
               },
71 71
             ]"
72 72
             :style="item.style"

+ 1
- 1
resources/js/pages/mutation/Report.vue View File

@@ -125,7 +125,7 @@ const isAdmin = computed(() => usePage().props.value.isAdmin)
125 125
             <AppButton
126 126
               v-if="mutations.data.length"
127 127
               label="Export excel"
128
-              class="p-button-text md:w-16rem"
128
+              class-button="p-button-text md:w-16rem"
129 129
               icon="pi pi-file-excel"
130 130
               :inertia-link="false"
131 131
               :href="exportExcelLink"

+ 2
- 2
resources/js/pages/mutation/TableHeader.js View File

@@ -1,6 +1,6 @@
1 1
 export default [
2 2
   { field: 'createdAt', header: 'Tanggal' },
3
-  { field: 'outlet', header: 'Outlet' },
4
-  { field: 'amount', header: 'Nilai' },
5 3
   { field: 'type', header: 'Tipe' },
4
+  { field: 'amount', header: 'Nilai' },
5
+  { field: 'outlet', header: 'Outlet' },
6 6
 ]

+ 1
- 1
resources/js/pages/transaction/Index.vue View File

@@ -212,7 +212,7 @@ const isAdmin = computed(() => usePage().props.value.isAdmin)
212 212
         <template #body="{ data, field }">
213 213
           <template v-if="field === 'transactionNumber'">
214 214
             <p class="font-bold">{{ data[field] }}</p>
215
-            <p>{{ data.dateLaundry }}</p>
215
+            <p>{{ data.createdAt }}</p>
216 216
           </template>
217 217
           <template v-else-if="field === 'customer'">
218 218
             <p class="font-bold">{{ data.customer.number }}</p>

+ 3
- 22
resources/js/pages/transaction/Report.vue View File

@@ -67,10 +67,6 @@ watch(
67 67
   }, 300)
68 68
 )
69 69
 
70
-const linkReference = (data) => {
71
-  return route('transactions.show', data.id)
72
-}
73
-
74 70
 const exportExcelLink = ref('/reports/transactions/export/excel')
75 71
 
76 72
 const isAdmin = computed(() => usePage().props.value.isAdmin)
@@ -121,7 +117,7 @@ const isAdmin = computed(() => usePage().props.value.isAdmin)
121 117
             <AppButton
122 118
               v-if="transactions.data.length"
123 119
               label="Export excel"
124
-              class="p-button-text md:w-16rem"
120
+              class-button="p-button-text md:w-16rem"
125 121
               icon="pi pi-file-excel"
126 122
               :inertia-link="false"
127 123
               :href="exportExcelLink"
@@ -135,29 +131,14 @@ const isAdmin = computed(() => usePage().props.value.isAdmin)
135 131
         :field="tableHeader.field"
136 132
         :header="tableHeader.header"
137 133
         :key="tableHeader.field"
138
-      >
139
-        <template #body="{ data, field }">
140
-          <template v-if="field === 'transactionNumber'">
141
-            <p class="font-bold">{{ data[field] }}</p>
142
-            <p>{{ data.createdAt }}</p>
143
-          </template>
144
-          <template v-else-if="field === 'transactionStatusName'">
145
-            <Badge v-if="data['transactionStatusId'] === 1" :value="data[field]"></Badge>
146
-            <Badge v-else-if="data['transactionStatusId'] === 2" :value="data[field]" severity="warning"></Badge>
147
-            <Badge v-else :value="data[field]" severity="success"></Badge>
148
-          </template>
149
-          <template v-else>
150
-            {{ data[field] }}
151
-          </template>
152
-        </template>
153
-      </Column>
134
+      />
154 135
 
155 136
       <Column>
156 137
         <template #body="{ data }">
157 138
           <AppButton
158 139
             icon="pi pi-link"
159 140
             class="p-button-text p-button-icon-only p-button-rounded p-button-text"
160
-            :href="linkReference(data)"
141
+            :href="`/transactions?startDate=${data.startDate}&endDate=${data.startDate}`"
161 142
           />
162 143
         </template>
163 144
       </Column>

+ 4
- 3
resources/js/pages/transaction/Show.vue View File

@@ -6,6 +6,7 @@ import { TransactionBasketTable } from './TableHeader'
6 6
 
7 7
 defineProps({
8 8
   transaction: Object,
9
+  user: Object,
9 10
   customer: Object,
10 11
   outlet: Object,
11 12
   transactionDetails: Object,
@@ -75,13 +76,13 @@ defineProps({
75 76
 
76 77
               <div class="col-auto mr-7">
77 78
                 <h3>Admin</h3>
78
-                <p>{{ $page.props.auth.user.name }}</p>
79
+                <p>{{ user.name }}</p>
79 80
 
80 81
                 <h3>No HP</h3>
81
-                <p>{{ $page.props.auth.user.phone }}</p>
82
+                <p>{{ user.phone }}</p>
82 83
 
83 84
                 <h3>Email</h3>
84
-                <p>{{ $page.props.auth.user.email }}</p>
85
+                <p>{{ user.email }}</p>
85 86
               </div>
86 87
 
87 88
               <Divider type="dashed" class="block md:hidden" />

+ 4
- 6
resources/js/pages/transaction/TableHeader.js View File

@@ -2,8 +2,8 @@ export const IndexTable = [
2 2
   { field: 'transactionNumber', header: 'Id Transaksi' },
3 3
   { field: 'customer', header: 'Id Customer' },
4 4
   { field: 'price', header: 'Total Harga' },
5
-  { field: 'outlet', header: 'Outlet' },
6 5
   { field: 'transactionStatusName', header: 'Status' },
6
+  { field: 'outlet', header: 'Outlet' },
7 7
 ]
8 8
 
9 9
 export const TransactionBasketTable = [
@@ -15,9 +15,7 @@ export const TransactionBasketTable = [
15 15
 ]
16 16
 
17 17
 export const TransactionReportTable = [
18
-  { field: 'transactionNumber', header: 'Id Transaksi' },
19
-  { field: 'price', header: 'Total Harga' },
20
-  { field: 'outlet', header: 'Outlet' },
21
-  { field: 'transactionStatusName', header: 'Status' },
22
-  { field: 'user', header: 'User' },
18
+  { field: 'createdAt', header: 'Tanggal' },
19
+  { field: 'numberOfTransaction', header: 'Jumlah Transaksi' },
20
+  { field: 'price', header: 'Total Nilai' },
23 21
 ]