Skip to content

Commit

Permalink
fix(exm): bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ariunzayarin committed Nov 20, 2023
1 parent 3a2aed8 commit 1ef2069
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 6 deletions.
2 changes: 1 addition & 1 deletion exm-web/app/(main)/page.tsx
Expand Up @@ -9,7 +9,7 @@ const RightSideBar = dynamic(
export default function IndexPage() {
return (
<>
<div className="flex h-full w-full flex-col">
<div className="flex h-full w-[62%] flex-col">
<Feed />
</div>
<div className="flex w-1/3 flex-col">
Expand Down
4 changes: 2 additions & 2 deletions exm-web/app/layout.tsx
Expand Up @@ -12,8 +12,8 @@ import { cn } from "@/lib/utils"
import { Toaster } from "@/components/ui/toaster"

export const metadata: Metadata = {
title: "exm",
description: "exm",
title: "Employee Experience Management",
description: "Employee Experience Management",
icons: {
icon: "/favicon.png",
shortcut: "/favicon.png",
Expand Down
4 changes: 2 additions & 2 deletions exm-web/modules/feed/component/List.tsx
Expand Up @@ -55,7 +55,7 @@ const List = ({ contentType }: { contentType: string }) => {
}

return (
<ScrollArea className="h-[calc(100vh-65px)] px-[25px]">
<div className="h-[calc(100vh-65px)] px-[25px] overflow-auto">
<FeedForm contentType={contentType} />
{showList(pinnedList)}
{showList(normalList)}
Expand All @@ -71,7 +71,7 @@ const List = ({ contentType }: { contentType: string }) => {
<LoadingCard />
</div>
)}
</ScrollArea>
</div>
)
}

Expand Down
26 changes: 25 additions & 1 deletion packages/plugin-exm-ui/src/containers/EditForm.tsx
Expand Up @@ -7,6 +7,8 @@ import { Alert } from '@erxes/ui/src/utils';
import EditForm from '../components/EditForm';
import { mutations } from '../graphql';
import { IExm } from '../types';
import { IButtonMutateProps } from '@erxes/ui/src/types';
import ButtonMutate from '@erxes/ui/src/components/ButtonMutate';

type Props = {
exm: IExm;
Expand All @@ -25,7 +27,29 @@ function EditFormContainer(props: Props) {
});
};

return <EditForm edit={edit} exm={props.exm} />;
const renderButton = ({
values,
isSubmitted,
callback,
object
}: IButtonMutateProps) => {
return (
<ButtonMutate
mutation={mutations.exmsEdit}
variables={values}
callback={callback}
refetchQueries={'exmGet'}
isSubmitted={isSubmitted}
type="submit"
icon="check-circle"
successMessage={`You successfully ${
object ? 'updated' : 'added'
} a exm`}
/>
);
};

return <EditForm edit={edit} exm={props.exm} renderButton={renderButton} />;
}

export default EditFormContainer;

0 comments on commit 1ef2069

Please sign in to comment.