mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 06:40:31 +00:00
feat: add roles permission schema.
This commit is contained in:
@@ -25,7 +25,7 @@ export default function RolesFormContent() {
|
|||||||
const handleCloseClick = () => {
|
const handleCloseClick = () => {
|
||||||
history.go(-1);
|
history.go(-1);
|
||||||
};
|
};
|
||||||
|
console.log(values, 'XX');
|
||||||
return (
|
return (
|
||||||
<Form>
|
<Form>
|
||||||
{/* ---------- name ---------- */}
|
{/* ---------- name ---------- */}
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
export const mapperPermissionSchema = (data) => {
|
export const mapperPermissionSchema = ({ permissions }) => {
|
||||||
return [data].map(({ permissions }) =>
|
return Object.keys(permissions).map((index) => {
|
||||||
Object.keys(permissions).map((item) => {
|
const [value, key] = index.split('/');
|
||||||
const [value, key] = item.split('/');
|
|
||||||
return {
|
return {
|
||||||
subject: value,
|
subject: value,
|
||||||
ability: key,
|
ability: key,
|
||||||
value: permissions[item],
|
value: permissions[index],
|
||||||
};
|
};
|
||||||
}),
|
});
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1476,5 +1476,5 @@
|
|||||||
"roles.label.role_name":"Role name",
|
"roles.label.role_name":"Role name",
|
||||||
"sidebar.transactions_locaking":"Transactions Locaking",
|
"sidebar.transactions_locaking":"Transactions Locaking",
|
||||||
"transactions_locking.dialog.label":"Transactions locking",
|
"transactions_locking.dialog.label":"Transactions locking",
|
||||||
"roles.permisssion_schema.success_message":"The given role hsa been created successfully"
|
"roles.permisssion_schema.success_message":"The role has been created successfully."
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user