Commit 89a5a079 authored by alish's avatar alish
Browse files

feat: complete shopping cart

parent a1e85c44
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -43,6 +43,11 @@ export class WarehouseOrdersRouter implements IWarehouseOrdersRouter {
		return this._orderFactory(order);
	}

	async userComplete(orderId: string): Promise<Order> {
		const order = await this.router.run<IOrder>('userComplete', orderId);
		return this._orderFactory(order);
	}

	async addMore(
		warehouseId: string,
		userId: string,
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
	"name": "@ever-platform/common",
	"description": "Ever Platform Shared Core",
	"license": "AGPL-3.0",
	"version": "0.3.24",
	"version": "0.3.31",
	"homepage": "https://ever.co",
	"repository": {
		"type": "git",
+10 −0
Original line number Diff line number Diff line
@@ -142,6 +142,16 @@ class Order extends DBObject<IOrder, IOrderCreateObject> implements IOrder {
	@Column()
	isCancelled: boolean;

	/**
	 * Is Order wait for completion by user
	 *
	 * @type {boolean}
	 * @memberof Order
	 */
	@Types.Boolean(false)
	@Column()
	waitForCompletion: boolean;

	/**
	 * Is Order Paid by Customer
	 *
+7 −0
Original line number Diff line number Diff line
@@ -53,6 +53,13 @@ export interface IOrderCreateObject extends DBCreateObject {
	 */
	isCancelled?: boolean;

	/**
	 *
	 * @type {boolean}
	 * @memberof IOrderCreateObject
	 */
	waitForCompletion?: boolean;

	/**
	 * Indicate if Order was fully paid
	 *
+1 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ export interface IOrderCreateInput {
	products: IOrderCreateInputProduct[];

	orderType?: DeliveryType;
	waitForCompletion?: boolean;
	options?: IWarehouseOrdersRouterCreateOptions;
}

Loading