Skip to content

Commit

Permalink
Merge pull request #63 from sj-distributor/update-feedback-click
Browse files Browse the repository at this point in the history
Update feedback click
  • Loading branch information
chenmeiling12 authored Nov 13, 2024
2 parents 99f2196 + 7519826 commit 7274772
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
32 changes: 16 additions & 16 deletions web/src/pages/feedback/component/feedback-list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,24 +82,10 @@ export const FeedbackList = () => {
dataIndex: "exceptionReason",
key: "exceptionReason",
width: 308,
render: (text: string, record: IRecordItem) => {
render: (text: string) => {
return (
<Tooltip title={text}>
<div
className="cursor-pointer line-clamp-2"
onClick={() => {
if (pagePermission.canViewDetailFeedback) {
navigate(`/warning/${record.id}`, {
state: {
status: IStatusType.Verifed,
record: record,
},
});
}
}}
>
{text}
</div>
<div className="cursor-pointer line-clamp-2">{text}</div>
</Tooltip>
);
},
Expand Down Expand Up @@ -154,6 +140,20 @@ export const FeedbackList = () => {
columns={columns}
scroll={{ x: "100%" }}
pagination={false}
onRow={(record) => {
return {
onClick: () => {
if (pagePermission.canViewDetailFeedback) {
navigate(`/warning/${record.id}`, {
state: {
status: IStatusType.Verifed,
record: record,
},
});
}
},
};
}}
/>
</div>
<Pagination
Expand Down
4 changes: 3 additions & 1 deletion web/src/services/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ api.interceptors.response.use(
},
(error) => {
if (error.response.status === 401) {
message.error("沒權限", 1, () => {
localStorage.removeItem((window as any).appsettings?.tokenKey);

message.error("登录已过期,请重新登录", 1, () => {
window.location.reload();
});
} else {
Expand Down

0 comments on commit 7274772

Please sign in to comment.