restyling in light mode
This commit is contained in:
@@ -28,17 +28,17 @@ onUpdated(rounded)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex items-center space-x-2 dark:bg-gray-800 rounded-md px-4 py-2" :draggable="true" :id="`menu:${menu.id}`">
|
||||
<div class="flex items-center space-x-2 bg-gray-200 hover:bg-gray-100 dark:bg-gray-800 dark:hover:bg-gray-700 rounded-md px-4 py-2 transition-all" :draggable="true" :id="`menu:${menu.id}`">
|
||||
<div class="flex items-center space-x-2 w-full" :draggable="false">
|
||||
<Icon :name="menu.icon" :draggable="false" />
|
||||
<p class="uppercase" :draggable="false">{{ menu.name }}</p>
|
||||
</div>
|
||||
|
||||
<div ref="container" class="flex items-center flex-none rounded-md border dark:border-gray-800" :draggable="false">
|
||||
<Icon @click.prevent="left(menu)" v-if="menu.parent_id" name="arrow-left" class="px-2 py-1 dark:bg-gray-700 dark:hover:bg-gray-800 text-white transition-all cursor-pointer" :draggable="false" />
|
||||
<Icon @click.prevent="right(menu)" v-if="menu.position > 1" name="arrow-right" class="px-2 py-1 dark:bg-gray-700 dark:hover:bg-gray-800 text-white transition-all cursor-pointer" :draggable="false" />
|
||||
<Icon @click.prevent="up(menu)" v-if="menu.position > 1" name="arrow-up" class="px-2 py-1 dark:bg-gray-700 dark:hover:bg-gray-800 text-white transition-all cursor-pointer" :draggable="false" />
|
||||
<Icon @click.prevent="down(menu)" v-if="menu.position !== menu.parent?.childs_count" name="arrow-down" class="px-2 py-1 dark:bg-gray-700 dark:hover:bg-gray-800 text-white transition-all cursor-pointer" :draggable="false" />
|
||||
<Icon @click.prevent="left(menu)" v-if="menu.parent_id" name="arrow-left" class="px-2 py-1 bg-gray-100 hover:bg-gray-50 dark:bg-gray-700 dark:hover:bg-gray-800 text-gray-800 dark:text-white transition-all cursor-pointer" :draggable="false" />
|
||||
<Icon @click.prevent="right(menu)" v-if="menu.position > 1" name="arrow-right" class="px-2 py-1 bg-gray-100 hover:bg-gray-50 dark:bg-gray-700 dark:hover:bg-gray-800 text-gray-800 dark:text-white transition-all cursor-pointer" :draggable="false" />
|
||||
<Icon @click.prevent="up(menu)" v-if="menu.position > 1" name="arrow-up" class="px-2 py-1 bg-gray-100 hover:bg-gray-50 dark:bg-gray-700 dark:hover:bg-gray-800 text-gray-800 dark:text-white transition-all cursor-pointer" :draggable="false" />
|
||||
<Icon @click.prevent="down(menu)" v-if="menu.position !== menu.parent?.childs_count" name="arrow-down" class="px-2 py-1 bg-gray-100 hover:bg-gray-50 dark:bg-gray-700 dark:hover:bg-gray-800 text-gray-800 dark:text-white transition-all cursor-pointer" :draggable="false" />
|
||||
<Icon @click.prevent="edit(menu)" name="edit" class="px-2 py-1 bg-blue-600 hover:bg-blue-700 text-white transition-all cursor-pointer" :draggable="false" />
|
||||
<Icon @click.prevent="destroy(menu)" name="trash" class="px-2 py-1 bg-red-600 hover:bg-red-700 text-white transition-all cursor-pointer" :draggable="false" />
|
||||
</div>
|
||||
|
||||
@@ -130,9 +130,9 @@ onUnmounted(() => window.removeEventListener('keydown', esc))
|
||||
|
||||
<template>
|
||||
<DashboardLayout title="Menu">
|
||||
<Card class="dark:bg-gray-700 dark:text-gray-100">
|
||||
<Card class="bg-gray-50 dark:bg-gray-700 dark:text-gray-100">
|
||||
<template #header>
|
||||
<div class="flex items-center space-x-2 p-2 dark:bg-gray-800">
|
||||
<div class="flex items-center space-x-2 p-2 bg-gray-200 dark:bg-gray-800">
|
||||
<button @click.prevent="show" class="bg-green-600 hover:bg-green-700 rounded-md px-3 py-1 text-sm text-white transition-all">
|
||||
<div class="flex items-center space-x-1">
|
||||
<Icon name="plus" />
|
||||
@@ -153,10 +153,10 @@ onUnmounted(() => window.removeEventListener('keydown', esc))
|
||||
<transition name="fade">
|
||||
<div v-if="open" class="fixed top-0 left-0 w-full h-screen flex items-center justify-center bg-black bg-opacity-40">
|
||||
<form @submit.prevent="submit" class="w-full max-w-5xl rounded-md shadow-xl">
|
||||
<Card class="dark:bg-gray-700 dark:text-gray-100">
|
||||
<Card class="bg-gray-50 dark:bg-gray-700 dark:text-gray-100">
|
||||
<template #header>
|
||||
<div class="flex items-center space-x-2 p-2 justify-end dark:bg-gray-800">
|
||||
<Icon @click.prevent="close" name="times" class="px-2 py-1 dark:bg-gray-700 dark:hover:bg-gray-600 rounded-md transition-all cursor-pointer" />
|
||||
<div class="flex items-center space-x-2 p-2 justify-end bg-gray-200 dark:bg-gray-800">
|
||||
<Icon @click.prevent="close" name="times" class="px-2 py-1 bg-gray-300 hover:bg-gray-100 dark:bg-gray-700 dark:hover:bg-gray-600 rounded-md transition-all cursor-pointer" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -165,7 +165,7 @@ onUnmounted(() => window.removeEventListener('keydown', esc))
|
||||
<div class="flex flex-col space-y-1">
|
||||
<div class="flex items-center space-x-2">
|
||||
<label for="name" class="lowercase first-letter:capitalize w-1/3">name</label>
|
||||
<input type="text" name="name" v-model="form.name" ref="name" class="w-full bg-transparent rounded px-3 py-2 border dark:border-gray-800 uppercase placeholder:capitalize" placeholder="name" required>
|
||||
<input type="text" name="name" v-model="form.name" ref="name" class="w-full bg-white dark:bg-transparent rounded px-3 py-2 border dark:border-gray-800 uppercase placeholder:capitalize" placeholder="name" required>
|
||||
</div>
|
||||
|
||||
<div v-if="form.errors.name" class="text-right text-sm text-red-500">{{ form.errors.name }}</div>
|
||||
@@ -248,7 +248,7 @@ onUnmounted(() => window.removeEventListener('keydown', esc))
|
||||
</template>
|
||||
|
||||
<template #footer>
|
||||
<div class="flex items-center justify-end space-x-2 dark:bg-gray-800 py-1 px-2">
|
||||
<div class="flex items-center justify-end space-x-2 bg-gray-200 dark:bg-gray-800 py-1 px-2">
|
||||
<button type="submit" class="bg-green-600 hover:bg-green-700 rounded-md px-3 py-1 text-white text-sm transition-all">
|
||||
<div class="flex items-center space-x-1">
|
||||
<Icon name="check" />
|
||||
@@ -264,17 +264,17 @@ onUnmounted(() => window.removeEventListener('keydown', esc))
|
||||
|
||||
<transition name="fade">
|
||||
<div v-if="icon" class="fixed top-0 left-0 w-full h-screen flex items-center justify-center bg-black bg-opacity-40">
|
||||
<Card class="dark:bg-gray-700 dark:text-gray-100 w-full max-w-5xl">
|
||||
<Card class="bg-gray-50 dark:bg-gray-700 dark:text-gray-100 w-full max-w-5xl">
|
||||
<template #header>
|
||||
<div class="flex items-center space-x-2 p-2 justify-end dark:bg-gray-800">
|
||||
<input type="search" v-model="search" class="w-full bg-transparent rounded-md text-sm uppercase" placeholder="search something">
|
||||
<Icon @click.prevent="icon = false" name="times" class="px-2 py-1 dark:bg-gray-700 dark:hover:bg-gray-600 rounded-md transition-all cursor-pointer" />
|
||||
<div class="flex items-center space-x-2 p-2 justify-end bg-gray-200 dark:bg-gray-800">
|
||||
<input type="search" v-model="search" class="py-1 w-full bg-white dark:bg-transparent rounded-md text-sm uppercase" placeholder="search something">
|
||||
<Icon @click.prevent="icon = false" name="times" class="px-2 py-1 bg-gray-300 hover:bg-gray-100 dark:bg-gray-700 dark:hover:bg-gray-600 rounded-md transition-all cursor-pointer" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #body>
|
||||
<div class="flex-wrap p-4 max-h-96 overflow-auto">
|
||||
<Icon v-for="(icx, i) in icons.filter(icx => icx.includes(search.trim().toLocaleLowerCase()))" :key="i" @click.prevent="form.icon = icx; icon = false" :name="icx" class="m-1 text-5xl px-2 py-1 text-gray-800 dark:text-white dark:bg-gray-600 dark:hover:bg-gray-700 rounded-md cursor-pointer transition-all" />
|
||||
<Icon v-for="(icx, i) in icons.filter(icx => icx.includes(search.trim().toLocaleLowerCase()))" :key="i" @click.prevent="form.icon = icx; icon = false" :name="icx" class="m-1 text-5xl px-2 py-1 text-gray-800 bg-gray-200 hover:bg-gray-100 dark:text-white dark:bg-gray-600 dark:hover:bg-gray-700 rounded-md cursor-pointer transition-all" />
|
||||
</div>
|
||||
</template>
|
||||
</Card>
|
||||
|
||||
@@ -36,18 +36,18 @@ Inertia.on('finish', () => {
|
||||
|
||||
<template>
|
||||
<div class="flex flex-col space-y-1" :id="`menu:${menu.id}`">
|
||||
<div class="flex items-center space-x-2 dark:bg-gray-800 rounded-md px-4 py-2" :draggable="true">
|
||||
<div class="flex items-center space-x-2 bg-gray-200 hover:bg-gray-100 dark:bg-gray-800 rounded-md px-4 py-2 transition-all" :draggable="true">
|
||||
<div class="flex items-center space-x-2 w-full" :draggable="false">
|
||||
<Icon :name="menu.icon" :draggable="false" />
|
||||
<p class="uppercase" :draggable="false">{{ menu.name }}</p>
|
||||
</div>
|
||||
|
||||
<div ref="container" class="flex items-center flex-none" :draggable="false">
|
||||
<Icon @click.prevent="left(menu)" v-if="menu.parent_id" name="arrow-left" class="px-2 py-1 dark:bg-gray-700 dark:hover:bg-gray-800 text-white transition-all cursor-pointer" :draggable="false" />
|
||||
<Icon @click.prevent="right(menu)" v-if="menu.position > 1" name="arrow-right" class="px-2 py-1 dark:bg-gray-700 dark:hover:bg-gray-800 text-white transition-all cursor-pointer" :draggable="false" />
|
||||
<Icon @click.prevent="up(menu)" v-if="menu.position > 1" name="arrow-up" class="px-2 py-1 dark:bg-gray-700 dark:hover:bg-gray-800 text-white transition-all cursor-pointer" :draggable="false" />
|
||||
<Icon @click.prevent="down(menu)" v-if="menu.position !== menu.parent?.childs_count" name="arrow-down" class="px-2 py-1 dark:bg-gray-700 dark:hover:bg-gray-800 text-white transition-all cursor-pointer" :draggable="false" />
|
||||
<Icon @click.prevent="open = ! open" :name="open ? 'minus' : 'plus'" class="px-2 py-1 dark:bg-gray-100 dark:hover:bg-gray-50 text-gray-800 transition-all cursor-pointer" :draggable="false" />
|
||||
<Icon @click.prevent="left(menu)" v-if="menu.parent_id" name="arrow-left" class="px-2 py-1 bg-gray-100 hover:bg-gray-50 dark:bg-gray-700 dark:hover:bg-gray-800 dark:text-white transition-all cursor-pointer" :draggable="false" />
|
||||
<Icon @click.prevent="right(menu)" v-if="menu.position > 1" name="arrow-right" class="px-2 py-1 bg-gray-100 hover:bg-gray-50 dark:bg-gray-700 dark:hover:bg-gray-800 dark:text-white transition-all cursor-pointer" :draggable="false" />
|
||||
<Icon @click.prevent="up(menu)" v-if="menu.position > 1" name="arrow-up" class="px-2 py-1 bg-gray-100 hover:bg-gray-50 dark:bg-gray-700 dark:hover:bg-gray-800 dark:text-white transition-all cursor-pointer" :draggable="false" />
|
||||
<Icon @click.prevent="down(menu)" v-if="menu.position !== menu.parent?.childs_count" name="arrow-down" class="px-2 py-1 bg-gray-100 hover:bg-gray-50 dark:bg-gray-700 dark:hover:bg-gray-800 dark:text-white transition-all cursor-pointer" :draggable="false" />
|
||||
<Icon @click.prevent="open = ! open" :name="open ? 'minus' : 'plus'" class="px-2 py-1 bg-gray-100 hover:bg-gray-50 dark:bg-gray-100 dark:hover:bg-gray-50 text-gray-800 dark:text-white transition-all cursor-pointer" :draggable="false" />
|
||||
<Icon @click.prevent="edit(menu)" name="edit" class="px-2 py-1 bg-blue-600 hover:bg-blue-700 text-white transition-all cursor-pointer" :draggable="false" />
|
||||
<Icon @click.prevent="destroy(menu)" name="trash" class="px-2 py-1 bg-red-600 hover:bg-red-700 text-white transition-all cursor-pointer" :draggable="false" />
|
||||
</div>
|
||||
|
||||
@@ -106,9 +106,9 @@ onUnmounted(() => window.removeEventListener('keydown', esc))
|
||||
|
||||
<template>
|
||||
<DashboardLayout title="Permission">
|
||||
<Card class="bg-gray-100 dark:bg-slate-700 shadow-md">
|
||||
<Card class="bg-gray-50 dark:bg-slate-700 shadow-md">
|
||||
<template #header>
|
||||
<div class="flex items-center space-x-2 bg-gray-800 p-2">
|
||||
<div class="flex items-center space-x-2 bg-gray-200 dark:bg-gray-800 p-2">
|
||||
<button @click.prevent="show()" class="bg-green-600 hover:bg-green-700 rounded-md px-3 py-1 text-sm text-white transition-all">
|
||||
<div class="flex items-center space-x-1">
|
||||
<Icon name="plus" />
|
||||
@@ -126,13 +126,13 @@ onUnmounted(() => window.removeEventListener('keydown', esc))
|
||||
|
||||
<div class="flex-wrap px-4 pb-2 dark:bg-gray-700 dark:text-gray-100 rounded-b-md">
|
||||
<transition-group name="opacity">
|
||||
<div v-for="(permission, i) in permissions.filter(p => p.name?.toLowerCase().includes(search?.trim().toLowerCase()))" :key="i" class="inline-block dark:bg-gray-600 dark:hover:bg-gray-700 transition-all border dark:border-gray-700 dark:hover:border-gray-800 rounded-md m-[2px] px-3 py-1">
|
||||
<div v-for="(permission, i) in permissions.filter(p => p.name?.toLowerCase().includes(search?.trim().toLowerCase()))" :key="i" class="inline-block bg-gray-200 hover:bg-gray-100 dark:bg-gray-600 dark:hover:bg-gray-700 transition-all border dark:border-gray-700 dark:hover:border-gray-800 rounded-md m-[2px] px-3 py-1">
|
||||
<div class="flex items-center space-x-2 text-sm">
|
||||
<p class="uppercase">{{ permission.name }}</p>
|
||||
|
||||
<div class="flex items-center space-x-1">
|
||||
<Icon @click.prevent="edit(permission)" name="pen" class="px-2 py-1 rounded cursor-pointer bg-blue-600 hover:bg-blue-700 transition-all" />
|
||||
<Icon @click.prevent="destroy(permission)" name="trash" class="px-2 py-1 rounded cursor-pointer bg-red-600 hover:bg-red-700 transition-all" />
|
||||
<Icon @click.prevent="edit(permission)" name="pen" class="px-2 py-1 rounded cursor-pointer text-white bg-blue-600 hover:bg-blue-700 transition-all" />
|
||||
<Icon @click.prevent="destroy(permission)" name="trash" class="px-2 py-1 rounded cursor-pointer text-white bg-red-600 hover:bg-red-700 transition-all" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -146,10 +146,10 @@ onUnmounted(() => window.removeEventListener('keydown', esc))
|
||||
<transition name="fade">
|
||||
<div v-if="open" class="fixed top-0 left-0 w-full h-screen flex items-center justify-center bg-black bg-opacity-40">
|
||||
<form @submit.prevent="submit" class="w-full max-w-xl shadow-xl">
|
||||
<Card class="dark:bg-gray-700 dark:text-gray-100 border dark:border-gray-700">
|
||||
<Card class="bg-gray-50 dark:bg-gray-700 dark:text-gray-100 border dark:border-gray-700">
|
||||
<template #header>
|
||||
<div class="flex items-center space-x-2 justify-end dark:bg-gray-800 dark:text-gray-50 p-2">
|
||||
<Icon @click.prevent="close" name="times" class="border border-transparent dark:bg-gray-700 px-2 py-1 rounded-md cursor-pointer transition-all dark:hover:bg-gray-600 dark:hover:border-gray-600" />
|
||||
<div class="flex items-center space-x-2 justify-end bg-gray-200 dark:bg-gray-800 dark:text-gray-50 p-2">
|
||||
<Icon @click.prevent="close" name="times" class="border border-transparent dark:bg-gray-700 px-2 py-1 rounded-md cursor-pointer transition-all bg-gray-300 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:border-gray-600" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -169,11 +169,11 @@ onUnmounted(() => window.removeEventListener('keydown', esc))
|
||||
</template>
|
||||
|
||||
<template #footer>
|
||||
<div class="flex items-center space-x-2 justify-end dark:bg-gray-800 dark:text-gray-50 p-2">
|
||||
<div class="flex items-center space-x-2 justify-end bg-gray-200 dark:bg-gray-800 text-white px-2 py-1">
|
||||
<button type="submit" class="bg-green-600 rounded-md px-3 py-1 text-sm transition-all hover:bg-green-700">
|
||||
<div class="flex items-center space-x-1">
|
||||
<Icon name="check" />
|
||||
<p class="uppercase font-semibold">submit</p>
|
||||
<p class="uppercase font-semibold">{{ form.id ? 'update' : 'create' }}</p>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -98,10 +98,10 @@ onUnmounted(() => window.removeEventListener('keydown', esc))
|
||||
|
||||
<template>
|
||||
<DashboardLayout title="role">
|
||||
<Card class="dark:bg-gray-700 dark:text-gray-100">
|
||||
<Card class="bg-gray-50 dark:bg-gray-700 dark:text-gray-100">
|
||||
<template #header>
|
||||
<div class="flex items-center space-x-2 p-2 dark:bg-gray-800">
|
||||
<button v-if="can('create role')" @click.prevent="show" class="bg-green-600 hover:bg-green-700 rounded-md px-3 py-1 text-sm transition-all">
|
||||
<div class="flex items-center space-x-2 p-2 bg-gray-200 dark:bg-gray-800">
|
||||
<button v-if="can('create role')" @click.prevent="show" class="bg-green-600 hover:bg-green-700 rounded-md px-3 py-1 text-sm text-white transition-all">
|
||||
<div class="flex items-center space-x-1">
|
||||
<Icon name="plus" />
|
||||
<p class="uppercase font-semibold">create</p>
|
||||
@@ -114,20 +114,20 @@ onUnmounted(() => window.removeEventListener('keydown', esc))
|
||||
<div class="flex flex-col space-y-2">
|
||||
<Builder :url="route('api.v1.superuser.role.paginate')">
|
||||
<template v-slot:thead="table">
|
||||
<tr>
|
||||
<Th class="dark:bg-gray-800 border dark:border-gray-900 px-3 py-2 text-center" :table="table" :sort="false">no</Th>
|
||||
<Th class="dark:bg-gray-800 border dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="true" name="name">name</Th>
|
||||
<Th class="dark:bg-gray-800 border dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">permissions</Th>
|
||||
<Th class="dark:bg-gray-800 border dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">action</Th>
|
||||
<tr class="bg-gray-200 dark:bg-gray-800">
|
||||
<Th class="border border-gray-300 dark:border-gray-900 px-3 py-2 text-center" :table="table" :sort="false">no</Th>
|
||||
<Th class="border border-gray-300 dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="true" name="name">name</Th>
|
||||
<Th class="border border-gray-300 dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">permissions</Th>
|
||||
<Th class="border border-gray-300 dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">action</Th>
|
||||
</tr>
|
||||
</template>
|
||||
|
||||
<template v-slot:tfoot="table">
|
||||
<tr>
|
||||
<Th class="dark:bg-gray-800 border dark:border-gray-900 px-3 py-2 text-center" :table="table" :sort="false">no</Th>
|
||||
<Th class="dark:bg-gray-800 border dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">name</Th>
|
||||
<Th class="dark:bg-gray-800 border dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">permissions</Th>
|
||||
<Th class="dark:bg-gray-800 border dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">action</Th>
|
||||
<tr class="bg-gray-200 dark:bg-gray-800">
|
||||
<Th class="border border-gray-300 dark:border-gray-900 px-3 py-2 text-center" :table="table" :sort="false">no</Th>
|
||||
<Th class="border border-gray-300 dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">name</Th>
|
||||
<Th class="border border-gray-300 dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">permissions</Th>
|
||||
<Th class="border border-gray-300 dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">action</Th>
|
||||
</tr>
|
||||
</template>
|
||||
|
||||
@@ -137,11 +137,11 @@ onUnmounted(() => window.removeEventListener('keydown', esc))
|
||||
<td class="px-2 py-1 border dark:border-gray-800 uppercase">{{ role.name }}</td>
|
||||
<td class="px-2 py-1 border dark:border-gray-800">
|
||||
<div class="flex-wrap">
|
||||
<div v-for="(permission, j) in role.permissions" :key="j" class="inline-block dark:bg-gray-600 dark:hover:bg-gray-700 border dark:border-gray-700 dark:hover:border-gray-800 rounded-md px-3 py-1 m-[1px] text-sm">
|
||||
<div v-for="(permission, j) in role.permissions" :key="j" class="inline-block bg-gray-200 hover:bg-gray-100 dark:bg-gray-600 dark:hover:bg-gray-700 border dark:border-gray-700 dark:hover:border-gray-800 rounded-md px-3 py-1 m-[1px] text-sm">
|
||||
<div class="flex items-center justify-between space-x-1">
|
||||
<p class="uppercase font-semibold">{{ permission.name }}</p>
|
||||
|
||||
<Icon @click.prevent="detach(role, permission, refresh)" v-if="can('update role')" name="times" class="px-2 py-1 rounded-md dark:bg-gray-700 transition-all hover:bg-red-500 cursor-pointer" />
|
||||
<Icon @click.prevent="detach(role, permission, refresh)" v-if="can('update role')" name="times" class="px-2 py-1 rounded-md bg-red-500 transition-all hover:bg-red-600 text-white cursor-pointer" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -174,10 +174,10 @@ onUnmounted(() => window.removeEventListener('keydown', esc))
|
||||
<transition name="fade">
|
||||
<div v-if="open" class="fixed top-0 left-0 w-full h-full bg-black bg-opacity-40 flex items-center justify-center">
|
||||
<form @submit.prevent="submit" class="w-full max-w-xl shadow-xl">
|
||||
<Card class="dark:bg-gray-700 dark:text-gray-100">
|
||||
<Card class="bg-gray-50 dark:bg-gray-700 dark:text-gray-100">
|
||||
<template #header>
|
||||
<div class="flex items-center justify-end bg-gray-800 p-2">
|
||||
<Icon @click.prevent="close" name="times" class="px-2 py-1 dark:bg-gray-700 dark:hover:bg-gray-600 rounded-md transition-all cursor-pointer" />
|
||||
<div class="flex items-center justify-end bg-gray-200 dark:bg-gray-800 p-2">
|
||||
<Icon @click.prevent="close" name="times" class="px-2 py-1 bg-gray-300 hover:bg-gray-100 dark:bg-gray-700 dark:hover:bg-gray-600 rounded-md transition-all cursor-pointer" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -186,7 +186,7 @@ onUnmounted(() => window.removeEventListener('keydown', esc))
|
||||
<div class="flex flex-col space-y-2">
|
||||
<div class="flex items-center space-x-2">
|
||||
<label for="name" class="w-1/3 lowercase first-letter:capitalize">name</label>
|
||||
<input ref="name" type="text" name="name" v-model="form.name" class="w-full bg-transparent rounded px-3 py-2 placeholder:capitalize" placeholder="name" required>
|
||||
<input ref="name" type="text" name="name" v-model="form.name" class="w-full bg-white dark:bg-transparent rounded px-3 py-2 placeholder:capitalize" placeholder="name" required>
|
||||
</div>
|
||||
|
||||
<p v-if="form.errors.name" class="text-red-500 text-right lowercase first-letter:capitalize">{{ form.errors.name }}</p>
|
||||
@@ -214,8 +214,8 @@ onUnmounted(() => window.removeEventListener('keydown', esc))
|
||||
</template>
|
||||
|
||||
<template #footer>
|
||||
<div class="flex items-center justify-end space-x-2 dark:bg-gray-800 px-2 py-1">
|
||||
<button type="submit" class="bg-green-600 hover:bg-green-700 rounded-md px-3 py-1 text-sm transition-all">
|
||||
<div class="flex items-center justify-end space-x-2 bg-gray-200 dark:bg-gray-800 px-2 py-1">
|
||||
<button type="submit" class="bg-green-600 hover:bg-green-700 rounded-md px-3 py-1 text-sm text-white transition-all">
|
||||
<div class="flex items-center space-x-1">
|
||||
<Icon name="check" />
|
||||
|
||||
|
||||
@@ -125,10 +125,10 @@ onUnmounted(() => window.removeEventListener('keydown', esc))
|
||||
|
||||
<template>
|
||||
<DashboardLayout title="user">
|
||||
<Card class="dark:bg-gray-700 dark:text-gray-100">
|
||||
<Card class="bg-gray-50 dark:bg-gray-700 dark:text-gray-100">
|
||||
<template #header>
|
||||
<div class="flex items-center space-x-2 p-2 dark:bg-gray-800">
|
||||
<button v-if="can('create user')" @click.prevent="show" class="bg-green-600 hover:bg-green-700 rounded-md px-3 py-1 text-sm transition-all">
|
||||
<div class="flex items-center space-x-2 p-2 bg-gray-200 dark:bg-gray-800">
|
||||
<button v-if="can('create user')" @click.prevent="show" class="bg-green-600 hover:bg-green-700 rounded-md px-3 py-1 text-sm text-white transition-all">
|
||||
<div class="flex items-center space-x-1">
|
||||
<Icon name="plus" />
|
||||
<p class="uppercase font-semibold">create</p>
|
||||
@@ -141,32 +141,32 @@ onUnmounted(() => window.removeEventListener('keydown', esc))
|
||||
<div class="flex flex-col space-y-2">
|
||||
<Builder :url="route('api.v1.superuser.user.paginate')">
|
||||
<template v-slot:thead="table">
|
||||
<tr>
|
||||
<Th class="dark:bg-gray-800 border dark:border-gray-900 px-3 py-2 text-center" :table="table" :sort="false">no</Th>
|
||||
<Th class="dark:bg-gray-800 border dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="true" name="name">name</Th>
|
||||
<Th class="dark:bg-gray-800 border dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="true" name="username">username</Th>
|
||||
<Th class="dark:bg-gray-800 border dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="true" name="email">email</Th>
|
||||
<Th class="dark:bg-gray-800 border dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">permissions</Th>
|
||||
<Th class="dark:bg-gray-800 border dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">roles</Th>
|
||||
<Th class="dark:bg-gray-800 border dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="true" name="email_verified_at">verified at</Th>
|
||||
<Th class="dark:bg-gray-800 border dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="true" name="created_at">created at</Th>
|
||||
<Th class="dark:bg-gray-800 border dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="true" name="updated_at">updated at</Th>
|
||||
<Th class="dark:bg-gray-800 border dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">action</Th>
|
||||
<tr class="bg-gray-200 dark:bg-gray-800">
|
||||
<Th class="border border-gray-300 dark:border-gray-900 px-3 py-2 text-center" :table="table" :sort="false">no</Th>
|
||||
<Th class="border border-gray-300 dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="true" name="name">name</Th>
|
||||
<Th class="border border-gray-300 dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="true" name="username">username</Th>
|
||||
<Th class="border border-gray-300 dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="true" name="email">email</Th>
|
||||
<Th class="border border-gray-300 dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">permissions</Th>
|
||||
<Th class="border border-gray-300 dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">roles</Th>
|
||||
<Th class="border border-gray-300 dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="true" name="email_verified_at">verified at</Th>
|
||||
<Th class="border border-gray-300 dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="true" name="created_at">created at</Th>
|
||||
<Th class="border border-gray-300 dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="true" name="updated_at">updated at</Th>
|
||||
<Th class="border border-gray-300 dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">action</Th>
|
||||
</tr>
|
||||
</template>
|
||||
|
||||
<template v-slot:tfoot="table">
|
||||
<tr>
|
||||
<Th class="dark:bg-gray-800 border dark:border-gray-900 px-3 py-2 text-center" :table="table" :sort="false">no</Th>
|
||||
<Th class="dark:bg-gray-800 border dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">name</Th>
|
||||
<Th class="dark:bg-gray-800 border dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">username</Th>
|
||||
<Th class="dark:bg-gray-800 border dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">email</Th>
|
||||
<Th class="dark:bg-gray-800 border dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">permissions</Th>
|
||||
<Th class="dark:bg-gray-800 border dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">roles</Th>
|
||||
<Th class="dark:bg-gray-800 border dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">verified at</Th>
|
||||
<Th class="dark:bg-gray-800 border dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">created at</Th>
|
||||
<Th class="dark:bg-gray-800 border dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">updated at</Th>
|
||||
<Th class="dark:bg-gray-800 border dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">action</Th>
|
||||
<tr class="bg-gray-200 dark:bg-gray-800">
|
||||
<Th class="border border-gray-300 dark:border-gray-900 px-3 py-2 text-center" :table="table" :sort="false">no</Th>
|
||||
<Th class="border border-gray-300 dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">name</Th>
|
||||
<Th class="border border-gray-300 dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">username</Th>
|
||||
<Th class="border border-gray-300 dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">email</Th>
|
||||
<Th class="border border-gray-300 dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">permissions</Th>
|
||||
<Th class="border border-gray-300 dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">roles</Th>
|
||||
<Th class="border border-gray-300 dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">verified at</Th>
|
||||
<Th class="border border-gray-300 dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">created at</Th>
|
||||
<Th class="border border-gray-300 dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">updated at</Th>
|
||||
<Th class="border border-gray-300 dark:border-gray-900 px-3 py-2 text-center whitespace-nowrap" :table="table" :sort="false">action</Th>
|
||||
</tr>
|
||||
</template>
|
||||
|
||||
@@ -189,7 +189,7 @@ onUnmounted(() => window.removeEventListener('keydown', esc))
|
||||
</td>
|
||||
<td class="px-2 py-1 border dark:border-gray-800">
|
||||
<div class="flex-wrap">
|
||||
<div v-for="(role, j) in user.roles" :key="j" class="inline-block dark:bg-gray-600 dark:hover:bg-gray-700 border dark:border-gray-700 dark:border-gray-800 rounded-md px-3 py-1 m-[1px] text-sm">
|
||||
<div v-for="(role, j) in user.roles" :key="j" class="inline-block dark:bg-gray-600 dark:hover:bg-gray-700 border dark:border-gray-800 rounded-md px-3 py-1 m-[1px] text-sm">
|
||||
<div class="flex items-center justify-between space-x-1">
|
||||
<p class="uppercase font-semibold">{{ role.name }}</p>
|
||||
|
||||
@@ -229,10 +229,10 @@ onUnmounted(() => window.removeEventListener('keydown', esc))
|
||||
<transition name="fade">
|
||||
<div v-if="open" class="fixed top-0 left-0 w-full h-full bg-black bg-opacity-40 flex items-center justify-center">
|
||||
<form @submit.prevent="submit" class="w-full max-w-5xl shadow-xl">
|
||||
<Card class="dark:bg-gray-700 dark:text-gray-100">
|
||||
<Card class="bg-gray-50 dark:bg-gray-700 dark:text-gray-100">
|
||||
<template #header>
|
||||
<div class="flex items-center justify-end bg-gray-800 p-2">
|
||||
<Icon @click.prevent="close" name="times" class="px-2 py-1 dark:bg-gray-700 dark:hover:bg-gray-600 rounded-md transition-all cursor-pointer" />
|
||||
<div class="flex items-center justify-end bg-gray-200 dark:bg-gray-800 p-2">
|
||||
<Icon @click.prevent="close" name="times" class="px-2 py-1 bg-gray-300 hover:bg-gray-100 dark:bg-gray-700 dark:hover:bg-gray-600 rounded-md transition-all cursor-pointer" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -241,7 +241,7 @@ onUnmounted(() => window.removeEventListener('keydown', esc))
|
||||
<div class="flex flex-col space-y-2">
|
||||
<div class="flex items-center space-x-2">
|
||||
<label for="name" class="w-1/3 lowercase first-letter:capitalize">name</label>
|
||||
<input ref="name" type="text" name="name" v-model="form.name" class="w-full bg-transparent rounded px-3 py-2 placeholder:capitalize" placeholder="name" required>
|
||||
<input ref="name" type="text" name="name" v-model="form.name" class="w-full bg-white dark:bg-transparent rounded px-3 py-2 placeholder:capitalize" placeholder="name" required>
|
||||
</div>
|
||||
|
||||
<p v-if="form.errors.name" class="text-red-500 text-right lowercase first-letter:capitalize">{{ form.errors.name }}</p>
|
||||
@@ -250,7 +250,7 @@ onUnmounted(() => window.removeEventListener('keydown', esc))
|
||||
<div class="flex flex-col space-y-2">
|
||||
<div class="flex items-center space-x-2">
|
||||
<label for="username" class="w-1/3 lowercase first-letter:capitalize">username</label>
|
||||
<input ref="username" type="text" name="username" v-model="form.username" class="w-full bg-transparent rounded px-3 py-2 placeholder:capitalize" placeholder="username" required>
|
||||
<input ref="username" type="text" name="username" v-model="form.username" class="w-full bg-white dark:bg-transparent rounded px-3 py-2 placeholder:capitalize" placeholder="username" required>
|
||||
</div>
|
||||
|
||||
<p v-if="form.errors.username" class="text-red-500 text-right lowercase first-letter:capitalize">{{ form.errors.username }}</p>
|
||||
@@ -259,7 +259,7 @@ onUnmounted(() => window.removeEventListener('keydown', esc))
|
||||
<div class="flex flex-col space-y-2">
|
||||
<div class="flex items-center space-x-2">
|
||||
<label for="email" class="w-1/3 lowercase first-letter:capitalize">email</label>
|
||||
<input ref="email" type="email" name="email" v-model="form.email" class="w-full bg-transparent rounded px-3 py-2 placeholder:capitalize" placeholder="email" required>
|
||||
<input ref="email" type="email" name="email" v-model="form.email" class="w-full bg-white dark:bg-transparent rounded px-3 py-2 placeholder:capitalize" placeholder="email" required>
|
||||
</div>
|
||||
|
||||
<p v-if="form.errors.email" class="text-red-500 text-right lowercase first-letter:capitalize">{{ form.errors.email }}</p>
|
||||
@@ -268,7 +268,7 @@ onUnmounted(() => window.removeEventListener('keydown', esc))
|
||||
<div class="flex flex-col space-y-2">
|
||||
<div class="flex items-center space-x-2">
|
||||
<label for="password" class="w-1/3 lowercase first-letter:capitalize">password</label>
|
||||
<input ref="password" type="password" name="password" v-model="form.password" class="w-full bg-transparent rounded px-3 py-2 placeholder:capitalize" placeholder="password" :required="form.id === null">
|
||||
<input ref="password" type="password" name="password" v-model="form.password" class="w-full bg-white dark:bg-transparent rounded px-3 py-2 placeholder:capitalize" placeholder="password" :required="form.id === null">
|
||||
</div>
|
||||
|
||||
<p v-if="form.errors.password" class="text-red-500 text-right lowercase first-letter:capitalize">{{ form.errors.password }}</p>
|
||||
@@ -277,7 +277,7 @@ onUnmounted(() => window.removeEventListener('keydown', esc))
|
||||
<div class="flex flex-col space-y-2">
|
||||
<div class="flex items-center space-x-2">
|
||||
<label for="password_confirmation" class="w-1/3 lowercase first-letter:capitalize">password confirmation</label>
|
||||
<input ref="password_confirmation" type="password" name="password_confirmation" v-model="form.password_confirmation" class="w-full bg-transparent rounded px-3 py-2 placeholder:capitalize" placeholder="password confirmation" :required="form.id === null">
|
||||
<input ref="password_confirmation" type="password" name="password_confirmation" v-model="form.password_confirmation" class="w-full bg-white dark:bg-transparent rounded px-3 py-2 placeholder:capitalize" placeholder="password confirmation" :required="form.id === null">
|
||||
</div>
|
||||
|
||||
<p v-if="form.errors.password_confirmation" class="text-red-500 text-right lowercase first-letter:capitalize">{{ form.errors.password_confirmation }}</p>
|
||||
@@ -324,8 +324,8 @@ onUnmounted(() => window.removeEventListener('keydown', esc))
|
||||
</template>
|
||||
|
||||
<template #footer>
|
||||
<div class="flex items-center justify-end space-x-2 dark:bg-gray-800 px-2 py-1">
|
||||
<button type="submit" class="bg-green-600 hover:bg-green-700 rounded-md px-3 py-1 text-sm transition-all">
|
||||
<div class="flex items-center justify-end space-x-2 bg-gray-200 dark:bg-gray-800 px-2 py-1">
|
||||
<button type="submit" class="bg-green-600 hover:bg-green-700 rounded-md px-3 py-1 text-sm text-white transition-all">
|
||||
<div class="flex items-center space-x-1">
|
||||
<Icon name="check" />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user