Autosave: 20260312-212244
This commit is contained in:
parent
c30124f01e
commit
7b829087d9
0
.perm_test_apache
Normal file
0
.perm_test_apache
Normal file
0
.perm_test_exec
Normal file
0
.perm_test_exec
Normal file
32
backend/src/db/migrations/1773330455690.js
Normal file
32
backend/src/db/migrations/1773330455690.js
Normal file
@ -0,0 +1,32 @@
|
||||
module.exports = {
|
||||
async up(queryInterface, Sequelize) {
|
||||
await queryInterface.createTable("usersCustom_permissionsPermissions", {
|
||||
id: {
|
||||
type: Sequelize.DataTypes.UUID,
|
||||
defaultValue: Sequelize.DataTypes.UUIDV4,
|
||||
primaryKey: true,
|
||||
},
|
||||
users_custom_permissionsId: {
|
||||
type: Sequelize.DataTypes.UUID,
|
||||
references: {
|
||||
model: "users",
|
||||
key: "id",
|
||||
},
|
||||
onDelete: "CASCADE",
|
||||
},
|
||||
permissionId: {
|
||||
type: Sequelize.DataTypes.UUID,
|
||||
references: {
|
||||
model: "permissions",
|
||||
key: "id",
|
||||
},
|
||||
onDelete: "CASCADE",
|
||||
},
|
||||
createdAt: { type: Sequelize.DataTypes.DATE },
|
||||
updatedAt: { type: Sequelize.DataTypes.DATE },
|
||||
});
|
||||
},
|
||||
async down(queryInterface, Sequelize) {
|
||||
await queryInterface.dropTable("usersCustom_permissionsPermissions");
|
||||
}
|
||||
};
|
||||
1
fix.sql
Normal file
1
fix.sql
Normal file
@ -0,0 +1 @@
|
||||
ALTER TABLE "usersCustom_permissionsPermissions" ADD COLUMN "permissionId" UUID REFERENCES "permissions"(id);
|
||||
@ -8,6 +8,17 @@ const menuAside: MenuAsideItem[] = [
|
||||
label: 'Dashboard',
|
||||
},
|
||||
|
||||
{
|
||||
href: '/log-work',
|
||||
label: 'Log Work',
|
||||
icon: icon.mdiPencil,
|
||||
},
|
||||
{
|
||||
href: '/my-logs',
|
||||
label: 'My Logs',
|
||||
icon: icon.mdiViewList,
|
||||
},
|
||||
|
||||
{
|
||||
href: '/users/users-list',
|
||||
label: 'Users',
|
||||
@ -74,9 +85,7 @@ const menuAside: MenuAsideItem[] = [
|
||||
},
|
||||
{
|
||||
href: '/job_logs/job_logs-list',
|
||||
label: 'Job logs',
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
label: 'All Job Logs',
|
||||
icon: 'mdiClipboardTextClock' in icon ? icon['mdiClipboardTextClock' as keyof typeof icon] : icon.mdiTable ?? icon.mdiTable,
|
||||
permissions: 'READ_JOB_LOGS'
|
||||
},
|
||||
|
||||
32
frontend/src/pages/log-work.tsx
Normal file
32
frontend/src/pages/log-work.tsx
Normal file
@ -0,0 +1,32 @@
|
||||
import { mdiPencil, mdiChartTimelineVariant } from '@mdi/js';
|
||||
import Head from 'next/head';
|
||||
import React, { ReactElement } from 'react';
|
||||
import CardBox from '../components/CardBox';
|
||||
import LayoutAuthenticated from '../layouts/Authenticated';
|
||||
import SectionMain from '../components/SectionMain';
|
||||
import SectionTitleLineWithButton from '../components/SectionTitleLineWithButton';
|
||||
import { getPageTitle } from '../config';
|
||||
|
||||
const LogWorkPage = () => {
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>{getPageTitle('Log Work')}</title>
|
||||
</Head>
|
||||
<SectionMain>
|
||||
<SectionTitleLineWithButton icon={mdiPencil} title="Log Work" main>
|
||||
{''}
|
||||
</SectionTitleLineWithButton>
|
||||
<CardBox>
|
||||
<p>Work log form goes here.</p>
|
||||
</CardBox>
|
||||
</SectionMain>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
LogWorkPage.getLayout = function getLayout(page: ReactElement) {
|
||||
return <LayoutAuthenticated>{page}</LayoutAuthenticated>;
|
||||
};
|
||||
|
||||
export default LogWorkPage;
|
||||
32
frontend/src/pages/my-logs.tsx
Normal file
32
frontend/src/pages/my-logs.tsx
Normal file
@ -0,0 +1,32 @@
|
||||
import { mdiViewList, mdiChartTimelineVariant } from '@mdi/js';
|
||||
import Head from 'next/head';
|
||||
import React, { ReactElement } from 'react';
|
||||
import CardBox from '../components/CardBox';
|
||||
import LayoutAuthenticated from '../layouts/Authenticated';
|
||||
import SectionMain from '../components/SectionMain';
|
||||
import SectionTitleLineWithButton from '../components/SectionTitleLineWithButton';
|
||||
import { getPageTitle } from '../config';
|
||||
|
||||
const MyLogsPage = () => {
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>{getPageTitle('My Logs')}</title>
|
||||
</Head>
|
||||
<SectionMain>
|
||||
<SectionTitleLineWithButton icon={mdiViewList} title="My Logs" main>
|
||||
{''}
|
||||
</SectionTitleLineWithButton>
|
||||
<CardBox>
|
||||
<p>List of my job logs.</p>
|
||||
</CardBox>
|
||||
</SectionMain>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
MyLogsPage.getLayout = function getLayout(page: ReactElement) {
|
||||
return <LayoutAuthenticated>{page}</LayoutAuthenticated>;
|
||||
};
|
||||
|
||||
export default MyLogsPage;
|
||||
Loading…
x
Reference in New Issue
Block a user