Added product admin features
This commit is contained in:
@@ -2,6 +2,7 @@ export interface Category {
|
||||
id: number;
|
||||
name: string;
|
||||
path: string;
|
||||
pathNumeric: string;
|
||||
isLeaf: number;
|
||||
depth: number;
|
||||
childCount: number;
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
import { Orientation } from './product-types';
|
||||
|
||||
export interface Interior {
|
||||
id: number;
|
||||
roomName: string;
|
||||
position: number;
|
||||
roomType: string;
|
||||
uri: string;
|
||||
roomNumber: number;
|
||||
type: InteriorType;
|
||||
orientation: Orientation;
|
||||
}
|
||||
|
||||
export enum InteriorType {
|
||||
WALLPAPER,
|
||||
PAINTING,
|
||||
POSTER,
|
||||
FRAMED_PRINT,
|
||||
}
|
||||
|
||||
export interface InteriorsFilter {
|
||||
productId: number;
|
||||
type: InteriorType;
|
||||
orientation: Orientation;
|
||||
}
|
||||
|
||||
export interface InteriorsFilterInput {
|
||||
filter?: InteriorsFilter;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export interface Market {
|
||||
id: number;
|
||||
name: string;
|
||||
vat: number;
|
||||
currency: string;
|
||||
priceAdjustment: number;
|
||||
}
|
||||
@@ -1,13 +1,3 @@
|
||||
import { DateInput } from './types';
|
||||
|
||||
export interface Market {
|
||||
id: number;
|
||||
name: string;
|
||||
vat: number;
|
||||
currency: string;
|
||||
priceAdjustment: number;
|
||||
}
|
||||
|
||||
export interface Address {
|
||||
id: number;
|
||||
firstname: string;
|
||||
|
||||
@@ -15,6 +15,19 @@ export enum ProductType {
|
||||
PHOTO = 1,
|
||||
ILLUSTRATION = 2,
|
||||
}
|
||||
|
||||
export enum ProductWallpaperType {
|
||||
WALLMURAL = 1,
|
||||
DESIGN = 2,
|
||||
}
|
||||
|
||||
export enum Orientation {
|
||||
UNKNOWN = 0,
|
||||
PORTRAIT = 1,
|
||||
LANDSCAPE = 2,
|
||||
SQUARE = 3,
|
||||
}
|
||||
|
||||
export interface ProductBlacklist {
|
||||
id: number;
|
||||
groupId: number;
|
||||
@@ -34,16 +47,44 @@ export interface PrintProduct {
|
||||
|
||||
export interface Product {
|
||||
id: number;
|
||||
stockid: number;
|
||||
path: string;
|
||||
visible: boolean;
|
||||
browsable: boolean;
|
||||
inserted: Date;
|
||||
updated?: Date;
|
||||
orientation?: Orientation;
|
||||
printProducts: [PrintProduct];
|
||||
blacklisting: [ProductBlacklist];
|
||||
type: [ProductType];
|
||||
api1json: JSON;
|
||||
fields_json: JSON;
|
||||
fields: ProductFields;
|
||||
fields_json: JSON; // remove later
|
||||
}
|
||||
|
||||
// TODO: test stock products to see what props can be mandatory
|
||||
export interface ProductFields {
|
||||
artNo: string;
|
||||
name: string;
|
||||
height?: number;
|
||||
width?: number;
|
||||
photowallResolution?: number;
|
||||
canvasResolution?: number;
|
||||
wallpaperResolution?: number;
|
||||
copyright?: string;
|
||||
proportionsWarning?: string;
|
||||
marginWidthMax?: number;
|
||||
marginWidthMin?: number;
|
||||
marginHeightMax?: number;
|
||||
marginHeightMin?: number;
|
||||
focusXpoint?: number;
|
||||
focusYpoint?: number;
|
||||
focusXpoint2?: number;
|
||||
focusYpoint2?: number;
|
||||
batch?: string;
|
||||
imageResolution?: number;
|
||||
printFileWidth?: number;
|
||||
printFileHeight?: number;
|
||||
printFileDpi?: number;
|
||||
}
|
||||
|
||||
export function getProductGroupStringFromString(group: string): string {
|
||||
|
||||
Reference in New Issue
Block a user