|
|
@@ -83,7 +83,7 @@ const QrCodeHandleSearch: React.FC<Props> = ({ users, printerCombo }) => { |
|
|
const searchCriteria: Criterion<SearchParamNames>[] = useMemo( |
|
|
const searchCriteria: Criterion<SearchParamNames>[] = useMemo( |
|
|
() => [ |
|
|
() => [ |
|
|
{ |
|
|
{ |
|
|
label: t("Username"), |
|
|
|
|
|
|
|
|
label: t("User"), |
|
|
paramName: "username", |
|
|
paramName: "username", |
|
|
type: "text", |
|
|
type: "text", |
|
|
}, |
|
|
}, |
|
|
@@ -223,6 +223,7 @@ const QrCodeHandleSearch: React.FC<Props> = ({ users, printerCombo }) => { |
|
|
{ |
|
|
{ |
|
|
name: "id", |
|
|
name: "id", |
|
|
label: "", |
|
|
label: "", |
|
|
|
|
|
sx: { width: "50px", minWidth: "50px" }, |
|
|
renderCell: (params) => ( |
|
|
renderCell: (params) => ( |
|
|
<Checkbox |
|
|
<Checkbox |
|
|
checked={checkboxIds.includes(params.id)} |
|
|
checked={checkboxIds.includes(params.id)} |
|
|
@@ -233,28 +234,27 @@ const QrCodeHandleSearch: React.FC<Props> = ({ users, printerCombo }) => { |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
name: "username", |
|
|
name: "username", |
|
|
label: t("Username"), |
|
|
|
|
|
|
|
|
label: t("User"), |
|
|
align: "left", |
|
|
align: "left", |
|
|
headerAlign: "left", |
|
|
headerAlign: "left", |
|
|
|
|
|
sx: { width: "150px", minWidth: "150px" }, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
name: "staffNo", |
|
|
|
|
|
label: t("staffNo"), |
|
|
|
|
|
|
|
|
name: "name", |
|
|
|
|
|
label: t("name"), |
|
|
align: "left", |
|
|
align: "left", |
|
|
headerAlign: "left", |
|
|
headerAlign: "left", |
|
|
|
|
|
sx: { width: "150px", minWidth: "150px" }, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
name: "staffNo", |
|
|
name: "staffNo", |
|
|
label: t("qrcode"), |
|
|
|
|
|
align: "center", |
|
|
|
|
|
headerAlign: "center", |
|
|
|
|
|
onClick: async (user: UserResult) => { |
|
|
|
|
|
await showPdfPreview([user.id]); |
|
|
|
|
|
}, |
|
|
|
|
|
buttonIcon: <QrCodeIcon />, |
|
|
|
|
|
|
|
|
label: t("staffNo"), |
|
|
|
|
|
align: "left", |
|
|
|
|
|
headerAlign: "left", |
|
|
|
|
|
sx: { width: "150px", minWidth: "150px" }, |
|
|
}, |
|
|
}, |
|
|
], |
|
|
], |
|
|
[t, checkboxIds, handleSelectUser, showPdfPreview], |
|
|
|
|
|
|
|
|
[t, checkboxIds, handleSelectUser], |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
const onReset = useCallback(() => { |
|
|
const onReset = useCallback(() => { |
|
|
|