Compare commits
No commits in common. "e4657cc69222af14f1c061a1298fd9a3bd12927b" and "a2a1c5be5bf00d3769b0fefc11eac9ee3449ad5b" have entirely different histories.
e4657cc692
...
a2a1c5be5b
@ -170,7 +170,7 @@ const InvoiceInfo = () => {
|
|||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={invoiceId}
|
_id={invoiceId}
|
||||||
objectType='invoice'
|
objectType='invoice'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -163,7 +163,7 @@ const PaymentInfo = () => {
|
|||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={paymentId}
|
_id={paymentId}
|
||||||
objectType='payment'
|
objectType='payment'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -123,13 +123,11 @@ const TaxRecordInfo = () => {
|
|||||||
}}
|
}}
|
||||||
editLoading={objectFormState.editLoading}
|
editLoading={objectFormState.editLoading}
|
||||||
formValid={objectFormState.formValid}
|
formValid={objectFormState.formValid}
|
||||||
disabled={
|
disabled={objectFormState.beingEditedByOther || objectFormState.loading}
|
||||||
objectFormState.beingEditedByOther || objectFormState.loading
|
|
||||||
}
|
|
||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={taxRecordId}
|
_id={taxRecordId}
|
||||||
objectType='taxRecord'
|
objectType='taxRecord'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -127,7 +127,7 @@ const FilamentStockInfo = () => {
|
|||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={filamentStockId}
|
_id={filamentStockId}
|
||||||
objectType='filamentStock'
|
objectType='filamentStock'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -122,13 +122,11 @@ const OrderItemInfo = () => {
|
|||||||
}}
|
}}
|
||||||
editLoading={objectFormState.editLoading}
|
editLoading={objectFormState.editLoading}
|
||||||
formValid={objectFormState.formValid}
|
formValid={objectFormState.formValid}
|
||||||
disabled={
|
disabled={objectFormState.beingEditedByOther || objectFormState.loading}
|
||||||
objectFormState.beingEditedByOther || objectFormState.loading
|
|
||||||
}
|
|
||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={orderItemId}
|
_id={orderItemId}
|
||||||
objectType='orderItem'
|
objectType='orderItem'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -137,7 +137,7 @@ const PartStockInfo = () => {
|
|||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={partStockId}
|
_id={partStockId}
|
||||||
objectType='partStock'
|
objectType='partStock'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -164,7 +164,7 @@ const ProductStockInfo = () => {
|
|||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={productStockId}
|
_id={productStockId}
|
||||||
objectType='productStock'
|
objectType='productStock'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -197,7 +197,7 @@ const PurchaseOrderInfo = () => {
|
|||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={purchaseOrderId}
|
_id={purchaseOrderId}
|
||||||
objectType='purchaseOrder'
|
objectType='purchaseOrder'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -158,13 +158,11 @@ const PurchaseOrderInfo = () => {
|
|||||||
}}
|
}}
|
||||||
editLoading={objectFormState.editLoading}
|
editLoading={objectFormState.editLoading}
|
||||||
formValid={objectFormState.formValid}
|
formValid={objectFormState.formValid}
|
||||||
disabled={
|
disabled={objectFormState.beingEditedByOther || objectFormState.loading}
|
||||||
objectFormState.beingEditedByOther || objectFormState.loading
|
|
||||||
}
|
|
||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={purchaseOrderId}
|
_id={purchaseOrderId}
|
||||||
objectType='purchaseOrder'
|
objectType='purchaseOrder'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -147,13 +147,11 @@ const ShipmentInfo = () => {
|
|||||||
}}
|
}}
|
||||||
editLoading={objectFormState.editLoading}
|
editLoading={objectFormState.editLoading}
|
||||||
formValid={objectFormState.formValid}
|
formValid={objectFormState.formValid}
|
||||||
disabled={
|
disabled={objectFormState.beingEditedByOther || objectFormState.loading}
|
||||||
objectFormState.beingEditedByOther || objectFormState.loading
|
|
||||||
}
|
|
||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={shipmentId}
|
_id={shipmentId}
|
||||||
objectType='shipment'
|
objectType='shipment'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -125,13 +125,11 @@ const StockAuditInfo = () => {
|
|||||||
}}
|
}}
|
||||||
editLoading={objectFormState.editLoading}
|
editLoading={objectFormState.editLoading}
|
||||||
formValid={objectFormState.formValid}
|
formValid={objectFormState.formValid}
|
||||||
disabled={
|
disabled={objectFormState.beingEditedByOther || objectFormState.loading}
|
||||||
objectFormState.beingEditedByOther || objectFormState.loading
|
|
||||||
}
|
|
||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={stockAuditId}
|
_id={stockAuditId}
|
||||||
objectType='stockAudit'
|
objectType='stockAudit'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -126,13 +126,11 @@ const StockLocationInfo = () => {
|
|||||||
}}
|
}}
|
||||||
editLoading={objectFormState.editLoading}
|
editLoading={objectFormState.editLoading}
|
||||||
formValid={objectFormState.formValid}
|
formValid={objectFormState.formValid}
|
||||||
disabled={
|
disabled={objectFormState.beingEditedByOther || objectFormState.loading}
|
||||||
objectFormState.beingEditedByOther || objectFormState.loading
|
|
||||||
}
|
|
||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={stockLocationId}
|
_id={stockLocationId}
|
||||||
objectType='stockLocation'
|
objectType='stockLocation'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -152,7 +152,7 @@ const StockTransferInfo = () => {
|
|||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={stockTransferId}
|
_id={stockTransferId}
|
||||||
objectType='stockTransfer'
|
objectType='stockTransfer'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -134,7 +134,7 @@ const AppPasswordInfo = () => {
|
|||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={appPasswordId}
|
_id={appPasswordId}
|
||||||
objectType='appPassword'
|
objectType='appPassword'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -125,13 +125,11 @@ const CourierServiceInfo = () => {
|
|||||||
}}
|
}}
|
||||||
editLoading={objectFormState.editLoading}
|
editLoading={objectFormState.editLoading}
|
||||||
formValid={objectFormState.formValid}
|
formValid={objectFormState.formValid}
|
||||||
disabled={
|
disabled={objectFormState.beingEditedByOther || objectFormState.loading}
|
||||||
objectFormState.beingEditedByOther || objectFormState.loading
|
|
||||||
}
|
|
||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={courierServiceId}
|
_id={courierServiceId}
|
||||||
objectType='courierService'
|
objectType='courierService'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -121,13 +121,11 @@ const CourierInfo = () => {
|
|||||||
}}
|
}}
|
||||||
editLoading={objectFormState.editLoading}
|
editLoading={objectFormState.editLoading}
|
||||||
formValid={objectFormState.formValid}
|
formValid={objectFormState.formValid}
|
||||||
disabled={
|
disabled={objectFormState.beingEditedByOther || objectFormState.loading}
|
||||||
objectFormState.beingEditedByOther || objectFormState.loading
|
|
||||||
}
|
|
||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={courierId}
|
_id={courierId}
|
||||||
objectType='courier'
|
objectType='courier'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -122,13 +122,11 @@ const DocumentJobInfo = () => {
|
|||||||
}}
|
}}
|
||||||
editLoading={objectFormState.editLoading}
|
editLoading={objectFormState.editLoading}
|
||||||
formValid={objectFormState.formValid}
|
formValid={objectFormState.formValid}
|
||||||
disabled={
|
disabled={objectFormState.beingEditedByOther || objectFormState.loading}
|
||||||
objectFormState.beingEditedByOther || objectFormState.loading
|
|
||||||
}
|
|
||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={documentJobId}
|
_id={documentJobId}
|
||||||
objectType='documentJob'
|
objectType='documentJob'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -136,7 +136,7 @@ const DocumentPrinterInfo = () => {
|
|||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={documentPrinterId}
|
_id={documentPrinterId}
|
||||||
objectType='documentPrinter'
|
objectType='documentPrinter'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -128,7 +128,7 @@ const DocumentSizeInfo = () => {
|
|||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={documentSizeId}
|
_id={documentSizeId}
|
||||||
objectType='documentSize'
|
objectType='documentSize'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -133,7 +133,7 @@ const DocumentTemplateInfo = () => {
|
|||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={documentTemplateId}
|
_id={documentTemplateId}
|
||||||
objectType='documentTemplate'
|
objectType='documentTemplate'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -120,13 +120,11 @@ const FilamentSkuInfo = () => {
|
|||||||
}}
|
}}
|
||||||
editLoading={objectFormState.editLoading}
|
editLoading={objectFormState.editLoading}
|
||||||
formValid={objectFormState.formValid}
|
formValid={objectFormState.formValid}
|
||||||
disabled={
|
disabled={objectFormState.beingEditedByOther || objectFormState.loading}
|
||||||
objectFormState.beingEditedByOther || objectFormState.loading
|
|
||||||
}
|
|
||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={filamentSkuId}
|
_id={filamentSkuId}
|
||||||
objectType='filamentSku'
|
objectType='filamentSku'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -141,13 +141,11 @@ const FilamentInfo = () => {
|
|||||||
}}
|
}}
|
||||||
editLoading={objectFormState.editLoading}
|
editLoading={objectFormState.editLoading}
|
||||||
formValid={objectFormState.formValid}
|
formValid={objectFormState.formValid}
|
||||||
disabled={
|
disabled={objectFormState.beingEditedByOther || objectFormState.loading}
|
||||||
objectFormState.beingEditedByOther || objectFormState.loading
|
|
||||||
}
|
|
||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={filamentId}
|
_id={filamentId}
|
||||||
objectType='filament'
|
objectType='filament'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -142,7 +142,7 @@ const FileInfo = () => {
|
|||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={fileId}
|
_id={fileId}
|
||||||
objectType='file'
|
objectType='file'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -137,13 +137,11 @@ const HostInfo = () => {
|
|||||||
}}
|
}}
|
||||||
editLoading={objectFormState.editLoading}
|
editLoading={objectFormState.editLoading}
|
||||||
formValid={objectFormState.formValid}
|
formValid={objectFormState.formValid}
|
||||||
disabled={
|
disabled={objectFormState.beingEditedByOther || objectFormState.loading}
|
||||||
objectFormState.beingEditedByOther || objectFormState.loading
|
|
||||||
}
|
|
||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={hostId}
|
_id={hostId}
|
||||||
objectType='host'
|
objectType='host'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -123,13 +123,11 @@ const MaterialInfo = () => {
|
|||||||
}}
|
}}
|
||||||
editLoading={objectFormState.editLoading}
|
editLoading={objectFormState.editLoading}
|
||||||
formValid={objectFormState.formValid}
|
formValid={objectFormState.formValid}
|
||||||
disabled={
|
disabled={objectFormState.beingEditedByOther || objectFormState.loading}
|
||||||
objectFormState.beingEditedByOther || objectFormState.loading
|
|
||||||
}
|
|
||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={materialId}
|
_id={materialId}
|
||||||
objectType='material'
|
objectType='material'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -111,13 +111,11 @@ const NoteTypeInfo = () => {
|
|||||||
}}
|
}}
|
||||||
editLoading={objectFormState.editLoading}
|
editLoading={objectFormState.editLoading}
|
||||||
formValid={objectFormState.formValid}
|
formValid={objectFormState.formValid}
|
||||||
disabled={
|
disabled={objectFormState.beingEditedByOther || objectFormState.loading}
|
||||||
objectFormState.beingEditedByOther || objectFormState.loading
|
|
||||||
}
|
|
||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={noteTypeId}
|
_id={noteTypeId}
|
||||||
objectType='noteType'
|
objectType='noteType'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -126,13 +126,11 @@ const NoteInfo = () => {
|
|||||||
}}
|
}}
|
||||||
editLoading={objectFormState.editLoading}
|
editLoading={objectFormState.editLoading}
|
||||||
formValid={objectFormState.formValid}
|
formValid={objectFormState.formValid}
|
||||||
disabled={
|
disabled={objectFormState.beingEditedByOther || objectFormState.loading}
|
||||||
objectFormState.beingEditedByOther || objectFormState.loading
|
|
||||||
}
|
|
||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={noteId}
|
_id={noteId}
|
||||||
objectType='note'
|
objectType='note'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -115,13 +115,11 @@ const PartSkuInfo = () => {
|
|||||||
}}
|
}}
|
||||||
editLoading={objectFormState.editLoading}
|
editLoading={objectFormState.editLoading}
|
||||||
formValid={objectFormState.formValid}
|
formValid={objectFormState.formValid}
|
||||||
disabled={
|
disabled={objectFormState.beingEditedByOther || objectFormState.loading}
|
||||||
objectFormState.beingEditedByOther || objectFormState.loading
|
|
||||||
}
|
|
||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={partSkuId}
|
_id={partSkuId}
|
||||||
objectType='partSku'
|
objectType='partSku'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -121,13 +121,11 @@ const PartInfo = () => {
|
|||||||
}}
|
}}
|
||||||
editLoading={objectFormState.editLoading}
|
editLoading={objectFormState.editLoading}
|
||||||
formValid={objectFormState.formValid}
|
formValid={objectFormState.formValid}
|
||||||
disabled={
|
disabled={objectFormState.beingEditedByOther || objectFormState.loading}
|
||||||
objectFormState.beingEditedByOther || objectFormState.loading
|
|
||||||
}
|
|
||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={partId}
|
_id={partId}
|
||||||
objectType='part'
|
objectType='part'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -120,13 +120,11 @@ const ProductCategoryInfo = () => {
|
|||||||
}}
|
}}
|
||||||
editLoading={objectFormState.editLoading}
|
editLoading={objectFormState.editLoading}
|
||||||
formValid={objectFormState.formValid}
|
formValid={objectFormState.formValid}
|
||||||
disabled={
|
disabled={objectFormState.beingEditedByOther || objectFormState.loading}
|
||||||
objectFormState.beingEditedByOther || objectFormState.loading
|
|
||||||
}
|
|
||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={productCategoryId}
|
_id={productCategoryId}
|
||||||
objectType='productCategory'
|
objectType='productCategory'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -123,13 +123,11 @@ const ProductSkuInfo = () => {
|
|||||||
}}
|
}}
|
||||||
editLoading={objectFormState.editLoading}
|
editLoading={objectFormState.editLoading}
|
||||||
formValid={objectFormState.formValid}
|
formValid={objectFormState.formValid}
|
||||||
disabled={
|
disabled={objectFormState.beingEditedByOther || objectFormState.loading}
|
||||||
objectFormState.beingEditedByOther || objectFormState.loading
|
|
||||||
}
|
|
||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={productSkuId}
|
_id={productSkuId}
|
||||||
objectType='productSku'
|
objectType='productSku'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -121,13 +121,11 @@ const ProductInfo = () => {
|
|||||||
}}
|
}}
|
||||||
editLoading={objectFormState.editLoading}
|
editLoading={objectFormState.editLoading}
|
||||||
formValid={objectFormState.formValid}
|
formValid={objectFormState.formValid}
|
||||||
disabled={
|
disabled={objectFormState.beingEditedByOther || objectFormState.loading}
|
||||||
objectFormState.beingEditedByOther || objectFormState.loading
|
|
||||||
}
|
|
||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={productId}
|
_id={productId}
|
||||||
objectType='product'
|
objectType='product'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -120,13 +120,11 @@ const TaxRateInfo = () => {
|
|||||||
}}
|
}}
|
||||||
editLoading={objectFormState.editLoading}
|
editLoading={objectFormState.editLoading}
|
||||||
formValid={objectFormState.formValid}
|
formValid={objectFormState.formValid}
|
||||||
disabled={
|
disabled={objectFormState.beingEditedByOther || objectFormState.loading}
|
||||||
objectFormState.beingEditedByOther || objectFormState.loading
|
|
||||||
}
|
|
||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={taxRateId}
|
_id={taxRateId}
|
||||||
objectType='taxRate'
|
objectType='taxRate'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -126,13 +126,11 @@ const UserInfo = () => {
|
|||||||
}}
|
}}
|
||||||
editLoading={objectFormState.editLoading}
|
editLoading={objectFormState.editLoading}
|
||||||
formValid={objectFormState.formValid}
|
formValid={objectFormState.formValid}
|
||||||
disabled={
|
disabled={objectFormState.beingEditedByOther || objectFormState.loading}
|
||||||
objectFormState.beingEditedByOther || objectFormState.loading
|
|
||||||
}
|
|
||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={userId}
|
_id={userId}
|
||||||
objectType='user'
|
objectType='user'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -120,13 +120,11 @@ const VendorInfo = () => {
|
|||||||
}}
|
}}
|
||||||
editLoading={objectFormState.editLoading}
|
editLoading={objectFormState.editLoading}
|
||||||
formValid={objectFormState.formValid}
|
formValid={objectFormState.formValid}
|
||||||
disabled={
|
disabled={objectFormState.beingEditedByOther || objectFormState.loading}
|
||||||
objectFormState.beingEditedByOther || objectFormState.loading
|
|
||||||
}
|
|
||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={vendorId}
|
_id={vendorId}
|
||||||
objectType='vendor'
|
objectType='vendor'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -129,13 +129,11 @@ const GCodeFileInfo = () => {
|
|||||||
}}
|
}}
|
||||||
editLoading={objectFormState.editLoading}
|
editLoading={objectFormState.editLoading}
|
||||||
formValid={objectFormState.formValid}
|
formValid={objectFormState.formValid}
|
||||||
disabled={
|
disabled={objectFormState.beingEditedByOther || objectFormState.loading}
|
||||||
objectFormState.beingEditedByOther || objectFormState.loading
|
|
||||||
}
|
|
||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={gcodeFileId}
|
_id={gcodeFileId}
|
||||||
objectType='gcodeFile'
|
objectType='gcodeFile'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -147,7 +147,7 @@ const JobInfo = () => {
|
|||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={jobId}
|
_id={jobId}
|
||||||
objectType='job'
|
objectType='job'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -137,7 +137,7 @@ const PrinterInfo = () => {
|
|||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={printerId}
|
_id={printerId}
|
||||||
objectType='printer'
|
objectType='printer'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -117,7 +117,7 @@ const SubJobInfo = () => {
|
|||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={subJobId}
|
_id={subJobId}
|
||||||
objectType='subJob'
|
objectType='subJob'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -120,13 +120,11 @@ const ClientInfo = () => {
|
|||||||
}}
|
}}
|
||||||
editLoading={objectFormState.editLoading}
|
editLoading={objectFormState.editLoading}
|
||||||
formValid={objectFormState.formValid}
|
formValid={objectFormState.formValid}
|
||||||
disabled={
|
disabled={objectFormState.beingEditedByOther || objectFormState.loading}
|
||||||
objectFormState.beingEditedByOther || objectFormState.loading
|
|
||||||
}
|
|
||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={clientId}
|
_id={clientId}
|
||||||
objectType='client'
|
objectType='client'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -137,13 +137,11 @@ const ListingVarientInfo = () => {
|
|||||||
}}
|
}}
|
||||||
editLoading={objectFormState.editLoading}
|
editLoading={objectFormState.editLoading}
|
||||||
formValid={objectFormState.formValid}
|
formValid={objectFormState.formValid}
|
||||||
disabled={
|
disabled={objectFormState.beingEditedByOther || objectFormState.loading}
|
||||||
objectFormState.beingEditedByOther || objectFormState.loading
|
|
||||||
}
|
|
||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={listingVarientId}
|
_id={listingVarientId}
|
||||||
objectType='listingVarient'
|
objectType='listingVarient'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -142,13 +142,11 @@ const ListingInfo = () => {
|
|||||||
}}
|
}}
|
||||||
editLoading={objectFormState.editLoading}
|
editLoading={objectFormState.editLoading}
|
||||||
formValid={objectFormState.formValid}
|
formValid={objectFormState.formValid}
|
||||||
disabled={
|
disabled={objectFormState.beingEditedByOther || objectFormState.loading}
|
||||||
objectFormState.beingEditedByOther || objectFormState.loading
|
|
||||||
}
|
|
||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={listingId}
|
_id={listingId}
|
||||||
objectType='listing'
|
objectType='listing'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -210,13 +210,11 @@ const MarketplaceInfo = () => {
|
|||||||
}}
|
}}
|
||||||
editLoading={objectFormState.editLoading}
|
editLoading={objectFormState.editLoading}
|
||||||
formValid={objectFormState.formValid}
|
formValid={objectFormState.formValid}
|
||||||
disabled={
|
disabled={objectFormState.beingEditedByOther || objectFormState.loading}
|
||||||
objectFormState.beingEditedByOther || objectFormState.loading
|
|
||||||
}
|
|
||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={marketplaceId}
|
_id={marketplaceId}
|
||||||
objectType='marketplace'
|
objectType='marketplace'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -194,7 +194,7 @@ const SalesOrderInfo = () => {
|
|||||||
loading={objectFormState.editLoading}
|
loading={objectFormState.editLoading}
|
||||||
/>
|
/>
|
||||||
<ObjectTableNavigationButtons
|
<ObjectTableNavigationButtons
|
||||||
disabled={objectFormState.loading || objectFormState.isEditing}
|
disabled={objectFormState.loading}
|
||||||
_id={salesOrderId}
|
_id={salesOrderId}
|
||||||
objectType='salesOrder'
|
objectType='salesOrder'
|
||||||
showEndingDivider={true}
|
showEndingDivider={true}
|
||||||
|
|||||||
@ -1,76 +1,62 @@
|
|||||||
import { useEffect, useRef, cloneElement, useMemo, useState } from 'react'
|
import { useEffect, useRef, cloneElement, useCallback } from 'react'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import { Popover, Typography } from 'antd'
|
import { Popover, Typography } from 'antd'
|
||||||
|
|
||||||
const MODIFIER_ALIASES = {
|
// Utility to parse shortcut string like 'cmd+shift+p' or 'ctrl+s'
|
||||||
cmd: 'meta',
|
|
||||||
meta: 'meta',
|
|
||||||
ctrl: 'control',
|
|
||||||
control: 'control',
|
|
||||||
alt: 'alt',
|
|
||||||
option: 'alt',
|
|
||||||
shift: 'shift'
|
|
||||||
}
|
|
||||||
|
|
||||||
function parseShortcut(shortcut) {
|
function parseShortcut(shortcut) {
|
||||||
return shortcut
|
const parts = shortcut.toLowerCase().split('+')
|
||||||
.toLowerCase()
|
return {
|
||||||
.split('+')
|
meta: parts.includes('cmd') || parts.includes('meta') || false,
|
||||||
.map((part) => MODIFIER_ALIASES[part] ?? part)
|
ctrl: parts.includes('ctrl') || parts.includes('control') || false,
|
||||||
}
|
alt: parts.includes('alt') || parts.includes('option') || false,
|
||||||
|
shift: parts.includes('shift') || false,
|
||||||
function getPressedKey(event) {
|
key: parts.find(
|
||||||
if (
|
(p) =>
|
||||||
event.key === 'Meta' ||
|
!['cmd', 'meta', 'ctrl', 'control', 'alt', 'option', 'shift'].includes(
|
||||||
event.key === 'Control' ||
|
p
|
||||||
event.key === 'Alt' ||
|
)
|
||||||
event.key === 'Shift'
|
)[0]
|
||||||
) {
|
|
||||||
return event.key.toLowerCase()
|
|
||||||
}
|
}
|
||||||
if (event.code) {
|
|
||||||
const code = event.code.toLowerCase()
|
|
||||||
if (code.startsWith('key')) {
|
|
||||||
return code.slice(3)
|
|
||||||
}
|
|
||||||
return code
|
|
||||||
}
|
|
||||||
return null
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const { Text } = Typography
|
const { Text } = Typography
|
||||||
|
|
||||||
const KeyboardShortcut = ({
|
const KeyboardShortcut = ({ shortcut, children, hint, onTrigger }) => {
|
||||||
shortcut,
|
|
||||||
children,
|
|
||||||
hint,
|
|
||||||
onTrigger,
|
|
||||||
log = false
|
|
||||||
}) => {
|
|
||||||
const childRef = useRef()
|
const childRef = useRef()
|
||||||
const pressedKeysRef = useRef(new Set())
|
const shortcutObj = parseShortcut(shortcut)
|
||||||
const shortcutKeys = useMemo(() => parseShortcut(shortcut), [shortcut])
|
|
||||||
const [pressedKeys, setPressedKeys] = useState([])
|
// Helper to get the set of keys required for the shortcut
|
||||||
|
const getShortcutKeySet = useCallback((shortcutObj) => {
|
||||||
|
const keys = []
|
||||||
|
if (shortcutObj.meta) keys.push('Meta')
|
||||||
|
if (shortcutObj.ctrl) keys.push('Control')
|
||||||
|
if (shortcutObj.alt) keys.push('Alt')
|
||||||
|
if (shortcutObj.shift) keys.push('Shift')
|
||||||
|
// shortcutObj.code is like 'keyp', so extract the last char
|
||||||
|
if (shortcutObj.key) {
|
||||||
|
keys.push('Key' + shortcutObj.key.toUpperCase())
|
||||||
|
}
|
||||||
|
return new Set(keys)
|
||||||
|
}, [])
|
||||||
|
|
||||||
|
const shortcutKeySet = getShortcutKeySet(shortcutObj)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const syncPressedKeys = () => {
|
const pressedKeys = new Set()
|
||||||
setPressedKeys([...pressedKeysRef.current])
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleKeyDown = (event) => {
|
const handleKeyDown = (event) => {
|
||||||
const key = getPressedKey(event)
|
|
||||||
if (key) {
|
|
||||||
pressedKeysRef.current.add(key)
|
|
||||||
syncPressedKeys()
|
|
||||||
}
|
|
||||||
|
|
||||||
if (log) {
|
|
||||||
console.log('Key Down:', key, 'Pressed Keys:', [...pressedKeysRef.current])
|
|
||||||
}
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
shortcutKeys.length &&
|
event.key === 'Meta' ||
|
||||||
shortcutKeys.every((k) => pressedKeysRef.current.has(k))
|
event.key === 'Control' ||
|
||||||
|
event.key === 'Alt' ||
|
||||||
|
event.key === 'Shift'
|
||||||
|
) {
|
||||||
|
pressedKeys.add(event.key)
|
||||||
|
} else if (event.code && event.code.startsWith('Key')) {
|
||||||
|
pressedKeys.add(event.code)
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
shortcutKeySet.size &&
|
||||||
|
[...shortcutKeySet].every((k) => pressedKeys.has(k))
|
||||||
) {
|
) {
|
||||||
if (typeof onTrigger === 'function') {
|
if (typeof onTrigger === 'function') {
|
||||||
onTrigger(event)
|
onTrigger(event)
|
||||||
@ -78,24 +64,27 @@ const KeyboardShortcut = ({
|
|||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleKeyUp = (event) => {
|
const handleKeyUp = (event) => {
|
||||||
const key = getPressedKey(event)
|
if (
|
||||||
if (key) {
|
event.key === 'Meta' ||
|
||||||
pressedKeysRef.current.delete(key)
|
event.key === 'Control' ||
|
||||||
syncPressedKeys()
|
event.key === 'Alt' ||
|
||||||
|
event.key === 'Shift'
|
||||||
|
) {
|
||||||
|
pressedKeys.delete(event.key)
|
||||||
|
} else if (event.code && event.code.startsWith('Key')) {
|
||||||
|
pressedKeys.delete(event.key.toUpperCase())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener('keydown', handleKeyDown)
|
window.addEventListener('keydown', handleKeyDown)
|
||||||
window.addEventListener('keyup', handleKeyUp)
|
window.addEventListener('keyup', handleKeyUp)
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
window.removeEventListener('keydown', handleKeyDown)
|
window.removeEventListener('keydown', handleKeyDown)
|
||||||
window.removeEventListener('keyup', handleKeyUp)
|
window.removeEventListener('keyup', handleKeyUp)
|
||||||
}
|
}
|
||||||
}, [shortcutKeys, onTrigger, log])
|
}, [shortcut, shortcutObj, onTrigger, shortcutKeySet])
|
||||||
|
|
||||||
|
// Clone the child to attach a ref
|
||||||
const element = cloneElement(children, { ref: childRef })
|
const element = cloneElement(children, { ref: childRef })
|
||||||
|
|
||||||
if (hint) {
|
if (hint) {
|
||||||
@ -119,8 +108,7 @@ KeyboardShortcut.propTypes = {
|
|||||||
shortcut: PropTypes.string.isRequired, // e.g. 'cmd+shift+p'
|
shortcut: PropTypes.string.isRequired, // e.g. 'cmd+shift+p'
|
||||||
onTrigger: PropTypes.func.isRequired,
|
onTrigger: PropTypes.func.isRequired,
|
||||||
children: PropTypes.element.isRequired,
|
children: PropTypes.element.isRequired,
|
||||||
hint: PropTypes.string, // Optional, e.g. '⌘ ⇧ P'
|
hint: PropTypes.string // Optional, e.g. '⌘ ⇧ P'
|
||||||
log: PropTypes.bool // Optional, e.g. true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default KeyboardShortcut
|
export default KeyboardShortcut
|
||||||
|
|||||||
@ -7,7 +7,6 @@ import PropTypes from 'prop-types'
|
|||||||
import { ApiServerContext } from '../context/ApiServerContext'
|
import { ApiServerContext } from '../context/ApiServerContext'
|
||||||
import { AuthContext } from '../context/AuthContext'
|
import { AuthContext } from '../context/AuthContext'
|
||||||
import { useTableStatePersistence } from '../context/TableStateContext'
|
import { useTableStatePersistence } from '../context/TableStateContext'
|
||||||
import KeyboardShortcut from './KeyboardShortcut.jsx'
|
|
||||||
|
|
||||||
const ObjectTableNavigationButtons = ({
|
const ObjectTableNavigationButtons = ({
|
||||||
disabled,
|
disabled,
|
||||||
@ -96,36 +95,16 @@ const ObjectTableNavigationButtons = ({
|
|||||||
<Divider type='vertical' style={{ margin: '0 4px', height: '18px' }} />
|
<Divider type='vertical' style={{ margin: '0 4px', height: '18px' }} />
|
||||||
)}
|
)}
|
||||||
<Space size='small'>
|
<Space size='small'>
|
||||||
<KeyboardShortcut
|
<Button
|
||||||
shortcut='alt+arrowleft'
|
icon={<ArrowLeftIcon />}
|
||||||
hint='ALT LEFT'
|
onClick={handlePrevious}
|
||||||
onTrigger={useCallback(() => {
|
disabled={disabled || loading || !neighbors.previous?._id}
|
||||||
if (!disabled && !loading && neighbors.previous?._id) {
|
/>
|
||||||
handlePrevious()
|
<Button
|
||||||
}
|
icon={<ArrowRightIcon />}
|
||||||
}, [disabled, loading, neighbors.previous?._id])}
|
onClick={handleNext}
|
||||||
>
|
disabled={disabled || loading || !neighbors.next?._id}
|
||||||
<Button
|
/>
|
||||||
icon={<ArrowLeftIcon />}
|
|
||||||
onClick={handlePrevious}
|
|
||||||
disabled={disabled || loading || !neighbors.previous?._id}
|
|
||||||
/>
|
|
||||||
</KeyboardShortcut>
|
|
||||||
<KeyboardShortcut
|
|
||||||
shortcut='alt+arrowright'
|
|
||||||
hint='ALT RIGHT'
|
|
||||||
onTrigger={useCallback(() => {
|
|
||||||
if (!disabled && !loading && neighbors.next?._id) {
|
|
||||||
handleNext()
|
|
||||||
}
|
|
||||||
}, [disabled, loading, neighbors.next?._id])}
|
|
||||||
>
|
|
||||||
<Button
|
|
||||||
icon={<ArrowRightIcon />}
|
|
||||||
onClick={handleNext}
|
|
||||||
disabled={disabled || loading || !neighbors.next?._id}
|
|
||||||
/>
|
|
||||||
</KeyboardShortcut>
|
|
||||||
</Space>
|
</Space>
|
||||||
</Flex>
|
</Flex>
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user