mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
Merged PR 1885: Remi Add Flow - ohne offener Remi
Related work items: #5135
This commit is contained in:
committed by
Nino Righi
parent
b015e97e1f
commit
442670bdd0
@@ -1,74 +1,64 @@
|
||||
import {
|
||||
type Meta,
|
||||
type StoryObj,
|
||||
argsToTemplate,
|
||||
moduleMetadata,
|
||||
} from '@storybook/angular';
|
||||
import { ProductStockInfoComponent } from '@isa/remission/shared/product';
|
||||
import { provideProductImageUrl } from '@isa/shared/product-image';
|
||||
import { provideProductRouterLinkBuilder } from '@isa/shared/product-router-link';
|
||||
|
||||
const meta: Meta<ProductStockInfoComponent> = {
|
||||
component: ProductStockInfoComponent,
|
||||
title: 'remission/shared/product/ProductStockInfoComponent',
|
||||
decorators: [
|
||||
moduleMetadata({
|
||||
providers: [
|
||||
provideProductImageUrl('https://produktbilder-test.paragon-data.net'),
|
||||
provideProductRouterLinkBuilder((ean: string) => ean),
|
||||
],
|
||||
}),
|
||||
],
|
||||
args: {
|
||||
stock: 92,
|
||||
removedFromStock: 0,
|
||||
predefinedReturnQuantity: 4,
|
||||
remainingQuantityInStock: 0,
|
||||
zob: 0,
|
||||
},
|
||||
argTypes: {
|
||||
stock: {
|
||||
control: { type: 'number' },
|
||||
description: 'The current stock of the product.',
|
||||
defaultValue: 0,
|
||||
},
|
||||
removedFromStock: {
|
||||
control: { type: 'number' },
|
||||
description: 'The amount of stock that has been removed.',
|
||||
defaultValue: 0,
|
||||
},
|
||||
predefinedReturnQuantity: {
|
||||
control: { type: 'number' },
|
||||
description: 'The predefined return quantity for the product.',
|
||||
defaultValue: 0,
|
||||
},
|
||||
remainingQuantityInStock: {
|
||||
control: { type: 'number' },
|
||||
description: 'The remaining quantity in stock after returns.',
|
||||
defaultValue: 0,
|
||||
},
|
||||
zob: {
|
||||
control: { type: 'number' },
|
||||
description: 'Min Stock Category Management Information.',
|
||||
defaultValue: 0,
|
||||
},
|
||||
},
|
||||
render: (args) => ({
|
||||
props: args,
|
||||
template: `<remi-product-stock-info ${argsToTemplate(args)}></remi-product-stock-info>`,
|
||||
}),
|
||||
};
|
||||
|
||||
export default meta;
|
||||
|
||||
type Story = StoryObj<ProductStockInfoComponent>;
|
||||
|
||||
export const Default: Story = {
|
||||
args: {
|
||||
stock: 92,
|
||||
removedFromStock: 0,
|
||||
predefinedReturnQuantity: 4,
|
||||
remainingQuantityInStock: 0,
|
||||
zob: 0,
|
||||
},
|
||||
};
|
||||
import {
|
||||
type Meta,
|
||||
type StoryObj,
|
||||
argsToTemplate,
|
||||
moduleMetadata,
|
||||
} from '@storybook/angular';
|
||||
import { ProductStockInfoComponent } from '@isa/remission/shared/product';
|
||||
import { provideProductImageUrl } from '@isa/shared/product-image';
|
||||
import { provideProductRouterLinkBuilder } from '@isa/shared/product-router-link';
|
||||
|
||||
const meta: Meta<ProductStockInfoComponent> = {
|
||||
component: ProductStockInfoComponent,
|
||||
title: 'remission/shared/product/ProductStockInfoComponent',
|
||||
decorators: [
|
||||
moduleMetadata({
|
||||
providers: [
|
||||
provideProductImageUrl('https://produktbilder-test.paragon-data.net'),
|
||||
provideProductRouterLinkBuilder((ean: string) => ean),
|
||||
],
|
||||
}),
|
||||
],
|
||||
args: {
|
||||
availableStock: 92,
|
||||
stockToRemit: 91,
|
||||
targetStock: 1,
|
||||
zob: 0,
|
||||
},
|
||||
argTypes: {
|
||||
availableStock: {
|
||||
control: { type: 'number' },
|
||||
description: 'Total available stock for the product.',
|
||||
},
|
||||
stockToRemit: {
|
||||
control: { type: 'number' },
|
||||
description: 'Stock quantity to remit.',
|
||||
},
|
||||
targetStock: {
|
||||
control: { type: 'number' },
|
||||
description: 'Target stock level after remittance.',
|
||||
},
|
||||
zob: {
|
||||
control: { type: 'number' },
|
||||
description: 'Min Stock Category Management Information.',
|
||||
defaultValue: 0,
|
||||
},
|
||||
},
|
||||
render: (args) => ({
|
||||
props: args,
|
||||
template: `<remi-product-stock-info ${argsToTemplate(args)}></remi-product-stock-info>`,
|
||||
}),
|
||||
};
|
||||
|
||||
export default meta;
|
||||
|
||||
type Story = StoryObj<ProductStockInfoComponent>;
|
||||
|
||||
export const Default: Story = {
|
||||
args: {
|
||||
availableStock: 92,
|
||||
stockToRemit: 91,
|
||||
targetStock: 1,
|
||||
zob: 0,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user