up
This commit is contained in:
@@ -14,7 +14,6 @@ export class AdminRepository extends EntityRepository<Admin> {
|
|||||||
const admins = await this.em.find(
|
const admins = await this.em.find(
|
||||||
Admin,
|
Admin,
|
||||||
{ roles: { shop: { id: shopId }, role: { permissions: { name: permission } } } },
|
{ roles: { shop: { id: shopId }, role: { permissions: { name: permission } } } },
|
||||||
{ populate: ['roles', 'roles.role', 'roles.role.permissions'] },
|
|
||||||
);
|
);
|
||||||
return admins;
|
return admins;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,6 +58,8 @@ export class OrderListeners {
|
|||||||
|
|
||||||
// get admnin os restuaraant that have order permissuins
|
// get admnin os restuaraant that have order permissuins
|
||||||
const admins = await this.adminService.findAdminsWithPermission(event.shopId, Permission.MANAGE_ORDERS);
|
const admins = await this.adminService.findAdminsWithPermission(event.shopId, Permission.MANAGE_ORDERS);
|
||||||
|
console.log(admins);
|
||||||
|
|
||||||
const recipients = admins.map(admin => ({
|
const recipients = admins.map(admin => ({
|
||||||
adminId: admin.id,
|
adminId: admin.id,
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -5,4 +5,9 @@
|
|||||||
2.3 after preapring order noti to user
|
2.3 after preapring order noti to user
|
||||||
2.4 after deliver to recipint notif to user
|
2.4 after deliver to recipint notif to user
|
||||||
2.5 after shiped => notif to user
|
2.5 after shiped => notif to user
|
||||||
2.6
|
2.6
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Bugs :
|
||||||
|
1. after order creation sms not sent to admins
|
||||||
Reference in New Issue
Block a user