mirror of
https://github.com/ever-co/ever-gauzy.git
synced 2026-10-02 10:05:00 +08:00
fix: #6909 reverted left join (deprecated)
This commit is contained in:
@@ -419,6 +419,12 @@ export class ContactsComponent extends PaginationFilterBaseComponent implements
|
||||
this.smartTableSource = new ServerDataSource(this.http, {
|
||||
endPoint: `${API_PREFIX}/organization-contact/pagination`,
|
||||
relations: ['projects.members', 'members.user', 'tags', 'contact'],
|
||||
join: {
|
||||
alias: 'organization_contact',
|
||||
leftJoin: {
|
||||
members: 'organization_contact.members'
|
||||
}
|
||||
},
|
||||
where: {
|
||||
organizationId,
|
||||
tenantId,
|
||||
|
||||
@@ -331,9 +331,17 @@ export class DepartmentsComponent
|
||||
this.smartTableSource = new ServerDataSource(this.httpClient, {
|
||||
endPoint: `${API_PREFIX}/organization-department/pagination`,
|
||||
relations: ['members', 'members.user', 'tags'],
|
||||
join: {
|
||||
alias: 'organization_department',
|
||||
leftJoin: {
|
||||
tags: 'organization_department.tags'
|
||||
},
|
||||
...(this.filters.join ? this.filters.join : {})
|
||||
},
|
||||
where: {
|
||||
...{ organizationId, tenantId },
|
||||
...this.filters.where
|
||||
tenantId,
|
||||
organizationId,
|
||||
...(this.filters.where ? this.filters.where : {})
|
||||
},
|
||||
resultMap: (department: IOrganizationDepartment) => {
|
||||
return department;
|
||||
|
||||
+9
-1
@@ -260,7 +260,15 @@ export class ExpenseCategoriesComponent
|
||||
|
||||
this.smartTableSource = new ServerDataSource(this.httpClient, {
|
||||
endPoint: `${API_PREFIX}/expense-categories/pagination`,
|
||||
relations: ['tags'],
|
||||
relations: [
|
||||
'tags'
|
||||
],
|
||||
join: {
|
||||
alias: 'expense_category',
|
||||
leftJoin: {
|
||||
tags: 'expense_category.tags'
|
||||
}
|
||||
},
|
||||
where: {
|
||||
organizationId,
|
||||
tenantId,
|
||||
|
||||
@@ -507,6 +507,13 @@ export class IncomeComponent extends PaginationFilterBaseComponent
|
||||
'organization',
|
||||
'client'
|
||||
],
|
||||
join: {
|
||||
alias: 'income',
|
||||
leftJoin: {
|
||||
tags: 'income.tags'
|
||||
},
|
||||
...(this.filters.join ? this.filters.join : {})
|
||||
},
|
||||
where: {
|
||||
organizationId,
|
||||
tenantId,
|
||||
|
||||
@@ -221,6 +221,14 @@ export class InvoicesReceivedComponent
|
||||
this.smartTableSource = new ServerDataSource(this.httpClient, {
|
||||
endPoint: `${API_PREFIX}/invoices/pagination`,
|
||||
relations: ['payments', 'tags', 'toContact'],
|
||||
join: {
|
||||
alias: 'invoice',
|
||||
leftJoin: {
|
||||
tags: 'invoice.tags',
|
||||
toContact: 'invoice.toContact'
|
||||
},
|
||||
...(this.filters.join) ? this.filters.join : {}
|
||||
},
|
||||
where: {
|
||||
sentTo: organizationId,
|
||||
tenantId,
|
||||
|
||||
@@ -94,7 +94,16 @@ export abstract class CrudService<T extends BaseEntity>
|
||||
const [items, total] = await this.repository.findAndCount({
|
||||
skip: options && options.skip ? (options.take * (options.skip - 1)) : 0,
|
||||
take: options && options.take ? (options.take) : 10,
|
||||
|
||||
/**
|
||||
* Specifies what relations should be loaded.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
...(
|
||||
(options && options.join) ? {
|
||||
join: options.join
|
||||
} : {}
|
||||
),
|
||||
...(
|
||||
(options && options.select) ? {
|
||||
select: options.select
|
||||
|
||||
Reference in New Issue
Block a user