Skip to content

Commit 52af264

Browse files
authored
Merge pull request #75 from wbbly/dev
UPDATE | Invoices. Feature updates
2 parents ccf7ec2 + 6fd686f commit 52af264

17 files changed

Lines changed: 1705 additions & 84 deletions

app/fonts/Roboto-Italic.ttf

169 KB
Binary file not shown.

app/fonts/Roboto-Medium.ttf

168 KB
Binary file not shown.

app/fonts/Roboto-MediumItalic.ttf

172 KB
Binary file not shown.

app/fonts/Roboto-Regular.ttf

167 KB
Binary file not shown.

app/package-lock.json

Lines changed: 816 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"passport": "0.4.0",
5252
"passport-http-bearer": "1.0.1",
5353
"path": "0.12.7",
54+
"pdfmake": "^0.1.68",
5455
"reflect-metadata": "0.1.13",
5556
"rimraf": "2.6.3",
5657
"rxjs": "6.4.0",

app/src/client/client.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export class ClientService {
2828
_eq: "${currentTeamId}"
2929
}
3030
}
31-
order_by: {name: asc}
31+
order_by: {created_at: asc}
3232
) {
3333
id
3434
name

app/src/core/http-requests/http-requests.service.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,21 @@ export class HttpRequestsService {
2222
.pipe(map(response => response.data));
2323
}
2424

25+
graphql(query: any, variables?: any): Observable<AxiosResponse | AxiosError> {
26+
return this.httpService
27+
.post(
28+
process.env.GRAPHQL_URL,
29+
{ query, variables },
30+
{
31+
headers: {
32+
'Content-Type': 'application/json',
33+
'X-Hasura-Access-Key': process.env.GRAPHQL_ACCESS_KEY,
34+
},
35+
}
36+
)
37+
.pipe(map(response => response.data));
38+
}
39+
2540
requestJiraPost(url: string, query: any, token: string): Observable<AxiosResponse | AxiosError> {
2641
return this.httpService
2742
.post(url, query, {

app/src/invoice/interfaces/invoice.interface.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ import { User } from '../../user/interfaces/user.interface';
22
import { Client } from '../../client/interfaces/client.interface';
33
import { Team } from '../../team/interfaces/team.interface';
44
import { InvoiceProject } from '../../invoice/interfaces/invoice_project.interface';
5+
import { InvoiceVendor } from '../../invoice/interfaces/invoice_vendor.interface';
56

67
export interface Invoice {
78
id?: string;
8-
invoice_number?: number;
9+
invoice_number?: string;
10+
invoice_vendor_id?: string;
911
vendor_id?: string;
1012
client_id?: string;
1113
user_id?: string;
@@ -24,4 +26,11 @@ export interface Invoice {
2426
client?: Client;
2527
team?: Team;
2628
invoice_projects?: InvoiceProject[];
29+
invoice_vendor?: InvoiceVendor;
30+
sending_status?: boolean;
31+
timezone_offset?: number;
32+
status?: string;
33+
overdue?: boolean;
34+
to?: Client;
35+
projects?: InvoiceProject[];
2736
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Invoice } from '../../invoice/interfaces/invoice.interface';
2+
3+
export interface InvoiceVendor {
4+
id?: string;
5+
username?: string;
6+
email?: string;
7+
language?: string;
8+
phone?: string;
9+
state?: string;
10+
country?: string;
11+
city?: string;
12+
zip?: string;
13+
invoice?: Invoice;
14+
company_name?: string;
15+
}

0 commit comments

Comments
 (0)