Compare commits
No commits in common. "a896cdf223b111228d3190c1bc031db710b723e5" and "02b0d245ff7bf04d97886a42be1c857ce64c615f" have entirely different histories.
a896cdf223
...
02b0d245ff
@ -30,11 +30,9 @@ import IdDisplay from '../common/IdDisplay'
|
||||
import config from '../../../config'
|
||||
import {
|
||||
getModelByName,
|
||||
getModelByPrefix,
|
||||
searchModelsByLabel
|
||||
getModelByPrefix
|
||||
} from '../../../database/ObjectModels'
|
||||
import InfoCircleIcon from '../../Icons/InfoCircleIcon'
|
||||
import MenuIcon from '../../Icons/MenuIcon'
|
||||
import { ApiServerContext } from './ApiServerContext'
|
||||
import { AuthContext } from './AuthContext'
|
||||
import { ElectronContext } from './ElectronContext'
|
||||
@ -130,22 +128,6 @@ const SpotlightContent = ({
|
||||
}
|
||||
|
||||
setLoading(false)
|
||||
|
||||
const models = searchModelsByLabel(searchQuery.trim()).map((model) => ({
|
||||
type: model.name,
|
||||
name: model.labelPlural,
|
||||
icon: model.icon,
|
||||
actions: [
|
||||
{
|
||||
default: true,
|
||||
row: true,
|
||||
icon: MenuIcon,
|
||||
url: () => {
|
||||
return model.url
|
||||
}
|
||||
}
|
||||
]
|
||||
}))
|
||||
// If the query contains a prefix mode character, and the response is an object, wrap it in an array
|
||||
if (
|
||||
/[:?^]/.test(searchQuery) &&
|
||||
@ -153,9 +135,9 @@ const SpotlightContent = ({
|
||||
!Array.isArray(data) &&
|
||||
typeof data === 'object'
|
||||
) {
|
||||
setListData([...models, data])
|
||||
setListData([data])
|
||||
} else {
|
||||
setListData([...models, ...data])
|
||||
setListData(data)
|
||||
}
|
||||
|
||||
// Check if there's a pending query after this fetch completes
|
||||
@ -308,11 +290,7 @@ const SpotlightContent = ({
|
||||
const item = listData[0]
|
||||
let type = item.type || item.objectType || inputPrefix?.type
|
||||
const model = getModelByName(type)
|
||||
const defaultAction = item?.type
|
||||
? getDefaultRowAction(item)
|
||||
: model
|
||||
? getDefaultRowAction(model)
|
||||
: null
|
||||
const defaultAction = model ? getDefaultRowAction(model) : null
|
||||
if (defaultAction) {
|
||||
triggerRowAction(defaultAction, item)
|
||||
}
|
||||
@ -326,11 +304,7 @@ const SpotlightContent = ({
|
||||
const item = listData[index]
|
||||
let type = item.type || item.objectType || inputPrefix?.type
|
||||
const model = getModelByName(type)
|
||||
const defaultAction = item?.type
|
||||
? getDefaultRowAction(item)
|
||||
: model
|
||||
? getDefaultRowAction(model)
|
||||
: null
|
||||
const defaultAction = model ? getDefaultRowAction(model) : null
|
||||
if (defaultAction) {
|
||||
triggerRowAction(defaultAction, item)
|
||||
}
|
||||
@ -473,12 +447,10 @@ const SpotlightContent = ({
|
||||
<List
|
||||
dataSource={listData}
|
||||
renderItem={(item, index) => {
|
||||
let type = item.objectType || inputPrefix?.type || item?.type
|
||||
let type = item.objectType || inputPrefix?.type
|
||||
const model = getModelByName(type)
|
||||
const Icon = model?.icon
|
||||
const rowActions = item?.type
|
||||
? item.actions
|
||||
: getRowActions(model)
|
||||
const rowActions = getRowActions(model)
|
||||
let shortcutText = ''
|
||||
if (index === 0) {
|
||||
shortcutText = 'ENTER'
|
||||
@ -520,9 +492,7 @@ const SpotlightContent = ({
|
||||
showId={false}
|
||||
/>
|
||||
) : null}
|
||||
{item?._id ? (
|
||||
<IdDisplay id={item._id} type={type} longId={false} />
|
||||
) : null}
|
||||
<IdDisplay id={item._id} type={type} longId={false} />
|
||||
</Flex>
|
||||
<Flex gap={'small'}>
|
||||
{rowActions
|
||||
|
||||
@ -213,14 +213,6 @@ export function getModelByPrefix(prefix) {
|
||||
)
|
||||
}
|
||||
|
||||
export function searchModelsByLabel(label) {
|
||||
return objectModels.filter(
|
||||
(meta) =>
|
||||
meta.label.toLowerCase().includes(label.toLowerCase()) ||
|
||||
meta.labelPlural.toLowerCase().includes(label.toLowerCase())
|
||||
)
|
||||
}
|
||||
|
||||
// Utility function to get nested object values
|
||||
export const getPropertyValue = (obj, path) => {
|
||||
if (!obj || !path) return undefined
|
||||
|
||||
@ -8,8 +8,6 @@ import LockIcon from '../../components/Icons/LockIcon'
|
||||
export const AppPassword = {
|
||||
name: 'appPassword',
|
||||
label: 'App Password',
|
||||
labelPlural: 'App Passwords',
|
||||
url: '/dashboard/management/apppasswords',
|
||||
prefix: 'APP',
|
||||
icon: AppPasswordIcon,
|
||||
actions: [
|
||||
|
||||
@ -3,8 +3,6 @@ import AuditLogIcon from '../../components/Icons/AuditLogIcon'
|
||||
export const AuditLog = {
|
||||
name: 'auditLog',
|
||||
label: 'Audit Log',
|
||||
labelPlural: 'Audit Logs',
|
||||
url: '/dashboard/management/auditlogs',
|
||||
prefix: 'ADL',
|
||||
icon: AuditLogIcon,
|
||||
actions: [],
|
||||
|
||||
@ -8,8 +8,6 @@ import BinIcon from '../../components/Icons/BinIcon'
|
||||
export const Client = {
|
||||
name: 'client',
|
||||
label: 'Client',
|
||||
labelPlural: 'Clients',
|
||||
url: '/dashboard/sales/clients',
|
||||
prefix: 'CLI',
|
||||
icon: ClientIcon,
|
||||
actions: [
|
||||
|
||||
@ -8,8 +8,6 @@ import BinIcon from '../../components/Icons/BinIcon'
|
||||
export const Courier = {
|
||||
name: 'courier',
|
||||
label: 'Courier',
|
||||
labelPlural: 'Couriers',
|
||||
url: '/dashboard/management/couriers',
|
||||
prefix: 'COR',
|
||||
icon: CourierIcon,
|
||||
actions: [
|
||||
|
||||
@ -8,8 +8,6 @@ import BinIcon from '../../components/Icons/BinIcon'
|
||||
export const CourierService = {
|
||||
name: 'courierService',
|
||||
label: 'Courier Service',
|
||||
labelPlural: 'Courier Services',
|
||||
url: '/dashboard/management/courierservices',
|
||||
prefix: 'COS',
|
||||
icon: CourierServiceIcon,
|
||||
actions: [
|
||||
|
||||
@ -8,8 +8,6 @@ import dayjs from 'dayjs'
|
||||
export const DocumentJob = {
|
||||
name: 'documentJob',
|
||||
label: 'Document Job',
|
||||
labelPlural: 'Document Jobs',
|
||||
url: '/dashboard/management/documentjobs',
|
||||
prefix: 'DJB',
|
||||
icon: DocumentJobIcon,
|
||||
actions: [
|
||||
|
||||
@ -7,8 +7,6 @@ import XMarkIcon from '../../components/Icons/XMarkIcon'
|
||||
export const DocumentPrinter = {
|
||||
name: 'documentPrinter',
|
||||
label: 'Document Printer',
|
||||
labelPlural: 'Document Printers',
|
||||
url: '/dashboard/management/documentprinters',
|
||||
prefix: 'DPR',
|
||||
icon: DocumentPrinterIcon,
|
||||
actions: [
|
||||
|
||||
@ -7,8 +7,6 @@ import DocumentSizeIcon from '../../components/Icons/DocumentSizeIcon'
|
||||
export const DocumentSize = {
|
||||
name: 'documentSize',
|
||||
label: 'Document Size',
|
||||
labelPlural: 'Document Sizes',
|
||||
url: '/dashboard/management/documentsizes',
|
||||
prefix: 'DSZ',
|
||||
icon: DocumentSizeIcon,
|
||||
actions: [
|
||||
|
||||
@ -8,8 +8,6 @@ import DocumentTemplateIcon from '../../components/Icons/DocumentTemplateIcon'
|
||||
export const DocumentTemplate = {
|
||||
name: 'documentTemplate',
|
||||
label: 'Document Template',
|
||||
labelPlural: 'Document Templates',
|
||||
url: '/dashboard/management/documenttemplates',
|
||||
prefix: 'DTP',
|
||||
icon: DocumentTemplateIcon,
|
||||
actions: [
|
||||
|
||||
@ -9,8 +9,6 @@ import BinIcon from '../../components/Icons/BinIcon'
|
||||
export const Filament = {
|
||||
name: 'filament',
|
||||
label: 'Filament',
|
||||
labelPlural: 'Filaments',
|
||||
url: '/dashboard/management/filaments',
|
||||
prefix: 'FIL',
|
||||
icon: FilamentIcon,
|
||||
actions: [
|
||||
|
||||
@ -8,8 +8,6 @@ import BinIcon from '../../components/Icons/BinIcon'
|
||||
export const FilamentSku = {
|
||||
name: 'filamentSku',
|
||||
label: 'Filament SKU',
|
||||
labelPlural: 'Filament SKUs',
|
||||
url: '/dashboard/management/filamentskus',
|
||||
prefix: 'FSU',
|
||||
icon: FilamentSkuIcon,
|
||||
actions: [
|
||||
@ -63,6 +61,7 @@ export const FilamentSku = {
|
||||
`/dashboard/management/filamentskus/info?filamentSkuId=${_id}&action=delete`
|
||||
}
|
||||
],
|
||||
url: (id) => `/dashboard/management/filamentskus/info?filamentSkuId=${id}`,
|
||||
columns: [
|
||||
'_reference',
|
||||
'name',
|
||||
|
||||
@ -4,8 +4,6 @@ import InfoCircleIcon from '../../components/Icons/InfoCircleIcon'
|
||||
export const FilamentStock = {
|
||||
name: 'filamentStock',
|
||||
label: 'Filament Stock',
|
||||
labelPlural: 'Filament Stocks',
|
||||
url: '/dashboard/inventory/filamentstocks',
|
||||
prefix: 'FLS',
|
||||
icon: FilamentStockIcon,
|
||||
actions: [
|
||||
|
||||
@ -9,8 +9,6 @@ import BinIcon from '../../components/Icons/BinIcon'
|
||||
export const File = {
|
||||
name: 'file',
|
||||
label: 'File',
|
||||
labelPlural: 'Files',
|
||||
url: '/dashboard/management/files',
|
||||
prefix: 'FLE',
|
||||
icon: FileIcon,
|
||||
actions: [
|
||||
@ -71,6 +69,7 @@ export const File = {
|
||||
`/dashboard/management/files/info?fileId=${_id}&action=delete`
|
||||
}
|
||||
],
|
||||
url: (id) => `/dashboard/management/files/info?fileId=${id}`,
|
||||
columns: [
|
||||
'_reference',
|
||||
'name',
|
||||
|
||||
@ -9,8 +9,6 @@ import EyeIcon from '../../components/Icons/EyeIcon'
|
||||
export const GCodeFile = {
|
||||
name: 'gcodeFile',
|
||||
label: 'GCode File',
|
||||
labelPlural: 'GCode Files',
|
||||
url: '/dashboard/production/gcodefiles',
|
||||
prefix: 'GCF',
|
||||
icon: GCodeFileIcon,
|
||||
actions: [
|
||||
|
||||
@ -9,8 +9,6 @@ import OTPIcon from '../../components/Icons/OTPIcon'
|
||||
export const Host = {
|
||||
name: 'host',
|
||||
label: 'Host',
|
||||
labelPlural: 'Hosts',
|
||||
url: '/dashboard/management/hosts',
|
||||
prefix: 'HST',
|
||||
icon: HostIcon,
|
||||
actions: [
|
||||
|
||||
@ -4,7 +4,6 @@ import InfoCircleIcon from '../../components/Icons/InfoCircleIcon'
|
||||
export const Initial = {
|
||||
name: 'initial',
|
||||
label: 'Initial',
|
||||
labelPlural: 'Initials',
|
||||
prefix: 'INT',
|
||||
icon: QuestionCircleIcon,
|
||||
actions: [
|
||||
@ -17,4 +16,5 @@ export const Initial = {
|
||||
url: (_id) => `/dashboard/management/initials/info?initialId=${_id}`
|
||||
}
|
||||
],
|
||||
url: () => `#`
|
||||
}
|
||||
|
||||
@ -9,8 +9,6 @@ import PlusIcon from '../../components/Icons/PlusIcon'
|
||||
export const Invoice = {
|
||||
name: 'invoice',
|
||||
label: 'Invoice',
|
||||
labelPlural: 'Invoices',
|
||||
url: '/dashboard/finance/invoices',
|
||||
prefix: 'INV',
|
||||
icon: InvoiceIcon,
|
||||
actions: [
|
||||
|
||||
@ -6,8 +6,6 @@ import dayjs from 'dayjs'
|
||||
export const Job = {
|
||||
name: 'job',
|
||||
label: 'Job',
|
||||
labelPlural: 'Jobs',
|
||||
url: '/dashboard/production/jobs',
|
||||
prefix: 'JOB',
|
||||
icon: JobIcon,
|
||||
actions: [
|
||||
|
||||
@ -9,8 +9,6 @@ import PlusIcon from '../../components/Icons/PlusIcon'
|
||||
export const Listing = {
|
||||
name: 'listing',
|
||||
label: 'Listing',
|
||||
labelPlural: 'Listings',
|
||||
url: '/dashboard/sales/listings',
|
||||
prefix: 'LST',
|
||||
icon: ListingIcon,
|
||||
actions: [
|
||||
|
||||
@ -8,7 +8,6 @@ import BinIcon from '../../components/Icons/BinIcon'
|
||||
export const ListingVarient = {
|
||||
name: 'listingVarient',
|
||||
label: 'Listing Varient',
|
||||
labelPlural: 'Listing Varients',
|
||||
prefix: 'LVR',
|
||||
icon: ListingVarientIcon,
|
||||
actions: [
|
||||
|
||||
@ -10,8 +10,6 @@ import BinIcon from '../../components/Icons/BinIcon'
|
||||
export const Marketplace = {
|
||||
name: 'marketplace',
|
||||
label: 'Marketplace',
|
||||
labelPlural: 'Marketplaces',
|
||||
url: '/dashboard/sales/marketplaces',
|
||||
prefix: 'MKT',
|
||||
icon: MarketplaceIcon,
|
||||
actions: [
|
||||
|
||||
@ -8,8 +8,6 @@ import BinIcon from '../../components/Icons/BinIcon'
|
||||
export const Material = {
|
||||
name: 'material',
|
||||
label: 'Material',
|
||||
labelPlural: 'Materials',
|
||||
url: '/dashboard/management/materials',
|
||||
prefix: 'MAT',
|
||||
icon: MaterialIcon,
|
||||
actions: [
|
||||
@ -62,6 +60,7 @@ export const Material = {
|
||||
`/dashboard/management/materials/info?materialId=${_id}&action=delete`
|
||||
}
|
||||
],
|
||||
url: (id) => `/dashboard/management/materials/info?materialId=${id}`,
|
||||
columns: ['_reference', 'name', 'tags', 'createdAt', 'updatedAt'],
|
||||
filters: ['_id', 'name', 'tags'],
|
||||
sorters: ['name', 'createdAt', 'updatedAt', '_id'],
|
||||
|
||||
@ -4,7 +4,6 @@ import InfoCircleIcon from '../../components/Icons/InfoCircleIcon'
|
||||
export const Note = {
|
||||
name: 'note',
|
||||
label: 'Note',
|
||||
labelPlural: 'Notes',
|
||||
prefix: 'NTE',
|
||||
icon: NoteIcon,
|
||||
actions: [
|
||||
|
||||
@ -7,8 +7,6 @@ import XMarkIcon from '../../components/Icons/XMarkIcon'
|
||||
export const NoteType = {
|
||||
name: 'noteType',
|
||||
label: 'Note Type',
|
||||
labelPlural: 'Note Types',
|
||||
url: '/dashboard/management/notetypes',
|
||||
prefix: 'NTY',
|
||||
icon: NoteTypeIcon,
|
||||
actions: [
|
||||
|
||||
@ -8,8 +8,6 @@ import XMarkIcon from '../../components/Icons/XMarkIcon'
|
||||
export const OrderItem = {
|
||||
name: 'orderItem',
|
||||
label: 'Order Item',
|
||||
labelPlural: 'Order Items',
|
||||
url: '/dashboard/inventory/orderitems',
|
||||
prefix: 'ODI',
|
||||
icon: OrderItemIcon,
|
||||
actions: [
|
||||
|
||||
@ -8,8 +8,6 @@ import PlusIcon from '../../components/Icons/PlusIcon'
|
||||
export const Part = {
|
||||
name: 'part',
|
||||
label: 'Part',
|
||||
labelPlural: 'Parts',
|
||||
url: '/dashboard/management/parts',
|
||||
prefix: 'PRT',
|
||||
icon: PartIcon,
|
||||
actions: [
|
||||
|
||||
@ -8,8 +8,6 @@ import BinIcon from '../../components/Icons/BinIcon'
|
||||
export const PartSku = {
|
||||
name: 'partSku',
|
||||
label: 'Part SKU',
|
||||
labelPlural: 'Part SKUs',
|
||||
url: '/dashboard/management/partskus',
|
||||
prefix: 'PSU',
|
||||
icon: PartSkuIcon,
|
||||
actions: [
|
||||
@ -62,6 +60,7 @@ export const PartSku = {
|
||||
`/dashboard/management/partskus/info?partSkuId=${_id}&action=delete`
|
||||
}
|
||||
],
|
||||
url: (id) => `/dashboard/management/partskus/info?partSkuId=${id}`,
|
||||
columns: [
|
||||
'_reference',
|
||||
'name',
|
||||
|
||||
@ -4,8 +4,6 @@ import InfoCircleIcon from '../../components/Icons/InfoCircleIcon'
|
||||
export const PartStock = {
|
||||
name: 'partStock',
|
||||
label: 'Part Stock',
|
||||
labelPlural: 'Part Stocks',
|
||||
url: '/dashboard/inventory/partstocks',
|
||||
prefix: 'PTS',
|
||||
icon: PartStockIcon,
|
||||
actions: [
|
||||
@ -18,6 +16,7 @@ export const PartStock = {
|
||||
url: (_id) => `/dashboard/inventory/partstocks/info?partStockId=${_id}`
|
||||
}
|
||||
],
|
||||
url: (id) => `/dashboard/inventory/partstocks/info?partStockId=${id}`,
|
||||
filters: ['_id', 'partSku', 'startingQuantity', 'currentQuantity'],
|
||||
sorters: ['partSku', 'startingQuantity', 'currentQuantity'],
|
||||
columns: [
|
||||
|
||||
@ -8,8 +8,6 @@ import BinIcon from '../../components/Icons/BinIcon'
|
||||
export const Payment = {
|
||||
name: 'payment',
|
||||
label: 'Payment',
|
||||
labelPlural: 'Payments',
|
||||
url: '/dashboard/finance/payments',
|
||||
prefix: 'PAY',
|
||||
icon: PaymentIcon,
|
||||
actions: [
|
||||
|
||||
@ -14,8 +14,6 @@ import JobIcon from '../../components/Icons/JobIcon'
|
||||
export const Printer = {
|
||||
name: 'printer',
|
||||
label: 'Printer',
|
||||
labelPlural: 'Printers',
|
||||
url: '/dashboard/production/printers',
|
||||
prefix: 'PRN',
|
||||
icon: PrinterIcon,
|
||||
actions: [
|
||||
|
||||
@ -8,8 +8,6 @@ import PlusIcon from '../../components/Icons/PlusIcon'
|
||||
export const Product = {
|
||||
name: 'product',
|
||||
label: 'Product',
|
||||
labelPlural: 'Products',
|
||||
url: '/dashboard/management/products',
|
||||
prefix: 'PRD',
|
||||
icon: ProductIcon,
|
||||
actions: [
|
||||
|
||||
@ -8,8 +8,6 @@ import BinIcon from '../../components/Icons/BinIcon'
|
||||
export const ProductCategory = {
|
||||
name: 'productCategory',
|
||||
label: 'Product Category',
|
||||
labelPlural: 'Product Categories',
|
||||
url: '/dashboard/management/productcategories',
|
||||
prefix: 'PCG',
|
||||
endpoint: 'productcategories',
|
||||
icon: ProductCategoryIcon,
|
||||
@ -64,6 +62,8 @@ export const ProductCategory = {
|
||||
`/dashboard/management/productcategories/info?productCategoryId=${_id}&action=delete`
|
||||
}
|
||||
],
|
||||
url: (id) =>
|
||||
`/dashboard/management/productcategories/info?productCategoryId=${id}`,
|
||||
columns: ['_reference', 'name', 'createdAt', 'updatedAt'],
|
||||
filters: ['_id', 'name'],
|
||||
sorters: ['name', 'createdAt', 'updatedAt', '_id'],
|
||||
|
||||
@ -8,8 +8,6 @@ import BinIcon from '../../components/Icons/BinIcon'
|
||||
export const ProductSku = {
|
||||
name: 'productSku',
|
||||
label: 'Product SKU',
|
||||
labelPlural: 'Product SKUs',
|
||||
url: '/dashboard/management/productskus',
|
||||
prefix: 'SKU',
|
||||
icon: ProductSkuIcon,
|
||||
actions: [
|
||||
@ -62,6 +60,7 @@ export const ProductSku = {
|
||||
`/dashboard/management/productskus/info?productSkuId=${_id}&action=delete`
|
||||
}
|
||||
],
|
||||
url: (id) => `/dashboard/management/productskus/info?productSkuId=${id}`,
|
||||
columns: [
|
||||
'_reference',
|
||||
'name',
|
||||
|
||||
@ -8,8 +8,6 @@ import BinIcon from '../../components/Icons/BinIcon'
|
||||
export const ProductStock = {
|
||||
name: 'productStock',
|
||||
label: 'Product Stock',
|
||||
labelPlural: 'Product Stocks',
|
||||
url: '/dashboard/inventory/productstocks',
|
||||
prefix: 'PDS',
|
||||
icon: ProductStockIcon,
|
||||
actions: [
|
||||
@ -86,6 +84,7 @@ export const ProductStock = {
|
||||
}
|
||||
}
|
||||
],
|
||||
url: (id) => `/dashboard/inventory/productstocks/info?productStockId=${id}`,
|
||||
filters: ['_id', 'productSku', 'currentQuantity'],
|
||||
sorters: ['productSku', 'currentQuantity'],
|
||||
columns: [
|
||||
|
||||
@ -9,8 +9,6 @@ import BinIcon from '../../components/Icons/BinIcon'
|
||||
export const PurchaseOrder = {
|
||||
name: 'purchaseOrder',
|
||||
label: 'Purchase Order',
|
||||
labelPlural: 'Purchase Orders',
|
||||
url: '/dashboard/inventory/purchaseorders',
|
||||
prefix: 'POR',
|
||||
icon: PurchaseOrderIcon,
|
||||
actions: [
|
||||
|
||||
@ -9,8 +9,6 @@ import BinIcon from '../../components/Icons/BinIcon'
|
||||
export const SalesOrder = {
|
||||
name: 'salesOrder',
|
||||
label: 'Sales Order',
|
||||
labelPlural: 'Sales Orders',
|
||||
url: '/dashboard/sales/salesorders',
|
||||
prefix: 'SOR',
|
||||
icon: SalesOrderIcon,
|
||||
actions: [
|
||||
|
||||
@ -8,8 +8,6 @@ import XMarkIcon from '../../components/Icons/XMarkIcon'
|
||||
export const Shipment = {
|
||||
name: 'shipment',
|
||||
label: 'Shipment',
|
||||
labelPlural: 'Shipments',
|
||||
url: '/dashboard/inventory/shipments',
|
||||
prefix: 'SHP',
|
||||
icon: ShipmentIcon,
|
||||
actions: [
|
||||
|
||||
@ -4,7 +4,6 @@ import InfoCircleIcon from '../../components/Icons/InfoCircleIcon'
|
||||
export const Spool = {
|
||||
name: 'spool',
|
||||
label: 'Spool',
|
||||
labelPlural: 'Spools',
|
||||
prefix: 'SPL',
|
||||
icon: FilamentIcon,
|
||||
actions: [
|
||||
@ -17,4 +16,5 @@ export const Spool = {
|
||||
url: (_id) => `/dashboard/inventory/spool/info?spoolId=${_id}`
|
||||
}
|
||||
],
|
||||
url: (id) => `/dashboard/inventory/spool/info?spoolId=${id}`
|
||||
}
|
||||
|
||||
@ -4,8 +4,6 @@ import InfoCircleIcon from '../../components/Icons/InfoCircleIcon'
|
||||
export const StockAudit = {
|
||||
name: 'stockAudit',
|
||||
label: 'Stock Audit',
|
||||
labelPlural: 'Stock Audits',
|
||||
url: '/dashboard/inventory/stockaudits',
|
||||
prefix: 'SAU',
|
||||
icon: StockAuditIcon,
|
||||
actions: [
|
||||
@ -18,6 +16,7 @@ export const StockAudit = {
|
||||
url: (_id) => `/dashboard/inventory/stockaudits/info?stockAuditId=${_id}`
|
||||
}
|
||||
],
|
||||
url: (id) => `/dashboard/inventory/stockaudits/info?stockAuditId=${id}`,
|
||||
columns: ['_reference', 'state', 'createdAt', 'updatedAt'],
|
||||
filters: ['_id'],
|
||||
sorters: ['createdAt', 'updatedAt'],
|
||||
|
||||
@ -3,8 +3,6 @@ import StockEventIcon from '../../components/Icons/StockEventIcon'
|
||||
export const StockEvent = {
|
||||
name: 'stockEvent',
|
||||
label: 'Stock Event',
|
||||
labelPlural: 'Stock Events',
|
||||
url: '/dashboard/inventory/stockevents',
|
||||
prefix: 'SEV',
|
||||
icon: StockEventIcon,
|
||||
actions: [],
|
||||
|
||||
@ -4,8 +4,6 @@ import InfoCircleIcon from '../../components/Icons/InfoCircleIcon'
|
||||
export const StockLocation = {
|
||||
name: 'stockLocation',
|
||||
label: 'Stock Location',
|
||||
labelPlural: 'Stock Locations',
|
||||
url: '/dashboard/inventory/stocklocations',
|
||||
prefix: 'SLN',
|
||||
icon: StockLocationIcon,
|
||||
actions: [
|
||||
@ -19,6 +17,7 @@ export const StockLocation = {
|
||||
`/dashboard/inventory/stocklocations/info?stockLocationId=${_id}`
|
||||
}
|
||||
],
|
||||
url: (id) => `/dashboard/inventory/stocklocations/info?stockLocationId=${id}`,
|
||||
filters: ['_id', 'name'],
|
||||
sorters: ['name', 'createdAt'],
|
||||
columns: ['_reference', 'name', 'address', 'createdAt', 'updatedAt'],
|
||||
|
||||
@ -8,8 +8,6 @@ import BinIcon from '../../components/Icons/BinIcon'
|
||||
export const StockTransfer = {
|
||||
name: 'stockTransfer',
|
||||
label: 'Stock Transfer',
|
||||
labelPlural: 'Stock Transfers',
|
||||
url: '/dashboard/inventory/stocktransfers',
|
||||
prefix: 'STT',
|
||||
icon: StockTransferIcon,
|
||||
actions: [
|
||||
@ -86,16 +84,10 @@ export const StockTransfer = {
|
||||
}
|
||||
}
|
||||
],
|
||||
url: (id) => `/dashboard/inventory/stocktransfers/info?stockTransferId=${id}`,
|
||||
filters: ['_id', 'name', 'state'],
|
||||
sorters: ['name', 'createdAt', 'postedAt'],
|
||||
columns: [
|
||||
'_reference',
|
||||
'name',
|
||||
'state',
|
||||
'postedAt',
|
||||
'createdAt',
|
||||
'updatedAt'
|
||||
],
|
||||
columns: ['_reference', 'name', 'state', 'postedAt', 'createdAt', 'updatedAt'],
|
||||
properties: [
|
||||
{
|
||||
name: '_id',
|
||||
|
||||
@ -6,8 +6,6 @@ import dayjs from 'dayjs'
|
||||
export const SubJob = {
|
||||
name: 'subJob',
|
||||
label: 'Sub Job',
|
||||
labelPlural: 'Sub Jobs',
|
||||
url: '/dashboard/production/subjobs',
|
||||
prefix: 'SJB',
|
||||
icon: SubJobIcon,
|
||||
actions: [
|
||||
|
||||
@ -8,8 +8,6 @@ import BinIcon from '../../components/Icons/BinIcon'
|
||||
export const TaxRate = {
|
||||
name: 'taxRate',
|
||||
label: 'Tax Rate',
|
||||
labelPlural: 'Tax Rates',
|
||||
url: '/dashboard/management/taxrates',
|
||||
prefix: 'TXR',
|
||||
icon: TaxRateIcon,
|
||||
actions: [
|
||||
|
||||
@ -8,8 +8,6 @@ import BinIcon from '../../components/Icons/BinIcon'
|
||||
export const TaxRecord = {
|
||||
name: 'taxRecord',
|
||||
label: 'Tax Record',
|
||||
labelPlural: 'Tax Records',
|
||||
url: '/dashboard/finance/taxrecords',
|
||||
prefix: 'TXR',
|
||||
icon: TaxRecordIcon,
|
||||
actions: [
|
||||
|
||||
@ -6,8 +6,6 @@ import PlusIcon from '../../components/Icons/PlusIcon'
|
||||
export const User = {
|
||||
name: 'user',
|
||||
label: 'User',
|
||||
labelPlural: 'Users',
|
||||
url: '/dashboard/management/users',
|
||||
prefix: 'USR',
|
||||
icon: PersonIcon,
|
||||
actions: [
|
||||
|
||||
@ -8,8 +8,6 @@ import BinIcon from '../../components/Icons/BinIcon'
|
||||
export const Vendor = {
|
||||
name: 'vendor',
|
||||
label: 'Vendor',
|
||||
labelPlural: 'Vendors',
|
||||
url: '/dashboard/management/vendors',
|
||||
prefix: 'VEN',
|
||||
icon: VendorIcon,
|
||||
actions: [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user