Commit 5fe2b0f6 authored by Tsvetelina Yordanova's avatar Tsvetelina Yordanova
Browse files

fix: #1182 more details for carrier

parent a8f8dd8a
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -135,7 +135,25 @@ export class CarriersService {
						getCarrier(id: $id) {
							id
							firstName
							lastName
							phone
							logo
							isDeleted
							numberOfDeliveries
							skippedOrderIds
							status
							isActive
							username
							isSharedCarrier
							geoLocation {
								city
								streetAddress
								house
								loc {
									type
									coordinates
								}
							}
						}
					}
				`,
+1 −1
Original line number Diff line number Diff line
<div class="iconsCont" style="display: flex;">
	<h6 class="text-center iconBtns">
	<h6 class="text-center iconBtns mr-1">
		<i (click)="openInfo()" class="fa fa-info-circle infoBtn"></i>
	</h6>
	<h6><i (click)="openMap()" class="fa fa-search infoBtn"></i></h6>
+2 −1
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ import { CarrierTableInfoComponent } from '@app/pages/+carriers/+carrier/carrier

@Component({
	templateUrl: './carrier-actions.component.html',
	styles: [' .iconsCont {cursor: pointer}'],
})
export class CarrierActionsComponent implements ViewCell, OnInit {
	value: string | number;
@@ -19,7 +20,7 @@ export class CarrierActionsComponent implements ViewCell, OnInit {
	ngOnInit() {}
	openInfo() {
		const activeModal = this.modalService.open(CarrierTableInfoComponent, {
			size: 'sm',
			size: 'lg',
			container: 'nb-layout',
		});
		const modalComponent: CarrierTableInfoComponent =
+7 −1
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ import { CarrierImageComponent } from './carrier-image/carrier-image.component';
import { TranslateModule } from '@ngx-translate/core';
import { CarrierPhoneComponent } from './carrier-phone/carrier-phone.component';
import { CarrierActionsComponent } from './carrier-actions/carrier-actions.component';
import { HighlightModule } from 'ngx-highlightjs';

const COMPONENTS = [
	CarrierActionsComponent,
@@ -15,7 +16,12 @@ const COMPONENTS = [
];

@NgModule({
	imports: [CommonModule, ThemeModule, TranslateModule.forChild()],
	imports: [
		CommonModule,
		ThemeModule,
		HighlightModule.forRoot({ theme: 'github' }),
		TranslateModule.forChild(),
	],
	declarations: COMPONENTS,
	entryComponents: COMPONENTS,
	exports: COMPONENTS,
+28 −6
Original line number Diff line number Diff line
@@ -5,10 +5,32 @@
	</button>
</div>
<div class="modal-body">
	<div>
		<h6>
			<strong
			>{{ 'CARRIERS_VIEW.CARRIER_PAGE.CARRIER_ID' | translate }}:</strong
				>{{
					'CARRIERS_VIEW.CARRIER_PAGE.CARRIER_ID' | translate
				}}:</strong
			>
		{{ carrierId }}
			<span (click)="redirectToCarrierPage()" class="carrier-redirect">{{
				carrierId
			}}</span>
		</h6>
	</div>
	<div>
		<h6>
			<strong
				>{{ 'CARRIERS_VIEW.CARRIER_PAGE.NAME' | translate }}:
			</strong>
			<span (click)="redirectToCarrierPage()" class="carrier-redirect"
				>{{ carrierData?.firstName + ' ' + carrierData?.lastName }}
			</span>
		</h6>
	</div>
</div>

<div>
	<pre>
		<code highlight [language]="['json']" [code]="carrierData | json"></code>
	</pre>
</div>
Loading