PATH: /home/hwyuvbry/dear.waroenkhoki123.web.id/topadmin/assets/js
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
📄 app-access-permission.js
↓
X
📄 app-access-roles.js
↓
X
📄 app-calendar-events.js
↓
X
📄 app-calendar.js
↓
X
📄 app-chat.js
↓
X
📄 app-email.js
↓
X
📄 app-invoice-add.js
↓
X
📄 app-invoice-edit.js
↓
X
📄 app-invoice-list.js
↓
X
📄 app-invoice-print.js
↓
X
📄 app-kanban.js
↓
X
📄 app-user-list.js
↓
X
📄 app-user-view-account.js
↓
X
📄 app-user-view-billing.js
↓
X
📄 app-user-view-security.js
↓
X
📄 app-user-view.js
↓
X
📄 cards-actions.js
↓
X
📄 cards-analytics.js
↓
X
📄 cards-statistics.js
↓
X
📄 charts-apex.js
↓
X
📄 charts-chartjs.js
↓
X
📄 config.js
↓
X
📄 dashboards-analytics.js
↓
X
📄 dashboards-crm.js
↓
X
📄 dashboards-ecommerce.js
↓
X
📄 extended-ui-blockui.js
↓
X
📄 extended-ui-drag-and-drop.js
↓
X
📄 extended-ui-media-player.js
↓
X
📄 extended-ui-misc-clipboardjs.js
↓
X
📄 extended-ui-misc-idle-timer.js
↓
X
📄 extended-ui-misc-numeraljs.js
↓
X
📄 extended-ui-perfect-scrollbar.js
↓
X
📄 extended-ui-star-ratings.js
↓
X
📄 extended-ui-sweetalert2.js
↓
X
📄 extended-ui-timeline.js
↓
X
📄 extended-ui-tour.js
↓
X
📄 extended-ui-treeview.js
↓
X
📄 form-basic-inputs.js
↓
X
📄 form-layouts.js
↓
X
📄 form-validation.js
↓
X
📄 form-wizard-icons.js
↓
X
📄 form-wizard-numbered.js
↓
X
📄 form-wizard-validation.js
↓
X
📄 forms-editors.js
↓
X
📄 forms-extras.js
↓
X
📄 forms-file-upload.js
↓
X
📄 forms-pickers.js
↓
X
📄 forms-selects.js
↓
X
📄 forms-sliders.js
↓
X
📄 forms-tagify.js
↓
X
📄 forms-typeahead.js
↓
X
📄 main.js
↓
X
📄 maps-leaflet.js
↓
X
📄 modal-add-new-address.js
↓
X
📄 modal-add-new-cc.js
↓
X
📄 modal-add-permission.js
↓
X
📄 modal-add-role.js
↓
X
📄 modal-create-app.js
↓
X
📄 modal-edit-cc.js
↓
X
📄 modal-edit-permission.js
↓
X
📄 modal-edit-user.js
↓
X
📄 modal-enable-otp.js
↓
X
📄 modal-share-project.js
↓
X
📄 modal-two-factor-auth.js
↓
X
📄 offcanvas-add-payment.js
↓
X
📄 offcanvas-send-invoice.js
↓
X
📄 pages-account-settings-account.js
↓
X
📄 pages-account-settings-billing.js
↓
X
📄 pages-account-settings-security.js
↓
X
📄 pages-auth-multisteps.js
↓
X
📄 pages-auth-two-steps.js
↓
X
📄 pages-auth.js
↓
X
📄 pages-pricing.js
↓
X
📄 pages-profile.js
↓
X
📄 tables-datatables-advanced.js
↓
X
📄 tables-datatables-basic.js
↓
X
📄 tables-datatables-extensions.js
↓
X
📄 ui-app-brand.js
↓
X
📄 ui-carousel.js
↓
X
📄 ui-menu.js
↓
X
📄 ui-modals.js
↓
X
📄 ui-navbar.js
↓
X
📄 ui-popover.js
↓
X
📄 ui-toasts.js
↓
X
📄 wizard-ex-checkout.js
↓
X
📄 wizard-ex-create-deal.js
↓
X
📄 wizard-ex-property-listing.js
↓
X
SAVING...
BERHASIL DIUBAH!
EDITING: app-access-permission.js
/** * App user list (jquery) */ 'use strict'; $(function () { var dataTablePermissions = $('.datatables-permissions'), dt_permission, userList = 'app-user-list.html'; // Users List datatable if (dataTablePermissions.length) { dt_permission = dataTablePermissions.DataTable({ ajax: assetsPath + 'json/permissions-list.json', // JSON file to add data columns: [ // columns according to JSON { data: '' }, { data: 'id' }, { data: 'name' }, { data: 'assigned_to' }, { data: 'created_date' }, { data: '' } ], columnDefs: [ { // For Responsive className: 'control', orderable: false, searchable: false, responsivePriority: 2, targets: 0, render: function (data, type, full, meta) { return ''; } }, { targets: 1, searchable: false, visible: false }, { // Name targets: 2, render: function (data, type, full, meta) { var $name = full['name']; return '<span class="text-nowrap">' + $name + '</span>'; } }, { // User Role targets: 3, orderable: false, render: function (data, type, full, meta) { var $assignedTo = full['assigned_to'], $output = ''; var roleBadgeObj = { Admin: '<a href="' + userList + '"><span class="badge rounded-pill bg-label-primary m-1">Administrator</span></a>', Manager: '<a href="' + userList + '"><span class="badge rounded-pill bg-label-warning m-1">Manager</span></a>', Users: '<a href="' + userList + '"><span class="badge rounded-pill bg-label-success m-1">Users</span></a>', Support: '<a href="' + userList + '"><span class="badge rounded-pill bg-label-info m-1">Support</span></a>', Restricted: '<a href="' + userList + '"><span class="badge rounded-pill bg-label-danger m-1">Restricted User</span></a>' }; for (var i = 0; i < $assignedTo.length; i++) { var val = $assignedTo[i]; $output += roleBadgeObj[val]; } return '<span class="text-nowrap">' + $output + '</span>'; } }, { // remove ordering from Name targets: 4, orderable: false, render: function (data, type, full, meta) { var $date = full['created_date']; return '<span class="text-nowrap">' + $date + '</span>'; } }, { // Actions targets: -1, searchable: false, title: 'Actions', orderable: false, render: function (data, type, full, meta) { return ( '<span class="text-nowrap"><button class="btn btn-sm btn-icon btn-text-secondary rounded-pill btn-icon me-2" data-bs-target="#editPermissionModal" data-bs-toggle="modal" data-bs-dismiss="modal"><i class="mdi mdi-pencil-outline mdi-20px"></i></button>' + '<button class="btn btn-sm btn-icon btn-text-secondary rounded-pill btn-icon delete-record"><i class="mdi mdi-delete-outline mdi-20px"></i></button></span>' ); } } ], order: [[1, 'asc']], dom: '<"row mx-1"' + '<"col-sm-12 col-md-3" l>' + '<"col-sm-12 col-md-9"<"dt-action-buttons text-xl-end text-lg-start text-md-end text-start d-flex align-items-center justify-content-md-end justify-content-center flex-wrap me-1"<"me-3"f>B>>' + '>t' + '<"row mx-2"' + '<"col-sm-12 col-md-6"i>' + '<"col-sm-12 col-md-6"p>' + '>', language: { sLengthMenu: 'Show _MENU_', search: 'Search', searchPlaceholder: 'Search..' }, // Buttons with Dropdown buttons: [ { text: 'Add Permission', className: 'add-new btn btn-primary mb-3 mb-md-0', attr: { 'data-bs-toggle': 'modal', 'data-bs-target': '#addPermissionModal' }, init: function (api, node, config) { $(node).removeClass('btn-secondary'); } } ], // For responsive popup responsive: { details: { display: $.fn.dataTable.Responsive.display.modal({ header: function (row) { var data = row.data(); return 'Details of ' + data['name']; } }), type: 'column', renderer: function (api, rowIdx, columns) { var data = $.map(columns, function (col, i) { return col.title !== '' // ? Do not show row in modal popup if title is blank (for check box) ? '<tr data-dt-row="' + col.rowIndex + '" data-dt-column="' + col.columnIndex + '">' + '<td>' + col.title + ':' + '</td> ' + '<td>' + col.data + '</td>' + '</tr>' : ''; }).join(''); return data ? $('<table class="table"/><tbody />').append(data) : false; } } }, initComplete: function () { // Adding role filter once table initialized this.api() .columns(3) .every(function () { var column = this; var select = $( '<select id="UserRole" class="form-select text-capitalize"><option value=""> Select Role </option></select>' ) .appendTo('.user_role') .on('change', function () { var val = $.fn.dataTable.util.escapeRegex($(this).val()); column.search(val ? '^' + val + '$' : '', true, false).draw(); }); column .data() .unique() .sort() .each(function (d, j) { select.append('<option value="' + d + '" class="text-capitalize">' + d + '</option>'); }); }); } }); } // Delete Record $('.datatables-permissions tbody').on('click', '.delete-record', function () { dt_permission.row($(this).parents('tr')).remove().draw(); }); });
SIMPAN PERUBAHAN