Compare commits
2 Commits
b22c9b9cc5
...
de351f0877
| Author | SHA1 | Date |
|---|---|---|
|
|
de351f0877 | |
|
|
2c94e91668 |
|
|
@ -149,8 +149,8 @@ Route::middleware('api')
|
|||
'prefix' => 'category',
|
||||
], function () {
|
||||
Route::get('/get-list-master', [CategoryController::class, 'getListMaster']);
|
||||
Route::get('/work-days', [CategoryController::class, 'workDays']);
|
||||
Route::put('/update-work-days', [CategoryController::class, 'updateWorkDays']);
|
||||
Route::get('/work-days', [CategoryController::class, 'workDays'])->middleware('check.permission:admin.hr');
|
||||
Route::put('/update-work-days', [CategoryController::class, 'updateWorkDays'])->middleware('check.permission:admin.hr');
|
||||
});
|
||||
|
||||
Route::group([
|
||||
|
|
|
|||
|
|
@ -146,8 +146,8 @@ const data = [
|
|||
link: '/organization-settings',
|
||||
label: 'Organization Settings',
|
||||
icon: IconSettings,
|
||||
group: 'admin',
|
||||
permissions: 'admin',
|
||||
group: 'other',
|
||||
permissions: 'admin,hr',
|
||||
},
|
||||
{
|
||||
link: '/profiles',
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ import { DatePickerInput } from '@mantine/dates'
|
|||
import { IconInfoCircle } from '@tabler/icons-react'
|
||||
import dayjs from 'dayjs'
|
||||
import customParseFormat from 'dayjs/plugin/customParseFormat'
|
||||
import { checkPermissionAdmin } from '@/rtk/localStorage'
|
||||
|
||||
dayjs.extend(customParseFormat)
|
||||
|
||||
|
|
@ -55,21 +56,21 @@ function OrganizationSettings() {
|
|||
<Tabs w="100%" value={activeTab} onChange={setActiveTab}>
|
||||
<Tabs.List>
|
||||
<Tabs.Tab value="work-day">Work Day Setting</Tabs.Tab>
|
||||
|
||||
{checkPermissionAdmin('admin') && (
|
||||
<Tabs.Tab value="technical">Technical Setting</Tabs.Tab>
|
||||
<Tabs.Tab value="third">Setting 3</Tabs.Tab>
|
||||
)}
|
||||
</Tabs.List>
|
||||
|
||||
<Tabs.Panel value="work-day" pt="xs">
|
||||
<WorkDaySettingTab />
|
||||
</Tabs.Panel>
|
||||
|
||||
{checkPermissionAdmin('admin') && (
|
||||
<Tabs.Panel value="technical" pt="xs">
|
||||
<TechnicalSettingTab />
|
||||
</Tabs.Panel>
|
||||
|
||||
<Tabs.Panel value="third" pt="xs">
|
||||
Setting 3
|
||||
</Tabs.Panel>
|
||||
)}
|
||||
</Tabs>
|
||||
</Box>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ const mainRoutes = [
|
|||
{
|
||||
path: '/organization-settings',
|
||||
element: (
|
||||
<ProtectedRoute mode="route" permission="admin">
|
||||
<ProtectedRoute mode="route" permission="admin,hr">
|
||||
<BasePage
|
||||
main={
|
||||
<>
|
||||
|
|
|
|||
Loading…
Reference in New Issue