增加用户信息页面

release
Jimmy Liow 2 years ago
parent ae4600bb94
commit cdf75c92c3

@ -19,6 +19,7 @@ import ReservationDetail from "@/views/reservation/Detail";
import ReservationPrint from "@/views/reservation/Print"; import ReservationPrint from "@/views/reservation/Print";
import ReservationNameCard from "@/views/reservation/NameCard"; import ReservationNameCard from "@/views/reservation/NameCard";
import ChangePassword from "@/views/account/ChangePassword"; import ChangePassword from "@/views/account/ChangePassword";
import AccountProfile from "@/views/account/Profile";
import FeedbackIndex from "@/views/feedback/Index"; import FeedbackIndex from "@/views/feedback/Index";
import FeedbackDetail from "@/views/feedback/Detail"; import FeedbackDetail from "@/views/feedback/Detail";
import NoticeIndex from "@/views/notice/Index"; import NoticeIndex from "@/views/notice/Index";
@ -47,6 +48,7 @@ const router = createBrowserRouter([
{ path: "reservation/:reservationId/print", element: <ReservationPrint />}, { path: "reservation/:reservationId/print", element: <ReservationPrint />},
{ path: "reservation/:reservationId/name-card", element: <ReservationNameCard />}, { path: "reservation/:reservationId/name-card", element: <ReservationNameCard />},
{ path: "account/change-password", element: <ChangePassword />}, { path: "account/change-password", element: <ChangePassword />},
{ path: "account/profile", element: <AccountProfile />},
{ path: "feedback", element: <FeedbackIndex />}, { path: "feedback", element: <FeedbackIndex />},
{ path: "feedback/:GRI_SN", element: <FeedbackDetail />}, { path: "feedback/:GRI_SN", element: <FeedbackDetail />},
{ path: "notice", element: <NoticeIndex />}, { path: "notice", element: <NoticeIndex />},

@ -17,9 +17,8 @@ const items = [
}, },
{ {
label: ( label: (
<a target="_blank" rel="noopener noreferrer" href="#">
Privacy <Link to="/account/profile">Profile</Link>
</a>
), ),
key: "1", key: "1",
}, },

@ -10,7 +10,6 @@ function ChangePassword() {
const [form] = Form.useForm(); const [form] = Form.useForm();
const onFinish = (values) => { const onFinish = (values) => {
console.info(values);
authStore.changeUserPassword(values.currentPassword, values.newPassword) authStore.changeUserPassword(values.currentPassword, values.newPassword)
.then(() => { .then(() => {
notification.success({ notification.success({
@ -50,7 +49,7 @@ function ChangePassword() {
onFinishFailed={onFinishFailed} onFinishFailed={onFinishFailed}
autoComplete="off" autoComplete="off"
> >
<Form.Item><Title level={3}>Change your password</Title></Form.Item> <Form.Item><Title level={2}>Change your password</Title></Form.Item>
<Form.Item <Form.Item
label="Current password" label="Current password"
name="currentPassword" name="currentPassword"

@ -0,0 +1,27 @@
import { Descriptions, Space, Form, Col, Row, Typography, App } from 'antd';
import { useStore } from '@/stores/StoreContext.js';
const { Title } = Typography;
function Profile() {
const { authStore } = useStore();
const { notification } = App.useApp();
return (
<Row>
<Col span={12} offset={6}>
<Descriptions title="User Profile" layout="vertical" column={2}>
<Descriptions.Item label="Username">Bruce Li</Descriptions.Item>
<Descriptions.Item label="Telephone">Tel:029-85360679 Mobile:13991970308/13310981198</Descriptions.Item>
<Descriptions.Item label="Email">lizhi@citsxa.com</Descriptions.Item>
<Descriptions.Item label="Company" span={2}>
XIAN CITS
</Descriptions.Item>
</Descriptions>
</Col>
</Row>
);
}
export default Profile;
Loading…
Cancel
Save