Merge pull request 'Fix some issues' (#6) from ajanin into cicd
All checks were successful
Build and Push to Registry / build-and-push (push) Successful in 3m52s
All checks were successful
Build and Push to Registry / build-and-push (push) Successful in 3m52s
Reviewed-on: #6
This commit is contained in:
commit
1a397a8a5d
@ -36,14 +36,14 @@ export default function DefaultCollaboratorDashboard(props: IProps) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const user: any = UserStore.instance.getUser();
|
const user: any = UserStore.instance.getUser();
|
||||||
const officeUid: string = user.office.uid;
|
const officeId: string = user.office.uid;
|
||||||
|
|
||||||
CollaboratorService.getCollaborators().then((processes: any[]) => {
|
CollaboratorService.getCollaborators().then((processes: any[]) => {
|
||||||
if (processes.length > 0) {
|
if (processes.length > 0) {
|
||||||
let collaborators: any[] = processes.map((process: any) => process.processData);
|
let collaborators: any[] = processes.map((process: any) => process.processData);
|
||||||
|
|
||||||
// FilterBy office.uid
|
// FilterBy office.uid
|
||||||
collaborators = collaborators.filter((collaborator: any) => collaborator.office.uid === officeUid);
|
collaborators = collaborators.filter((collaborator: any) => collaborator.office.uid === officeId);
|
||||||
|
|
||||||
setCollaborators(collaborators);
|
setCollaborators(collaborators);
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ import JwtService from "@Front/Services/JwtService/JwtService";
|
|||||||
import { DocumentType } from "le-coffre-resources/dist/Notary";
|
import { DocumentType } from "le-coffre-resources/dist/Notary";
|
||||||
|
|
||||||
import DocumentTypeService from "src/common/Api/LeCoffreApi/sdk/DocumentTypeService";
|
import DocumentTypeService from "src/common/Api/LeCoffreApi/sdk/DocumentTypeService";
|
||||||
|
import UserStore from "@Front/Stores/UserStore";
|
||||||
|
|
||||||
type IProps = IPropsDashboardWithList;
|
type IProps = IPropsDashboardWithList;
|
||||||
|
|
||||||
@ -15,11 +16,8 @@ export default function DefaultDocumentTypeDashboard(props: IProps) {
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { documentTypeUid } = router.query;
|
const { documentTypeUid } = router.query;
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const jwt = JwtService.getInstance().decodeJwt();
|
const user: any = UserStore.instance.getUser();
|
||||||
if (!jwt) return;
|
const officeId: string = user.office.uid;
|
||||||
|
|
||||||
// TODO: review
|
|
||||||
const officeId = 'demo_notary_office_id'; // jwt.office_Id;
|
|
||||||
|
|
||||||
DocumentTypeService.getDocumentTypes().then((processes: any[]) => {
|
DocumentTypeService.getDocumentTypes().then((processes: any[]) => {
|
||||||
if (processes.length > 0) {
|
if (processes.length > 0) {
|
||||||
|
@ -16,6 +16,7 @@ import classes from "./classes.module.scss";
|
|||||||
|
|
||||||
import DocumentTypeService from "src/common/Api/LeCoffreApi/sdk/DocumentTypeService";
|
import DocumentTypeService from "src/common/Api/LeCoffreApi/sdk/DocumentTypeService";
|
||||||
import LoaderService from "src/common/Api/LeCoffreApi/sdk/Loader/LoaderService";
|
import LoaderService from "src/common/Api/LeCoffreApi/sdk/Loader/LoaderService";
|
||||||
|
import UserStore from "@Front/Stores/UserStore";
|
||||||
|
|
||||||
type IProps = {};
|
type IProps = {};
|
||||||
export default function DocumentTypesCreate(props: IProps) {
|
export default function DocumentTypesCreate(props: IProps) {
|
||||||
@ -25,11 +26,8 @@ export default function DocumentTypesCreate(props: IProps) {
|
|||||||
const onSubmitHandler = useCallback(
|
const onSubmitHandler = useCallback(
|
||||||
async (e: React.FormEvent<HTMLFormElement> | null, values: { [key: string]: string }) => {
|
async (e: React.FormEvent<HTMLFormElement> | null, values: { [key: string]: string }) => {
|
||||||
try {
|
try {
|
||||||
const jwt = JwtService.getInstance().decodeJwt();
|
const user: any = UserStore.instance.getUser();
|
||||||
if (!jwt) return;
|
const officeId: string = user.office.uid;
|
||||||
|
|
||||||
// TODO: review
|
|
||||||
const officeId = 'demo_notary_office_id'; // jwt.office_Id;
|
|
||||||
|
|
||||||
const documentFormModel = DocumentType.hydrate<DocumentType>({
|
const documentFormModel = DocumentType.hydrate<DocumentType>({
|
||||||
...values,
|
...values,
|
||||||
|
@ -19,6 +19,7 @@ import { ValidationError } from "class-validator";
|
|||||||
|
|
||||||
import RoleService from "src/common/Api/LeCoffreApi/sdk/RoleService";
|
import RoleService from "src/common/Api/LeCoffreApi/sdk/RoleService";
|
||||||
import LoaderService from "src/common/Api/LeCoffreApi/sdk/Loader/LoaderService";
|
import LoaderService from "src/common/Api/LeCoffreApi/sdk/Loader/LoaderService";
|
||||||
|
import UserStore from "@Front/Stores/UserStore";
|
||||||
|
|
||||||
type IProps = {};
|
type IProps = {};
|
||||||
export default function RolesCreate(props: IProps) {
|
export default function RolesCreate(props: IProps) {
|
||||||
@ -29,10 +30,8 @@ export default function RolesCreate(props: IProps) {
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const onSubmitHandler = useCallback(
|
const onSubmitHandler = useCallback(
|
||||||
async (e: React.FormEvent<HTMLFormElement> | null, values: { [key: string]: string }) => {
|
async (e: React.FormEvent<HTMLFormElement> | null, values: { [key: string]: string }) => {
|
||||||
const jwt = JwtService.getInstance().decodeJwt();
|
const user: any = UserStore.instance.getUser();
|
||||||
|
const officeId: string = user.office.uid;
|
||||||
// TODO: review
|
|
||||||
const officeId = 'demo_notary_office_id'; //jwt?.office_Id;
|
|
||||||
|
|
||||||
const officeRole = OfficeRole.hydrate<OfficeRole>({
|
const officeRole = OfficeRole.hydrate<OfficeRole>({
|
||||||
name: values["name"],
|
name: values["name"],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user