1.1.35 • Published 12 months ago
smartech-support v1.1.35
How To Install
Helpical React Components.
Include these components:
- Ticket List
- Ticket Create
- Ticket Reply
yarn add smartech-support
Hot To Use
1- Create a page in your app: (Tickets List)
Add MainTicket to this page:
import { MainTicket } from "smartech-support";
const Tickets = () => {
const nav = useNavigate();
const userEmail = '';
const currentDepartment = 'HELPICAL_DEPARTMENT_ID';
return (
<MainTicket
router={nav}
options={{
createRoute: "/tickets/create",
editRoute: "/tickets/",
userEmail: userEmail,
currentDepartment: currentDepartment,
}}
/>
);
};
export default Tickets;
2- Create a page for add ticket: add TicketCreate component like this:
import { useNavigate } from "react-router-dom";
import { TicketCreate } from "smartech-support";
import MainContainer from "@/components/container/MainContainer";
import { HELPICAL_DEPARTMENT_ID } from "@/utils/constants/configConstants";
import { useAccount } from "@/utils/hooks/useAuth";
const Ticket = () => {
const nav = useNavigate();
const { userDetail } = useAccount();
const userEmail = userDetail?.email;
const currentDepartment = HELPICAL_DEPARTMENT_ID;
const userProfile = {
email: userEmail,
firstName: userDetail?.first_name,
lastName: userDetail?.last_name,
id: userDetail?.mobile,
};
return (
<div>
<MainContainer>
<TicketCreate
router={nav}
options={{
routeList: "/tickets",
userProfile: userProfile,
currentDepartment: currentDepartment,
}}
/>
</MainContainer>
</div>
);
};
export default Ticket;
3- Create Reply page in your app:
import { useMatch, useNavigate } from "react-router-dom";
import { TicketReply as TicketReplyMain } from "smartech-support";
import MainContainer from "@/components/container/MainContainer";
import { HELPICAL_DEPARTMENT_ID } from "@/utils/constants/configConstants";
import { useAccount } from "@/utils/hooks/useAuth";
const TicketReply = () => {
const { userDetail } = useAccount();
const nav = useNavigate();
const replyId = useMatch("/tickets/:id")?.params?.id;
const selectedTicket = replyId;
const currentDepartment = HELPICAL_DEPARTMENT_ID;
const userProfile = {
email: userDetail?.email,
firstName: userDetail?.first_name,
lastName: userDetail?.last_name,
id: userDetail?.mobile,
};
return (
<div>
<MainContainer>
<TicketReplyMain
router={nav}
selectedTicket={selectedTicket}
options={{
currentDepartment: currentDepartment,
userProfile: userProfile,
}}
/>
</MainContainer>
</div>
);
};
export default TicketReply;
1.1.34
12 months ago
1.1.33
12 months ago
1.1.35
12 months ago
1.1.30
1 year ago
1.1.32
1 year ago
1.1.31
1 year ago
1.1.29
1 year ago
1.1.28
1 year ago
1.1.27
1 year ago
1.1.26
1 year ago
1.1.23
1 year ago
1.1.22
1 year ago
1.1.24
1 year ago
1.1.19
1 year ago
1.1.21
1 year ago
1.1.20
1 year ago
1.1.17
1 year ago
1.1.16
1 year ago
1.1.15
1 year ago
1.1.14
1 year ago
1.1.13
1 year ago
1.1.12
1 year ago
1.1.11
1 year ago
1.1.1
1 year ago
1.0.999
1 year ago
1.0.998
1 year ago
1.0.997
1 year ago
1.0.996
1 year ago
1.0.995
1 year ago
1.0.994
1 year ago
1.0.992
1 year ago
1.0.991
1 year ago
1.0.99
1 year ago
1.0.98
1 year ago
1.0.97
1 year ago
1.0.96
1 year ago
1.0.95
1 year ago
1.0.94
1 year ago
1.0.93
1 year ago
1.0.92
1 year ago
1.0.91
1 year ago
1.0.9
1 year ago
1.0.8
1 year ago
1.0.7
1 year ago
1.0.6
1 year ago
1.0.5
1 year ago
1.0.4
1 year ago
1.0.3
1 year ago
1.0.2
1 year ago
1.0.1
1 year ago