@@ -47,7 +47,7 @@
|
||||
if (processed_last_submit === true) {
|
||||
processed_last_submit = false;
|
||||
const toast = Toastify({
|
||||
text: "User is being added...",
|
||||
text: $_("user-is-being-added"),
|
||||
duration: -1,
|
||||
}).showToast();
|
||||
UserService.userControllerPost({
|
||||
@@ -67,19 +67,16 @@
|
||||
modal_open = false;
|
||||
//
|
||||
Toastify({
|
||||
text: "User added",
|
||||
text: $_("user-added"),
|
||||
duration: 500,
|
||||
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
|
||||
}).showToast();
|
||||
current_users.push(result);
|
||||
current_users = current_users;
|
||||
})
|
||||
.catch((err) => {
|
||||
//
|
||||
})
|
||||
.catch((err) => {})
|
||||
.finally(() => {
|
||||
processed_last_submit = true;
|
||||
//
|
||||
toast.hideToast();
|
||||
});
|
||||
}
|
||||
@@ -125,11 +122,11 @@
|
||||
</div>
|
||||
<div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left">
|
||||
<h3 class="text-lg leading-6 font-medium text-gray-900">
|
||||
Create a new User
|
||||
{$_('create-a-new-user')}
|
||||
</h3>
|
||||
<div class="mt-2 mb-6">
|
||||
<p class="text-sm text-gray-500">
|
||||
Please provide the required information to add a new user.
|
||||
{$_('please-provide-the-required-information-to-add-a-new-user')}
|
||||
</p>
|
||||
</div>
|
||||
<div class="grid grid-cols-6 gap-6">
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
);
|
||||
});
|
||||
Toastify({
|
||||
text: "Permissions updated!",
|
||||
text: $_("permissions-updated"),
|
||||
duration: 2500,
|
||||
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
|
||||
}).showToast();
|
||||
@@ -134,14 +134,14 @@
|
||||
<polyline points="12 5 19 12 12 19" /></svg>
|
||||
</li>
|
||||
<li class="flex items-center">
|
||||
<span class="mr-2">Permissions</span>
|
||||
<span class="mr-2">{$_('permissions')}</span>
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-8 text-3xl font-extrabold">
|
||||
Permissions:
|
||||
{$_('permissions')}:
|
||||
{original_data.firstname}
|
||||
{original_data.middlename || ''}
|
||||
{original_data.lastname}
|
||||
@@ -156,16 +156,21 @@
|
||||
{:else}
|
||||
<button
|
||||
type="button"
|
||||
class="w-full justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-yellow-600 text-base font-medium text-white hover:bg-yellow-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-yellow-500 sm:ml-3 sm:w-auto sm:text-sm">Applying
|
||||
Changes</button>
|
||||
class="w-full justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-yellow-600 text-base font-medium text-white hover:bg-yellow-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-yellow-500 sm:ml-3 sm:w-auto sm:text-sm">{$_('applying-changes')}</button>
|
||||
{/if}
|
||||
</span>
|
||||
</div>
|
||||
<!-- -->
|
||||
<div class="flex flex-wrap -mx-1 overflow-hidden">
|
||||
<div class="my-1 px-1 w-full overflow-hidden sm:w-1/3">verfügbare</div>
|
||||
<div class="my-1 px-1 w-full overflow-hidden sm:w-1/3">erteilte</div>
|
||||
<div class="my-1 px-1 w-full overflow-hidden sm:w-1/3">geerbte</div>
|
||||
<div class="my-1 px-1 w-full overflow-hidden sm:w-1/3">
|
||||
{$_('verfuegbare')}
|
||||
</div>
|
||||
<div class="my-1 px-1 w-full overflow-hidden sm:w-1/3">
|
||||
{$_('erteilte')}
|
||||
</div>
|
||||
<div class="my-1 px-1 w-full overflow-hidden sm:w-1/3">
|
||||
{$_('geerbte')}
|
||||
</div>
|
||||
</div>
|
||||
<!-- -->
|
||||
<div class="flex flex-wrap -mx-1 overflow-hidden">
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
<div class="text-center items-center justify-center">
|
||||
<p class="mb-16 text-lg text-gray-500">
|
||||
<img class="w-full h-44" src={users_empty} alt="" />
|
||||
<span class="font-bold">There are no users added yet.</span><br />
|
||||
<span>Add your first user</span>
|
||||
<span class="font-bold">{$_('there-are-no-users-added-yet')}</span><br />
|
||||
<span>{$_('add-your-first-user')}</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
import UsersEmptyState from "./UsersEmptyState.svelte";
|
||||
$: searchvalue = "";
|
||||
$: active_deletes = [];
|
||||
export let current_users=[];
|
||||
export let current_users = [];
|
||||
$: advanced_search = false;
|
||||
usersstore.subscribe((val) => {
|
||||
current_users=val;
|
||||
current_users = val;
|
||||
});
|
||||
users_promise.then((data) => {
|
||||
usersstore.set(data);
|
||||
@@ -31,12 +31,12 @@
|
||||
<!-- {#if advanced_search}
|
||||
advanced search
|
||||
{:else} -->
|
||||
<input
|
||||
type="search"
|
||||
bind:value={searchvalue}
|
||||
placeholder={$_('datatable.search')}
|
||||
aria-label={$_('datatable.search')}
|
||||
class="gridjs-input gridjs-search-input mb-4" />
|
||||
<input
|
||||
type="search"
|
||||
bind:value={searchvalue}
|
||||
placeholder={$_('datatable.search')}
|
||||
aria-label={$_('datatable.search')}
|
||||
class="gridjs-input gridjs-search-input mb-4" />
|
||||
<!-- {/if} -->
|
||||
<!-- <button
|
||||
on:click={() => {
|
||||
@@ -56,20 +56,20 @@
|
||||
<th
|
||||
scope="col"
|
||||
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
|
||||
Name
|
||||
{$_('name')}
|
||||
</th>
|
||||
<th
|
||||
scope="col"
|
||||
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
|
||||
Status
|
||||
{$_('status')}
|
||||
</th>
|
||||
<th
|
||||
scope="col"
|
||||
class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
|
||||
Groups
|
||||
{$_('groups')}
|
||||
</th>
|
||||
<th scope="col" class="relative px-6 py-3">
|
||||
<span class="sr-only">Action</span>
|
||||
<span class="sr-only">{$_('action')}</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -91,8 +91,7 @@
|
||||
</div>
|
||||
{/if}
|
||||
<div class="ml-4">
|
||||
<div
|
||||
class="text-sm font-medium text-gray-900">
|
||||
<div class="text-sm font-medium text-gray-900">
|
||||
{u.firstname}
|
||||
{u.middlename || ''}
|
||||
{u.lastname}
|
||||
@@ -127,21 +126,19 @@
|
||||
active_deletes[u.id] = false;
|
||||
}}
|
||||
tabindex="0"
|
||||
class="ml-4 text-indigo-600 hover:text-indigo-900 cursor-pointer">Cancel
|
||||
Delete</button>
|
||||
class="ml-4 text-indigo-600 hover:text-indigo-900 cursor-pointer">{$_('cancel-delete')}</button>
|
||||
<button
|
||||
on:click={() => {
|
||||
UserService.userControllerRemove(u.id, true)
|
||||
.then((resp) => {
|
||||
current_users=current_users.filter(obj=>obj.id!==u.id);
|
||||
current_users = current_users.filter((obj) => obj.id !== u.id);
|
||||
})
|
||||
.catch((err) => {
|
||||
// error deleting user
|
||||
});
|
||||
}}
|
||||
tabindex="0"
|
||||
class="ml-4 text-red-600 hover:text-red-900 cursor-pointer">Confirm
|
||||
Delete</button>
|
||||
class="ml-4 text-red-600 hover:text-red-900 cursor-pointer">{$_('confirm-delete')}</button>
|
||||
</td>
|
||||
{:else}
|
||||
<td
|
||||
@@ -155,7 +152,7 @@
|
||||
active_deletes[u.id] = true;
|
||||
}}
|
||||
tabindex="0"
|
||||
class="ml-4 text-red-600 hover:text-red-900 cursor-pointer">Delete</button>
|
||||
class="ml-4 text-red-600 hover:text-red-900 cursor-pointer">{$_('delete')}</button>
|
||||
{/if}
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user