fix(order): order list payment and fulfillment status (#7934)

This commit is contained in:
Carlos R. L. Rodrigues
2024-07-04 06:37:25 -03:00
committed by GitHub
parent 41c4307fc7
commit 56394fe0d4
8 changed files with 143 additions and 23 deletions
@@ -78,14 +78,19 @@ export function setFindMethods<T>(klass: Constructor<T>, entity: any) {
orderWhere.items ??= {}
orderWhere.items.version = version
orderWhere.items.deleted_at ??= null
popWhere.shipping_methods ??= {}
popWhere.shipping_methods.version = version
popWhere.shipping_methods.deleted_at ??= null
if (!config.options.orderBy) {
config.options.orderBy = { id: "ASC" }
}
config.where ??= {}
config.where.deleted_at ??= null
return await manager.find(entity, config.where, config.options)
}
@@ -152,9 +157,11 @@ export function setFindMethods<T>(klass: Constructor<T>, entity: any) {
orderWhere.items ??= {}
orderWhere.items.version = version
orderWhere.items.deleted_at ??= null
popWhere.shipping_methods ??= {}
popWhere.shipping_methods.version = version
popWhere.shipping_methods.deleted_at ??= null
if (!config.options.orderBy) {
config.options.orderBy = { id: "ASC" }