Rules fix + rules PUT rib
This commit is contained in:
parent
b2c9405ce1
commit
5f742dc6ea
@ -17,4 +17,5 @@ export enum AppRuleNames {
|
||||
deedTypes = "deed-types",
|
||||
offices = "offices",
|
||||
documents = "documents",
|
||||
rib = "rib",
|
||||
}
|
||||
|
@ -122,11 +122,20 @@ export default class BurgerModal extends React.Component<IProps, IState> {
|
||||
]}
|
||||
/>
|
||||
</Rules>
|
||||
<NavigationLink
|
||||
path={Module.getInstance().get().modules.pages.OfficesRib.props.path}
|
||||
text="Gestion du RIB"
|
||||
routesActive={[Module.getInstance().get().modules.pages.OfficesRib.props.path]}
|
||||
/>
|
||||
<Rules
|
||||
mode={RulesMode.NECESSARY}
|
||||
rules={[
|
||||
{
|
||||
action: AppRuleActions.update,
|
||||
name: AppRuleNames.rib,
|
||||
},
|
||||
]}>
|
||||
<NavigationLink
|
||||
path={Module.getInstance().get().modules.pages.OfficesRib.props.path}
|
||||
text="Gestion du RIB"
|
||||
routesActive={[Module.getInstance().get().modules.pages.OfficesRib.props.path]}
|
||||
/>
|
||||
</Rules>
|
||||
<NavigationLink path={Module.getInstance().get().modules.pages.MyAccount.props.path} text="Mon compte" />
|
||||
<NavigationLink target="_blank" path="/CGU_LeCoffre_io.pdf" text="CGU" />
|
||||
<div className={classes["separator"]} />
|
||||
|
@ -96,11 +96,20 @@ export default class ProfileModal extends React.Component<IProps, IState> {
|
||||
]}
|
||||
/>
|
||||
</Rules>
|
||||
<NavigationLink
|
||||
path={Module.getInstance().get().modules.pages.OfficesRib.props.path}
|
||||
text="Gestion du RIB"
|
||||
routesActive={[Module.getInstance().get().modules.pages.OfficesRib.props.path]}
|
||||
/>
|
||||
<Rules
|
||||
mode={RulesMode.NECESSARY}
|
||||
rules={[
|
||||
{
|
||||
action: AppRuleActions.update,
|
||||
name: AppRuleNames.rib,
|
||||
},
|
||||
]}>
|
||||
<NavigationLink
|
||||
path={Module.getInstance().get().modules.pages.OfficesRib.props.path}
|
||||
text="Gestion du RIB"
|
||||
routesActive={[Module.getInstance().get().modules.pages.OfficesRib.props.path]}
|
||||
/>
|
||||
</Rules>
|
||||
<NavigationLink target="_blank" path="/CGU_LeCoffre_io.pdf" text="CGU" />
|
||||
<div className={classes["separator"]} />
|
||||
<LogOutButton />
|
||||
|
@ -47,9 +47,17 @@ export default function RolesInformations(props: IProps) {
|
||||
|
||||
const rules = await Rules.getInstance().get({
|
||||
where: {
|
||||
namespace: "notary",
|
||||
OR: [
|
||||
{
|
||||
namespace: "notary",
|
||||
},
|
||||
{
|
||||
namespace: "collaborator",
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
if (!role) return;
|
||||
setRoleSelected(role);
|
||||
if (!role.rules) return;
|
||||
|
@ -1,5 +1,18 @@
|
||||
import { AppRuleActions, AppRuleNames } from "@Front/Api/Entities/rule";
|
||||
import Rules, { RulesMode } from "@Front/Components/Elements/Rules";
|
||||
import Rib from "@Front/Components/Layouts/Rib";
|
||||
|
||||
export default function Route() {
|
||||
return <Rib />;
|
||||
return (
|
||||
<Rules
|
||||
mode={RulesMode.NECESSARY}
|
||||
rules={[
|
||||
{
|
||||
action: AppRuleActions.update,
|
||||
name: AppRuleNames.rib,
|
||||
},
|
||||
]}>
|
||||
<Rib />
|
||||
</Rules>
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user