u
This commit is contained in:
@@ -6,14 +6,4 @@ This document is auto-generated from the JSDoc comments in `src/store` by runnin
|
|||||||
|
|
||||||
*Source: `src/store/articlehistory/record.js`*
|
*Source: `src/store/articlehistory/record.js`*
|
||||||
|
|
||||||
Formats a numeric currency amount in German language style: "€ 1.000,99"
|
============================================================================ ARTICLE HISTORY LOGGER ============================================================================ Recorded History Event Types (`meta.type`): 1. Orders & Inventory Ledger - `order` : Customer order placement (`recordOrderHistory`) - `acceptance` : Incoming supplier delivery without warehouse (`recordAcceptanceHistory`) - `shipment` : Outgoing customer shipment (`recordShipmentHistory`) - `warehouse_in` : Inbound warehouse movement (`recordWarehouseHistory`) - `warehouse_out` : Outbound warehouse movement (`recordWarehouseHistory`) - `delivery` : Legacy incoming delivery with warehouse (`recordDeliveryHistory`) - `movement` : Legacy generic warehouse movement (`recordDeliveryHistory`) - `stock_adjustment` : Manual stock correction (`recordStockAdjustmentHistory`) 2. Core Article Lifecycle & Master Data - `article_created` : Initial article creation (`recordArticleCreatedHistory`) - `article_imported` : Article created via import (`recordArticleImportedHistory`) - `article_update` : General field updates (`recordArticleUpdateHistory`) - `price_change` : Price tier / net / tax modifications (`recordPriceChangeHistory`) - `category_change` : Category assignment changes (`recordCategoryChangeHistory`) - `brand_change` : Brand name updates (`recordBrandChangeHistory`) - `ean_change` : EAN list updates (`recordEanChangeHistory`) - `weight_change` : Article weight changes (`recordWeightChangeHistory`) - `track_stock_change` : Stock tracking toggle (`recordTrackStockChangeHistory`) 3. Variants & Parent/Child Relationships - `parent_converted` : Article converted to parent (`recordParentConvertedHistory`) - `parent_deactivated` : Parent mode disabled (`recordParentDeactivatedHistory`) - `variant_added_to_parent` : Variant linked on parent record (`recordVariantAddedOnParentHistory`) - `child_created_under_parent` : New variant created under parent (`recordChildAssignedToParentHistory`) - `child_assigned_to_parent` : Existing article assigned as variant (`recordChildAssignedToParentHistory`) - `child_unlinked` : Child unlinked from parent - child log (`recordChildUnlinkedFromParentHistory`) - `variant_separated` : Variant separated from parent - parent log (`recordChildUnlinkedFromParentHistory`) - `variant_deleted` : Variant deleted from parent (`recordChildDeletedFromParentHistory`) 4. Suppliers - `supplier_add` : Supplier linked to article (`recordSupplierAddHistory`) - `supplier_update` : Supplier details modified (`recordSupplierUpdateHistory`) - `supplier_delete` : Supplier unlinked from article (`recordSupplierDeleteHistory`) 5. Properties, Attributes & Bills of Materials (BOM) - `property_change` : Property key/value changes (`recordPropertyChangeHistory`) - `property_delete` : Single property removed (`recordPropertyDeleteHistory`) - `attribute_change` : Variant/article attribute changes (`recordAttributeChangeHistory`) - `articlelist_change` : Stückliste / component BOM set (`recordArticleListChangeHistory`) - `optionslist_change` : Optionsliste set (`recordOptionsListChangeHistory`) 6. Media & Images - `image_add` : Image uploaded/linked (`recordImageAddHistory`) - `image_delete` : Image removed (`recordImageDeleteHistory`) - `image_order` : Image gallery reordered (`recordImageOrderHistory`) ============================================================================
|
||||||
|
|
||||||
**Parameters**
|
|
||||||
|
|
||||||
| Name | Type | Description |
|
|
||||||
| --- | --- | --- |
|
|
||||||
| `amount` | `number|string` | The currency amount. |
|
|
||||||
|
|
||||||
**Returns**
|
|
||||||
|
|
||||||
`string` — The formatted currency string.
|
|
||||||
|
|||||||
2
API.md
2
API.md
@@ -335,7 +335,7 @@ The store is exposed as a `LibDashStore` instance (see `src/index.js`). Each met
|
|||||||
- `delete(googleAuthId: number, id: number, tx?: object): Promise<void>`
|
- `delete(googleAuthId: number, id: number, tx?: object): Promise<void>`
|
||||||
- `list(googleAuthId: number, tx?: object): Promise<Array<{id: number, companyId: number, type: string, name: string}>>`
|
- `list(googleAuthId: number, tx?: object): Promise<Array<{id: number, companyId: number, type: string, name: string}>>`
|
||||||
- [articlehistory](API.articlehistory.md)
|
- [articlehistory](API.articlehistory.md)
|
||||||
- `record(amount: number|string): string`
|
- `record(): void`
|
||||||
- [articlelist](API.articlelist.md)
|
- [articlelist](API.articlelist.md)
|
||||||
- `getItemsByArticleSku(googleAuthId: number, sku: string, tx?: object): Promise<Array<{id: number, articleId: number, sku: string, name: string|null, count: number, sort: number}>>`
|
- `getItemsByArticleSku(googleAuthId: number, sku: string, tx?: object): Promise<Array<{id: number, articleId: number, sku: string, name: string|null, count: number, sort: number}>>`
|
||||||
- `setItemsByArticleSku(googleAuthId: number, sku: string, items?: Array<{articleId?: number, sku?: string, count?: number, sort?: number}>, tx?: object): Promise<Array<{id: number, articleId: number, sku: string, name: string|null, count: number, sort: number}>>`
|
- `setItemsByArticleSku(googleAuthId: number, sku: string, items?: Array<{articleId?: number, sku?: string, count?: number, sort?: number}>, tx?: object): Promise<Array<{id: number, articleId: number, sku: string, name: string|null, count: number, sort: number}>>`
|
||||||
|
|||||||
@@ -458,14 +458,14 @@ export async function recordOptionsListChangeHistory(runner, { articleId, compan
|
|||||||
// MARK: - Images & Media
|
// MARK: - Images & Media
|
||||||
|
|
||||||
/** Records image addition to an article. */
|
/** Records image addition to an article. */
|
||||||
export async function recordImageAddHistory(runner, { articleId, companyuserId, date, fullHash, sort }) {
|
export async function recordImageAddHistory(runner, { articleId, companyuserId, date, fullHash, sort, skelehash }) {
|
||||||
const text = typeof sort === 'number' ? `Bild hinzugefügt (Position ${sort + 1})` : 'Bild hinzugefügt';
|
const text = typeof sort === 'number' ? `Bild hinzugefügt (Position ${sort + 1})` : 'Bild hinzugefügt';
|
||||||
return recordArticleHistory(runner, { articleId, companyuserId, date, text, meta: { type: 'image_add', fullHash, sort } });
|
return recordArticleHistory(runner, { articleId, companyuserId, date, text, meta: { type: 'image_add', fullHash, sort, skelehash } });
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Records image deletion from an article. */
|
/** Records image deletion from an article. */
|
||||||
export async function recordImageDeleteHistory(runner, { articleId, companyuserId, date, fullHash }) {
|
export async function recordImageDeleteHistory(runner, { articleId, companyuserId, date, fullHash, skelehash }) {
|
||||||
return recordArticleHistory(runner, { articleId, companyuserId, date, text: 'Bild gelöscht', meta: { type: 'image_delete', fullHash } });
|
return recordArticleHistory(runner, { articleId, companyuserId, date, text: 'Bild gelöscht', meta: { type: 'image_delete', fullHash, skelehash } });
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Records image reordering for an article. */
|
/** Records image reordering for an article. */
|
||||||
|
|||||||
Reference in New Issue
Block a user