1 | import { Component, EventEmitter, Input, Output } from '@angular/core';
|
2 | var VaSalespersonDetailsComponent = (function () {
|
3 | function VaSalespersonDetailsComponent() {
|
4 | this.showGetItNow = true;
|
5 | this.getItNow = new EventEmitter();
|
6 | }
|
7 | VaSalespersonDetailsComponent.prototype.onGetItNowSelected = function () {
|
8 | this.getItNow.emit(this.salesperson);
|
9 | };
|
10 | Object.defineProperty(VaSalespersonDetailsComponent.prototype, "iconUrl", {
|
11 | get: function () {
|
12 | return this.salesperson && this.salesperson.photoUrlSecure ?
|
13 | this.salesperson.photoUrlSecure :
|
14 | 'https://vbc-frontend.storage-download.googleapis.com/salesperson-details/default_sales_person.jpg';
|
15 | },
|
16 | enumerable: true,
|
17 | configurable: true
|
18 | });
|
19 | Object.defineProperty(VaSalespersonDetailsComponent.prototype, "name", {
|
20 | get: function () {
|
21 | return this.salesperson && this.salesperson.formattedName ?
|
22 | this.salesperson.formattedName : '';
|
23 | },
|
24 | enumerable: true,
|
25 | configurable: true
|
26 | });
|
27 | Object.defineProperty(VaSalespersonDetailsComponent.prototype, "title", {
|
28 | get: function () {
|
29 | return this.salesperson && this.salesperson.jobTitle ?
|
30 | this.salesperson.jobTitle : '';
|
31 | },
|
32 | enumerable: true,
|
33 | configurable: true
|
34 | });
|
35 | Object.defineProperty(VaSalespersonDetailsComponent.prototype, "email", {
|
36 | get: function () {
|
37 | return this.salesperson && this.salesperson.email ?
|
38 | this.salesperson.email : '';
|
39 | },
|
40 | enumerable: true,
|
41 | configurable: true
|
42 | });
|
43 | Object.defineProperty(VaSalespersonDetailsComponent.prototype, "cityAndState", {
|
44 | get: function () {
|
45 | return this.salesperson && this.salesperson.city && this.salesperson.state ?
|
46 | this.salesperson.city + ', ' + this.salesperson.state : '';
|
47 | },
|
48 | enumerable: true,
|
49 | configurable: true
|
50 | });
|
51 | VaSalespersonDetailsComponent.decorators = [
|
52 | { type: Component, args: [{
|
53 | selector: 'va-salesperson-details',
|
54 | template: "<div class=\"container\"> <div class=\"salesperson-contact-info\"> <div class=\"salesperson-image\" *ngIf=\"salesperson\"> <va-icon [iconUrl]=\"iconUrl\" [diameter]=\"60\"></va-icon> </div> <div> <div class=\"salesperson-name\">{{ name }}</div> <div>{{ title }}</div> <div>{{ cityAndState }}</div> <div><a href=\"mailto:{{ email }}\">{{ email }}</a></div> </div> <div *ngIf=\"!salesperson\" class=\"generic-contact\"> Contact {{ brandName ? \"your \" + brandName : \"a\" }} representative today! </div> <div class=\"pricing\"> <va-pricing [pricing]=\"packagePricing\" wrapFrequency=\"true\"></va-pricing> <div class=\"cta get-it-now-bottom-button\"> <button mat-button *ngIf=\"salesperson && showGetItNow\" (click)=\"onGetItNowSelected()\" class=\"now-button\"> Get it Now </button> </div> </div> </div> </div> ",
|
55 | styles: ["a { color: #1e88e5; text-decoration: none; } .container { width: 100%; margin: 0 auto; background-color: #ffffff; box-shadow: 1px 1px 1px 0 rgba(0, 0, 0, 0.2); } .salesperson-image { margin-right: 20px; } .salesperson-contact-info { display: flex; align-items: center; padding: 24px; font-size: 14px; color: #9e9e9e; } @media screen and (max-width: 600px) { .salesperson-contact-info { flex-direction: column; display: inline-block; } } .salesperson-name { font-size: 20px; font-weight: bold; color: #212121; } .generic-contact { margin-left: 20px; } .pricing { display: flex; align-items: center; flex-grow: 1; justify-content: flex-end; } .pricing ::ng-deep .price-box { flex-direction: row; } .pricing ::ng-deep .price-number { margin-right: 4px; } @media screen and (min-width: 600px) { .pricing { padding-left: 16px; } } .pricing va-pricing { margin-right: 20px; } .now-button { font-size: 14px; color: white; background-color: #4caf50; } "]
|
56 | },] },
|
57 | ];
|
58 |
|
59 | VaSalespersonDetailsComponent.ctorParameters = function () { return []; };
|
60 | VaSalespersonDetailsComponent.propDecorators = {
|
61 | 'salesperson': [{ type: Input },],
|
62 | 'packagePricing': [{ type: Input },],
|
63 | 'brandName': [{ type: Input },],
|
64 | 'showGetItNow': [{ type: Input },],
|
65 | 'getItNow': [{ type: Output },],
|
66 | };
|
67 | return VaSalespersonDetailsComponent;
|
68 | }());
|
69 | export { VaSalespersonDetailsComponent };
|