add server to monorepo.

This commit is contained in:
a.bouhuolia
2023-02-03 11:57:50 +02:00
parent 28e309981b
commit 80b97b5fdc
1303 changed files with 137049 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import { IInventoryAdjustment } from '@/interfaces';
import { Transformer } from '@/lib/Transformer/Transformer';
export default class InventoryAdjustmentTransformer extends Transformer {
/**
* Include these attributes to sale invoice object.
* @returns {Array}
*/
public includeAttributes = (): string[] => {
return ['formattedType'];
};
/**
* Retrieves the formatted and localized adjustment type.
* @param {IInventoryAdjustment} inventoryAdjustment
* @returns {string}
*/
formattedType(inventoryAdjustment: IInventoryAdjustment) {
const types = {
increment: 'inventory_adjustment.type.increment',
decrement: 'inventory_adjustment.type.decrement',
};
return this.context.i18n.__(types[inventoryAdjustment.type] || '');
}
}