removed changes not to core
This commit is contained in:
@@ -31,11 +31,6 @@ class ManualFulfillmentService extends FulfillmentService {
|
||||
throw Error("Manual Fulfillment service cannot calculatePrice")
|
||||
}
|
||||
|
||||
createReturn() {
|
||||
// No data is being sent anywhere
|
||||
return Promise.resolve({})
|
||||
}
|
||||
|
||||
createOrder() {
|
||||
// No data is being sent anywhere
|
||||
return Promise.resolve({})
|
||||
|
||||
@@ -135,7 +135,7 @@ class ClaimService extends BaseService {
|
||||
}
|
||||
}
|
||||
|
||||
if(no_notification !== undefined || no_notification !== null){
|
||||
if(no_notification !== undefined){
|
||||
claim.no_notification = no_notification
|
||||
await claimRepo.save(claim)
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import { Brackets } from "typeorm"
|
||||
class DraftOrderService extends BaseService {
|
||||
static Events = {
|
||||
CREATED: "draft_order.created",
|
||||
UPDATED: "draft_order.updated",
|
||||
}
|
||||
|
||||
constructor({
|
||||
@@ -336,6 +337,36 @@ class DraftOrderService extends BaseService {
|
||||
await draftOrderRepo.save(draftOrder)
|
||||
})
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param {String} doId
|
||||
* @param {} data
|
||||
* @returns
|
||||
*/
|
||||
async update(doId, data){
|
||||
return this.atomicPhase_(async manager => {
|
||||
const doRepo = manager.getCustomRepository(this.draftOrderRepository_)
|
||||
const draftOrder = await this.retrieve(doId)
|
||||
let touched = false
|
||||
|
||||
if(data.no_notification_order !== undefined){
|
||||
touched = true
|
||||
draftOrder.no_notification_order = data.no_notification_order
|
||||
}
|
||||
|
||||
if(touched){
|
||||
doRepo.save(draftOrder)
|
||||
|
||||
await this.eventBus_
|
||||
.withTransaction(manager)
|
||||
.emit(DraftOrderService.Events.UPDATED, {
|
||||
id: draftOrder.id
|
||||
})
|
||||
}
|
||||
|
||||
return draftOrder
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export default DraftOrderService
|
||||
|
||||
@@ -805,6 +805,10 @@ class OrderService extends BaseService {
|
||||
await this.updateBillingAddress_(order, update.billing_address)
|
||||
}
|
||||
|
||||
if("no_notification" in update){
|
||||
order.no_notification = update.no_notification
|
||||
}
|
||||
|
||||
if ("items" in update) {
|
||||
for (const item of update.items) {
|
||||
await this.lineItemService_.withTransaction(manager).create({
|
||||
|
||||
Reference in New Issue
Block a user