diff --git a/src/app/@core/data/partner-price-new.ts b/src/app/@core/data/partner-price-new.ts
new file mode 100644
index 00000000..8b29aa50
--- /dev/null
+++ b/src/app/@core/data/partner-price-new.ts
@@ -0,0 +1 @@
+export interface PartnerPriceNew { lovCode: string, lovName: string }
\ No newline at end of file
diff --git a/src/app/pages/partner-price/partner-price-new/partner-price-new.component.css b/src/app/pages/partner-price/partner-price-new/partner-price-new.component.css
deleted file mode 100644
index e69de29b..00000000
diff --git a/src/app/pages/partner-price/partner-price-new/partner-price-new.component.html b/src/app/pages/partner-price/partner-price-new/partner-price-new.component.html
index e69de29b..43e09edb 100644
--- a/src/app/pages/partner-price/partner-price-new/partner-price-new.component.html
+++ b/src/app/pages/partner-price/partner-price-new/partner-price-new.component.html
@@ -0,0 +1,13 @@
+
+
+
+
+ {{ item }}
+
+
+
+
\ No newline at end of file
diff --git a/src/app/pages/partner-price/partner-price-new/partner-price-new.component.scss b/src/app/pages/partner-price/partner-price-new/partner-price-new.component.scss
new file mode 100644
index 00000000..099ecb20
--- /dev/null
+++ b/src/app/pages/partner-price/partner-price-new/partner-price-new.component.scss
@@ -0,0 +1,16 @@
+nb-checkbox {
+ margin-bottom: 1rem;
+ }
+
+ .form-inline [fullWidth] {
+ flex: 1;
+ }
+
+ .form-inline > * {
+ margin: 0 1.5rem 1.5rem 0;
+ }
+
+ nb-card.inline-form-card nb-card-body {
+ padding-bottom: 0;
+ }
+
\ No newline at end of file
diff --git a/src/app/pages/partner-price/partner-price-new/partner-price-new.component.ts b/src/app/pages/partner-price/partner-price-new/partner-price-new.component.ts
index e69de29b..a647279f 100644
--- a/src/app/pages/partner-price/partner-price-new/partner-price-new.component.ts
+++ b/src/app/pages/partner-price/partner-price-new/partner-price-new.component.ts
@@ -0,0 +1,28 @@
+import { Component, OnInit } from '@angular/core';
+import { PartnerPriceService } from '../partner-price.service';
+import { PartnerPriceNew } from '../../../@core/data/partner-price-new';
+import { NbWindowRef } from '@nebular/theme';
+
+@Component({
+ selector: 'ngx-partner-price-new',
+ styleUrls: ['./partner-price-new.component.scss'],
+ templateUrl: './partner-price-new.component.html',
+})
+export class PartnerPriceNewComponent implements OnInit {
+
+ items: PartnerPriceNew[] = []
+
+ constructor(private service: PartnerPriceService, public windowRef: NbWindowRef ) {
+ }
+
+ ngOnInit(): void {
+ this.getData();
+ }
+
+ getData() {
+ this.service.getNewPrtnerPriceParam().subscribe((result) => {
+ this.items = Object.assign([], result);
+ });
+ }
+
+}
\ No newline at end of file
diff --git a/src/app/pages/partner-price/partner-price.component.ts b/src/app/pages/partner-price/partner-price.component.ts
index ef5a5d01..8b88c04e 100644
--- a/src/app/pages/partner-price/partner-price.component.ts
+++ b/src/app/pages/partner-price/partner-price.component.ts
@@ -3,6 +3,7 @@ import { PartnerPriceService } from './partner-price.service';
import { PartnerPriceDetailComponent } from './partner-price-detail/partner-price-detail.component';
import { NbWindowService } from '@nebular/theme';
import { PartnerPrice } from '../../@core/data/partner-price';
+import { PartnerPriceNewComponent } from './partner-price-new/partner-price-new.component';
@Component({
selector: 'ngx-partner-price',
@@ -97,8 +98,9 @@ export class PartnerPriceComponent implements OnInit {
}
openCreateDialog(event) {
-
- //logic
+ this.windowService.open(PartnerPriceNewComponent, {
+ title: 'Add Partner Price',
+ });
}
openWindowForm(event) {
diff --git a/src/app/pages/partner-price/partner-price.module.ts b/src/app/pages/partner-price/partner-price.module.ts
index a85b57b5..fad8feb2 100644
--- a/src/app/pages/partner-price/partner-price.module.ts
+++ b/src/app/pages/partner-price/partner-price.module.ts
@@ -6,7 +6,8 @@ import {
NbTreeGridModule,
NbButtonModule,
NbCheckboxModule,
- NbRadioModule} from '@nebular/theme';
+ NbRadioModule,
+ NbSelectModule} from '@nebular/theme';
import { Ng2SmartTableModule } from 'ng2-smart-table';
import { ThemeModule } from '../../@theme/theme.module';
@@ -14,6 +15,7 @@ import { PartnerPriceComponent } from './partner-price.component';
import { PartnerPriceService } from './partner-price.service';
import { PartnerPriceDetailComponent } from './partner-price-detail/partner-price-detail.component';
import { FormsModule } from '@angular/forms';
+import { PartnerPriceNewComponent } from './partner-price-new/partner-price-new.component';
@NgModule({
imports: [
@@ -27,17 +29,21 @@ import { FormsModule } from '@angular/forms';
NbCheckboxModule,
Ng2SmartTableModule,
FormsModule,
+ NbSelectModule,
],
declarations: [
PartnerPriceComponent,
PartnerPriceDetailComponent,
+ PartnerPriceNewComponent,
],
providers: [
PartnerPriceService,
PartnerPriceDetailComponent,
+ PartnerPriceNewComponent,
],
entryComponents: [
PartnerPriceDetailComponent,
+ PartnerPriceNewComponent,
],
})
export class PromotionModule { }
diff --git a/src/app/pages/partner-price/partner-price.service.ts b/src/app/pages/partner-price/partner-price.service.ts
index 1d29b669..8e603c81 100644
--- a/src/app/pages/partner-price/partner-price.service.ts
+++ b/src/app/pages/partner-price/partner-price.service.ts
@@ -6,6 +6,7 @@ import { HttpErrorResponse } from '@angular/common/http';
import { PromotionList } from '../../@core/data/promotion';
import { PartnerPrice } from '../../@core/data/partner-price';
import { PartnerPriceDetail } from '../../@core/data/partner-price-detail';
+import { PartnerPriceNew } from '../../@core/data/partner-price-new';
@Injectable({
providedIn: 'root',
@@ -30,6 +31,14 @@ export class PartnerPriceService {
);
}
+ getNewPrtnerPriceParam(): Observable{
+ const url = 'http://34.87.6.140:8011/api/lov/getCustomerInput';
+ return this.http.post(url, null).pipe(
+ map(this.extractData),
+ catchError(this.handleError),
+ );
+ }
+
// postPromotion(data: PromotionList): Observable {
// const headers = new HttpHeaders({
// 'Content-Type': 'application/json',
@@ -50,6 +59,11 @@ export class PartnerPriceService {
return Object.assign(body.content);
}
+
+ private extractDataParamNew(body: any): PartnerPriceNew[] {
+ return Object.assign(body.content);
+ }
+
private handleError(error: HttpErrorResponse | any) {
let errMsg: string;
let errObj: any;