FPSMS-frontend
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

108 lines
2.2 KiB

  1. // Type definitions that can be used in both client and server components
  2. export interface ItemQcCategoryMappingInfo {
  3. id: number;
  4. itemId: number;
  5. itemCode?: string;
  6. itemName?: string;
  7. qcCategoryId: number;
  8. qcCategoryCode?: string;
  9. qcCategoryName?: string;
  10. type?: string;
  11. }
  12. export interface QcCategoryResult {
  13. id: number;
  14. code: string;
  15. name: string;
  16. description?: string;
  17. type?: string | null; // add this: items_qc_category_mapping.type for this category
  18. }
  19. export interface QcItemInfo {
  20. id: number;
  21. order: number;
  22. qcItemId: number;
  23. code: string;
  24. name?: string;
  25. description?: string;
  26. }
  27. export interface DeleteResponse {
  28. success: boolean;
  29. message?: string;
  30. canDelete: boolean;
  31. }
  32. export interface QcCategoryWithCounts {
  33. id: number;
  34. code: string;
  35. name: string;
  36. description?: string;
  37. itemCount: number;
  38. qcItemCount: number;
  39. }
  40. export interface QcCategoryWithItemCount {
  41. id: number;
  42. code: string;
  43. name: string;
  44. description?: string;
  45. itemCount: number;
  46. }
  47. export interface QcCategoryWithQcItemCount {
  48. id: number;
  49. code: string;
  50. name: string;
  51. description?: string;
  52. qcItemCount: number;
  53. }
  54. export interface QcItemWithCounts {
  55. id: number;
  56. code: string;
  57. name: string;
  58. description?: string;
  59. qcCategoryCount: number;
  60. }
  61. // Type definitions that match the server-only types
  62. export interface QcCategoryResult {
  63. id: number;
  64. code: string;
  65. name: string;
  66. description?: string;
  67. }
  68. export interface QcItemResult {
  69. id: number;
  70. code: string;
  71. name: string;
  72. description: string;
  73. }
  74. export interface ItemsResult {
  75. id: string | number;
  76. code: string;
  77. name: string;
  78. description: string | undefined;
  79. remarks: string | undefined;
  80. shelfLife: number | undefined;
  81. countryOfOrigin: string | undefined;
  82. maxQty: number | undefined;
  83. type: string;
  84. qcChecks: any[];
  85. action?: any;
  86. fgName?: string;
  87. excludeDate?: string;
  88. qcCategory?: QcCategoryResult;
  89. store_id?: string | undefined;
  90. warehouse?: string | undefined;
  91. area?: string | undefined;
  92. slot?: string | undefined;
  93. LocationCode?: string | undefined;
  94. locationCode?: string | undefined;
  95. isEgg?: boolean | undefined;
  96. isFee?: boolean | undefined;
  97. isBag?: boolean | undefined;
  98. }