|
|
@@ -322,11 +322,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
322
|
322
|
/* harmony import */ var _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @inertiajs/inertia-vue3 */ "./node_modules/@inertiajs/inertia-vue3/dist/index.js");
|
|
323
|
323
|
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js");
|
|
324
|
324
|
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);
|
|
325
|
|
-/* harmony import */ var _tableHeader__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./tableHeader */ "./resources/js/pages/Users/tableHeader.js");
|
|
326
|
|
-/* harmony import */ var _components_useSearchText__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/components/useSearchText */ "./resources/js/components/useSearchText.js");
|
|
327
|
|
-/* harmony import */ var _layouts_DashboardLayout_vue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/layouts/DashboardLayout.vue */ "./resources/js/layouts/DashboardLayout.vue");
|
|
328
|
|
-/* harmony import */ var _components_AppButtonLink_vue__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/components/AppButtonLink.vue */ "./resources/js/components/AppButtonLink.vue");
|
|
329
|
|
-/* harmony import */ var _components_AppPagination_vue__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/components/AppPagination.vue */ "./resources/js/components/AppPagination.vue");
|
|
|
325
|
+/* harmony import */ var primevue_useconfirm__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! primevue/useconfirm */ "./node_modules/primevue/useconfirm/useconfirm.esm.js");
|
|
|
326
|
+/* harmony import */ var _tableHeader__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./tableHeader */ "./resources/js/pages/Users/tableHeader.js");
|
|
|
327
|
+/* harmony import */ var _components_useSearchText__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/components/useSearchText */ "./resources/js/components/useSearchText.js");
|
|
|
328
|
+/* harmony import */ var _layouts_DashboardLayout_vue__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/layouts/DashboardLayout.vue */ "./resources/js/layouts/DashboardLayout.vue");
|
|
|
329
|
+/* harmony import */ var _components_AppButtonLink_vue__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/components/AppButtonLink.vue */ "./resources/js/components/AppButtonLink.vue");
|
|
|
330
|
+/* harmony import */ var _components_AppPagination_vue__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/components/AppPagination.vue */ "./resources/js/components/AppPagination.vue");
|
|
|
331
|
+
|
|
330
|
332
|
|
|
331
|
333
|
|
|
332
|
334
|
|
|
|
@@ -347,7 +349,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
347
|
349
|
expose();
|
|
348
|
350
|
var props = __props;
|
|
349
|
351
|
|
|
350
|
|
- var _useSearchText = (0,_components_useSearchText__WEBPACK_IMPORTED_MODULE_5__.useSearchText)(props),
|
|
|
352
|
+ var _useSearchText = (0,_components_useSearchText__WEBPACK_IMPORTED_MODULE_6__.useSearchText)(props),
|
|
351
|
353
|
search = _useSearchText.search;
|
|
352
|
354
|
|
|
353
|
355
|
(0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(search, function () {
|
|
|
@@ -357,18 +359,38 @@ __webpack_require__.r(__webpack_exports__);
|
|
357
|
359
|
preserveState: true
|
|
358
|
360
|
});
|
|
359
|
361
|
});
|
|
|
362
|
+ var resetConfirm = (0,primevue_useconfirm__WEBPACK_IMPORTED_MODULE_4__.useConfirm)();
|
|
|
363
|
+
|
|
|
364
|
+ var onResetPassword = function onResetPassword(data) {
|
|
|
365
|
+ resetConfirm.require({
|
|
|
366
|
+ message: "Yakin mereset kata sandi (".concat(data.name, ") ?"),
|
|
|
367
|
+ header: 'Reset Kata Sandi',
|
|
|
368
|
+ acceptLabel: 'Iya',
|
|
|
369
|
+ rejectLabel: 'Tidak',
|
|
|
370
|
+ accept: function accept() {
|
|
|
371
|
+ _inertiajs_inertia__WEBPACK_IMPORTED_MODULE_1__.Inertia.put(route('users.reset-password', data.id));
|
|
|
372
|
+ },
|
|
|
373
|
+ reject: function reject() {
|
|
|
374
|
+ resetConfirm.close();
|
|
|
375
|
+ }
|
|
|
376
|
+ });
|
|
|
377
|
+ };
|
|
|
378
|
+
|
|
360
|
379
|
var __returned__ = {
|
|
361
|
380
|
props: props,
|
|
362
|
381
|
search: search,
|
|
|
382
|
+ resetConfirm: resetConfirm,
|
|
|
383
|
+ onResetPassword: onResetPassword,
|
|
363
|
384
|
watch: vue__WEBPACK_IMPORTED_MODULE_0__.watch,
|
|
364
|
385
|
Inertia: _inertiajs_inertia__WEBPACK_IMPORTED_MODULE_1__.Inertia,
|
|
365
|
386
|
Head: _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_2__.Head,
|
|
366
|
387
|
pickBy: lodash__WEBPACK_IMPORTED_MODULE_3__.pickBy,
|
|
367
|
|
- tableHeader: _tableHeader__WEBPACK_IMPORTED_MODULE_4__["default"],
|
|
368
|
|
- useSearchText: _components_useSearchText__WEBPACK_IMPORTED_MODULE_5__.useSearchText,
|
|
369
|
|
- DashboardLayout: _layouts_DashboardLayout_vue__WEBPACK_IMPORTED_MODULE_6__["default"],
|
|
370
|
|
- AppButtonLink: _components_AppButtonLink_vue__WEBPACK_IMPORTED_MODULE_7__["default"],
|
|
371
|
|
- AppPagination: _components_AppPagination_vue__WEBPACK_IMPORTED_MODULE_8__["default"]
|
|
|
388
|
+ useConfirm: primevue_useconfirm__WEBPACK_IMPORTED_MODULE_4__.useConfirm,
|
|
|
389
|
+ tableHeader: _tableHeader__WEBPACK_IMPORTED_MODULE_5__["default"],
|
|
|
390
|
+ useSearchText: _components_useSearchText__WEBPACK_IMPORTED_MODULE_6__.useSearchText,
|
|
|
391
|
+ DashboardLayout: _layouts_DashboardLayout_vue__WEBPACK_IMPORTED_MODULE_7__["default"],
|
|
|
392
|
+ AppButtonLink: _components_AppButtonLink_vue__WEBPACK_IMPORTED_MODULE_8__["default"],
|
|
|
393
|
+ AppPagination: _components_AppPagination_vue__WEBPACK_IMPORTED_MODULE_9__["default"]
|
|
372
|
394
|
};
|
|
373
|
395
|
Object.defineProperty(__returned__, '__isScriptSetup', {
|
|
374
|
396
|
enumerable: false,
|
|
|
@@ -981,17 +1003,23 @@ var _hoisted_5 = {
|
|
981
|
1003
|
"class": "col-12 md:col-4 flex flex-column md:flex-row justify-content-end"
|
|
982
|
1004
|
};
|
|
983
|
1005
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1006
|
+ var _component_ConfirmDialog = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("ConfirmDialog");
|
|
|
1007
|
+
|
|
984
|
1008
|
var _component_InputText = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("InputText");
|
|
985
|
1009
|
|
|
986
|
1010
|
var _component_Column = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Column");
|
|
987
|
1011
|
|
|
|
1012
|
+ var _component_Button = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Button");
|
|
|
1013
|
+
|
|
988
|
1014
|
var _component_DataTable = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("DataTable");
|
|
989
|
1015
|
|
|
|
1016
|
+ var _directive_tooltip = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveDirective)("tooltip");
|
|
|
1017
|
+
|
|
990
|
1018
|
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["Head"], {
|
|
991
|
1019
|
title: "Daftar User"
|
|
992
|
1020
|
}), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["DashboardLayout"], null, {
|
|
993
|
1021
|
"default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
|
|
994
|
|
- return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_DataTable, {
|
|
|
1022
|
+ return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_ConfirmDialog), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_DataTable, {
|
|
995
|
1023
|
responsiveLayout: "scroll",
|
|
996
|
1024
|
columnResizeMode: "expand",
|
|
997
|
1025
|
value: $props.users.data,
|
|
|
@@ -1031,13 +1059,26 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1031
|
1059
|
)), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Column, null, {
|
|
1032
|
1060
|
body: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function (_ref) {
|
|
1033
|
1061
|
var data = _ref.data;
|
|
1034
|
|
- return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["AppButtonLink"], {
|
|
|
1062
|
+ return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup["AppButtonLink"], {
|
|
1035
|
1063
|
icon: "pi pi-pencil",
|
|
1036
|
1064
|
"class": "p-button-icon-only p-button-rounded p-button-text",
|
|
1037
|
1065
|
href: _ctx.route('users.edit', data.id)
|
|
1038
|
1066
|
}, null, 8
|
|
1039
|
1067
|
/* PROPS */
|
|
1040
|
|
- , ["href"])];
|
|
|
1068
|
+ , ["href"]), [[_directive_tooltip, 'Ubah User', void 0, {
|
|
|
1069
|
+ bottom: true
|
|
|
1070
|
+ }]]), data.role_id !== 1 ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)(((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_Button, {
|
|
|
1071
|
+ key: 0,
|
|
|
1072
|
+ icon: "pi pi-key",
|
|
|
1073
|
+ "class": "p-button-icon-only p-button-rounded p-button-text",
|
|
|
1074
|
+ onClick: function onClick($event) {
|
|
|
1075
|
+ return $setup.onResetPassword(data);
|
|
|
1076
|
+ }
|
|
|
1077
|
+ }, null, 8
|
|
|
1078
|
+ /* PROPS */
|
|
|
1079
|
+ , ["onClick"])), [[_directive_tooltip, 'Reset Kata Sandi', void 0, {
|
|
|
1080
|
+ bottom: true
|
|
|
1081
|
+ }]]) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)];
|
|
1041
|
1082
|
}),
|
|
1042
|
1083
|
_: 1
|
|
1043
|
1084
|
/* STABLE */
|