update models and create consumer domain accounts permissions
This commit is contained in:
@@ -34,7 +34,7 @@ export class CustomerSaleInvoicesService {
|
||||
account: {
|
||||
select: {
|
||||
role: true,
|
||||
user: {
|
||||
consumer: {
|
||||
select: {
|
||||
first_name: true,
|
||||
last_name: true,
|
||||
@@ -50,13 +50,13 @@ export class CustomerSaleInvoicesService {
|
||||
created_at: true,
|
||||
}
|
||||
|
||||
async findAll(user_id: string, customer_id: string, page = 1, pageSize = 10) {
|
||||
async findAll(consumer_id: string, customer_id: string, page = 1, pageSize = 10) {
|
||||
const salesWhere: SalesInvoiceWhereInput = {
|
||||
customer_id,
|
||||
pos: {
|
||||
complex: {
|
||||
business_activity: {
|
||||
user_id,
|
||||
consumer_id,
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -96,7 +96,7 @@ export class CustomerSaleInvoicesService {
|
||||
})
|
||||
}
|
||||
|
||||
async findOne(user_id: string, customer_id: string, id: string) {
|
||||
async findOne(consumer_id: string, customer_id: string, id: string) {
|
||||
const account = await this.prisma.salesInvoice.findUniqueOrThrow({
|
||||
where: {
|
||||
id,
|
||||
@@ -104,7 +104,7 @@ export class CustomerSaleInvoicesService {
|
||||
pos: {
|
||||
complex: {
|
||||
business_activity: {
|
||||
user_id,
|
||||
consumer_id,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user