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