-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b8f3841
commit f519606
Showing
115 changed files
with
1,416 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/app/core/models/netsuite/db/netsuite-workspace.model.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { NetsuiteOnboardingState } from "../../enum/enum.model"; | ||
import { Workspace } from "../../db/workspaces.model"; | ||
|
||
export interface NetsuiteWorkspace extends Workspace { | ||
fyle_org_id: string; | ||
fyle_currency: string; | ||
cluster_domain: string; | ||
onboarding_state: NetsuiteOnboardingState; | ||
last_synced_at: Date; | ||
ccc_last_synced_at: Date; | ||
source_synced_at: Date; | ||
destination_synced_at: Date; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/app/core/services/netsuite/netsuite-core/netsuite-auth.service.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { TestBed } from '@angular/core/testing'; | ||
|
||
import { NetsuiteAuthService } from './netsuite-auth.service'; | ||
|
||
describe('NetsuiteAuthService', () => { | ||
let service: NetsuiteAuthService; | ||
|
||
beforeEach(() => { | ||
TestBed.configureTestingModule({}); | ||
service = TestBed.inject(NetsuiteAuthService); | ||
}); | ||
|
||
it('should be created', () => { | ||
expect(service).toBeTruthy(); | ||
}); | ||
}); |
20 changes: 20 additions & 0 deletions
20
src/app/core/services/netsuite/netsuite-core/netsuite-auth.service.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { Observable } from 'rxjs'; | ||
import { ApiService } from '../../common/api.service'; | ||
import { Token } from 'src/app/core/models/misc/token.model'; | ||
import { HelperService } from '../../common/helper.service'; | ||
import { AppUrl } from 'src/app/core/models/enum/enum.model'; | ||
|
||
@Injectable({ | ||
providedIn: 'root' | ||
}) | ||
export class NetsuiteAuthService { | ||
|
||
constructor( | ||
private apiService: ApiService | ||
) {} | ||
|
||
loginWithRefreshToken(refresh_token: string): Observable<Token> { | ||
return this.apiService.post('/auth/login_with_refresh_token/', { refresh_token }); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/app/core/services/netsuite/netsuite-core/netsuite-helper.service.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { TestBed } from '@angular/core/testing'; | ||
|
||
import { NetsuiteHelperService } from './netsuite-helper.service'; | ||
|
||
describe('NetsuiteHelperService', () => { | ||
let service: NetsuiteHelperService; | ||
|
||
beforeEach(() => { | ||
TestBed.configureTestingModule({}); | ||
service = TestBed.inject(NetsuiteHelperService); | ||
}); | ||
|
||
it('should be created', () => { | ||
expect(service).toBeTruthy(); | ||
}); | ||
}); |
34 changes: 34 additions & 0 deletions
34
src/app/core/services/netsuite/netsuite-core/netsuite-helper.service.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { Observable } from 'rxjs'; | ||
import { ApiService } from '../../common/api.service'; | ||
import { WorkspaceService } from '../../common/workspace.service'; | ||
import { Cacheable } from 'ts-cacheable'; | ||
|
||
@Injectable({ | ||
providedIn: 'root' | ||
}) | ||
export class NetsuiteHelperService { | ||
|
||
constructor( | ||
private apiService: ApiService, | ||
private workspaceService: WorkspaceService | ||
) { } | ||
|
||
@Cacheable() | ||
syncFyleDimensions() { | ||
return this.apiService.post(`/workspaces/${this.workspaceService.getWorkspaceId()}/fyle/sync_dimensions/`, {}); | ||
} | ||
|
||
@Cacheable() | ||
syncNetsuiteDimensions() { | ||
return this.apiService.post(`/workspaces/${this.workspaceService.getWorkspaceId()}/netsuite/sync_dimensions/`, {}); | ||
} | ||
|
||
refreshFyleDimensions(): Observable<{}> { | ||
return this.apiService.post(`/workspaces/${this.workspaceService.getWorkspaceId()}/fyle/refresh_dimensions/`, {}); | ||
} | ||
|
||
refreshNetsuiteDimensions(): Observable<{}> { | ||
return this.apiService.post(`/workspaces/${this.workspaceService.getWorkspaceId()}/netsuite/refresh_dimensions/`, {}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...ns/netsuite/netsuite-main/netsuite-configuration/netsuite-configuration-routing.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { RouterModule, Routes } from '@angular/router'; | ||
import { NetsuiteConfigurationComponent } from './netsuite-configuration.component'; | ||
import { NetsuiteExportSettingsComponent } from '../../netsuite-shared/netsuite-export-settings/netsuite-export-settings.component'; | ||
import { NetsuiteImportSettingsComponent } from '../../netsuite-shared/netsuite-import-settings/netsuite-import-settings.component'; | ||
import { NetsuiteAdvancedSettingsComponent } from '../../netsuite-shared/netsuite-advanced-settings/netsuite-advanced-settings.component'; | ||
import { NetsuiteConnectorComponent } from '../../netsuite-shared/netsuite-connector/netsuite-connector.component'; | ||
|
||
const routes: Routes = [ | ||
{ | ||
path: '', | ||
component: NetsuiteConfigurationComponent, | ||
children: [ | ||
{ | ||
path: 'connector', | ||
component: NetsuiteConnectorComponent | ||
}, | ||
{ | ||
path: 'export_settings', | ||
component: NetsuiteExportSettingsComponent | ||
}, | ||
{ | ||
path: 'import_settings', | ||
component: NetsuiteImportSettingsComponent | ||
}, | ||
{ | ||
path: 'advanced_settings', | ||
component: NetsuiteAdvancedSettingsComponent | ||
} | ||
] | ||
} | ||
]; | ||
|
||
@NgModule({ | ||
imports: [RouterModule.forChild(routes)], | ||
exports: [RouterModule] | ||
}) | ||
export class NetsuiteConfigurationRoutingModule { } |
1 change: 1 addition & 0 deletions
1
...tions/netsuite/netsuite-main/netsuite-configuration/netsuite-configuration.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<p>netsuite-configuration works!</p> |
Empty file.
23 changes: 23 additions & 0 deletions
23
...ns/netsuite/netsuite-main/netsuite-configuration/netsuite-configuration.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { NetsuiteConfigurationComponent } from './netsuite-configuration.component'; | ||
|
||
describe('NetsuiteConfigurationComponent', () => { | ||
let component: NetsuiteConfigurationComponent; | ||
let fixture: ComponentFixture<NetsuiteConfigurationComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ NetsuiteConfigurationComponent ] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(NetsuiteConfigurationComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
15 changes: 15 additions & 0 deletions
15
...rations/netsuite/netsuite-main/netsuite-configuration/netsuite-configuration.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-netsuite-configuration', | ||
templateUrl: './netsuite-configuration.component.html', | ||
styleUrls: ['./netsuite-configuration.component.scss'] | ||
}) | ||
export class NetsuiteConfigurationComponent implements OnInit { | ||
|
||
constructor() { } | ||
|
||
ngOnInit(): void { | ||
} | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
...tegrations/netsuite/netsuite-main/netsuite-configuration/netsuite-configuration.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
|
||
import { NetsuiteConfigurationRoutingModule } from './netsuite-configuration-routing.module'; | ||
|
||
|
||
@NgModule({ | ||
declarations: [], | ||
imports: [ | ||
CommonModule, | ||
NetsuiteConfigurationRoutingModule | ||
] | ||
}) | ||
export class NetsuiteConfigurationModule { } |
16 changes: 16 additions & 0 deletions
16
...tegrations/netsuite/netsuite-main/netsuite-dashboard/netsuite-dashboard-routing.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { RouterModule, Routes } from '@angular/router'; | ||
import { NetsuiteDashboardComponent } from './netsuite-dashboard.component'; | ||
|
||
const routes: Routes = [ | ||
{ | ||
path: 'dashboard', | ||
component: NetsuiteDashboardComponent | ||
} | ||
]; | ||
|
||
@NgModule({ | ||
imports: [RouterModule.forChild(routes)], | ||
exports: [RouterModule] | ||
}) | ||
export class NetsuiteDashboardRoutingModule { } |
1 change: 1 addition & 0 deletions
1
.../integrations/netsuite/netsuite-main/netsuite-dashboard/netsuite-dashboard.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<p>netsuite-dashboard works!</p> |
Empty file.
Oops, something went wrong.