tickera-angular-components 0.0.1-dev.205 → 0.0.1-dev.208
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1062,6 +1062,7 @@ var OrderItemType;
|
|
|
1062
1062
|
OrderItemType["GIFT_BOND"] = "GIFT_BOND";
|
|
1063
1063
|
OrderItemType["CORPORATE_BOND"] = "CORPORATE_BOND";
|
|
1064
1064
|
OrderItemType["VIP_RECHARGE"] = "VIP_RECHARGE";
|
|
1065
|
+
OrderItemType["SUBSCRIPTION_ACTIVATION"] = "SUBSCRIPTION_ACTIVATION";
|
|
1065
1066
|
})(OrderItemType || (OrderItemType = {}));
|
|
1066
1067
|
|
|
1067
1068
|
var OrderStatus;
|
|
@@ -1134,6 +1135,7 @@ const ORDER_ITEM_TYPES_COLORS = {
|
|
|
1134
1135
|
GIFT_BOND: { text: '#ca8a04', bg: '#fefce8' },
|
|
1135
1136
|
CORPORATE_BOND: { text: '#0d9488', bg: '#ccfbf1' },
|
|
1136
1137
|
VIP_RECHARGE: { text: '#940d89', bg: '#fbccf1' },
|
|
1138
|
+
SUBSCRIPTION_ACTIVATION: { text: '#1f940d', bg: '#cefbcc' },
|
|
1137
1139
|
};
|
|
1138
1140
|
const ORDER_DISCOUNT_COLORS = {
|
|
1139
1141
|
coupon: { text: '#1d4ed8', bg: '#eff6ff' },
|
|
@@ -2399,6 +2401,7 @@ function getOrderDiscount(order) {
|
|
|
2399
2401
|
discountType: 'percentage',
|
|
2400
2402
|
icon: DISCOUNT_ICONS.subscription,
|
|
2401
2403
|
serviceFeeExempt: !!order.subscription_snapshot['service_fee_exempt'],
|
|
2404
|
+
redeemedTicketsCount: order.subscription_redeemed_tickets_count ?? null,
|
|
2402
2405
|
};
|
|
2403
2406
|
}
|
|
2404
2407
|
if (!hasTicketDiscount) {
|
|
@@ -11246,6 +11249,15 @@ class OrderDiscountAppliedComponent {
|
|
|
11246
11249
|
return null;
|
|
11247
11250
|
}
|
|
11248
11251
|
}
|
|
11252
|
+
// Solo relevante para descuentos por Abono: cuantas boletas de ESTA
|
|
11253
|
+
// orden quedaron registradas como redimidas contra el Abono (tabla
|
|
11254
|
+
// subscription_redemptions), para dejar trazabilidad visible en el
|
|
11255
|
+
// pedido de que efectivamente se redimieron.
|
|
11256
|
+
get redeemedTicketsCount() {
|
|
11257
|
+
if (this.discountInfo.type !== 'subscription')
|
|
11258
|
+
return null;
|
|
11259
|
+
return this.discountInfo.redeemedTicketsCount ?? null;
|
|
11260
|
+
}
|
|
11249
11261
|
get serviceFeeExemptValue() {
|
|
11250
11262
|
// Cuando la tarifa fue exonerada, `service_fee` conserva el valor
|
|
11251
11263
|
// original y `service_fee_discounted` queda en 0: el "ahorro" es el
|
|
@@ -11260,11 +11272,11 @@ class OrderDiscountAppliedComponent {
|
|
|
11260
11272
|
return ORDER_DISCOUNT_COLORS[this.discountInfo.type] ?? { text: '', bg: '' };
|
|
11261
11273
|
}
|
|
11262
11274
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OrderDiscountAppliedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11263
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: OrderDiscountAppliedComponent, isStandalone: true, selector: "order-discount-applied", inputs: { order: "order" }, ngImport: i0, template: "@if (hasDiscount) {\n <div class=\"order-discount-applied\">\n <div class=\"order-discount-applied__content\">\n <div class=\"order-discount-applied__content-item discount-icon\">\n <div class=\"order-discount-applied__content-item-icon-wrapper\">\n <i class=\"order-discount-applied__content-item-icon\" [class]=\"discountInfo.icon\"></i>\n </div>\n </div>\n\n <div class=\"order-discount-applied__content-item\">\n <p class=\"order-discount-applied__content-item-title\">Tipo de descuento</p>\n <app-badge\n [text]=\"'order.discountTypes.' + discountInfo.type | transloco\"\n [backgroundColor]=\"badgeColors.bg\"\n [textColor]=\"badgeColors.text\"\n size=\"xs\"\n />\n </div>\n\n @if (discountInfo.code) {\n <div class=\"order-discount-applied__content-item\">\n <p class=\"order-discount-applied__content-item-title\">C\u00F3digo</p>\n <p class=\"order-discount-applied__content-item-value\">{{ discountInfo.code }}</p>\n </div>\n }\n\n @if (discountInfo.name && discountInfo.name !== discountInfo.code) {\n <div class=\"order-discount-applied__content-item\">\n <p class=\"order-discount-applied__content-item-title\">Nombre</p>\n <p class=\"order-discount-applied__content-item-value\">{{ discountInfo.name }}</p>\n </div>\n }\n\n @if (discountInfo.value > 0) {\n <div class=\"order-discount-applied__content-item\">\n <p class=\"order-discount-applied__content-item-title\">\n Valor del descuento (solo entradas)\n @if (discountPercentage) {\n ({{ discountPercentage }}%)\n }\n </p>\n <p class=\"order-discount-applied__content-item-value\">\n ${{ discountInfo.value | currency: 'COP' : '' : '1.0-2' }}\n </p>\n </div>\n }\n\n @if (discountInfo.serviceFeeExempt) {\n <div class=\"order-discount-applied__content-item\">\n <p class=\"order-discount-applied__content-item-title\">Tarifa de servicio</p>\n <p class=\"order-discount-applied__content-item-value\">\n <s>${{ serviceFeeExemptValue | currency: 'COP' : '' : '1.0-2' }}</s>\n $0 (exonerada)\n </p>\n </div>\n }\n </div>\n </div>\n}\n", styles: [".order-discount-applied{background-color:#fff;border-radius:.5rem;border:1px solid #f3f4f6;box-sizing:border-box;overflow:hidden;position:relative;width:100%}.order-discount-applied__content{display:flex;flex-flow:row wrap;gap:1rem;padding:1rem}.order-discount-applied__content-item{align-items:flex-start;display:flex;flex-flow:column nowrap;flex:1 1 calc(50% - 1rem);position:relative}@media(min-width:768px){.order-discount-applied__content-item{flex:1 1 0}}.order-discount-applied__content-item.discount-icon{flex:0 0 auto;justify-content:center;width:auto}@media(min-width:768px){.order-discount-applied__content-item.discount-icon{flex:0 0 auto}}.order-discount-applied__content-item-title{color:#9ca3af;font-size:.75rem;margin:0;text-transform:uppercase}.order-discount-applied__content-item-value{color:#111827;font-weight:500;font-size:.875rem;margin:0}.order-discount-applied__content-item-icon-wrapper{align-items:center;border-radius:.375rem;border:1px solid #e5e7eb;display:flex;height:2.5rem;justify-content:center;width:2.5rem}.order-discount-applied__content-item-icon-wrapper i{font-size:1.25rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslocoModule }, { kind: "component", type: AppBadgeComponent, selector: "app-badge", inputs: ["text", "color", "size", "bordered", "backgroundColor", "textColor"] }, { kind: "pipe", type: i1$1.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i2.TranslocoPipe, name: "transloco" }], encapsulation: i0.ViewEncapsulation.None });
|
|
11275
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: OrderDiscountAppliedComponent, isStandalone: true, selector: "order-discount-applied", inputs: { order: "order" }, ngImport: i0, template: "@if (hasDiscount) {\n <div class=\"order-discount-applied\">\n <div class=\"order-discount-applied__content\">\n <div class=\"order-discount-applied__content-item discount-icon\">\n <div class=\"order-discount-applied__content-item-icon-wrapper\">\n <i class=\"order-discount-applied__content-item-icon\" [class]=\"discountInfo.icon\"></i>\n </div>\n </div>\n\n <div class=\"order-discount-applied__content-item\">\n <p class=\"order-discount-applied__content-item-title\">Tipo de descuento</p>\n <app-badge\n [text]=\"'order.discountTypes.' + discountInfo.type | transloco\"\n [backgroundColor]=\"badgeColors.bg\"\n [textColor]=\"badgeColors.text\"\n size=\"xs\"\n />\n </div>\n\n @if (discountInfo.code) {\n <div class=\"order-discount-applied__content-item\">\n <p class=\"order-discount-applied__content-item-title\">C\u00F3digo</p>\n <p class=\"order-discount-applied__content-item-value\">{{ discountInfo.code }}</p>\n </div>\n }\n\n @if (discountInfo.name && discountInfo.name !== discountInfo.code) {\n <div class=\"order-discount-applied__content-item\">\n <p class=\"order-discount-applied__content-item-title\">Nombre</p>\n <p class=\"order-discount-applied__content-item-value\">{{ discountInfo.name }}</p>\n </div>\n }\n\n @if (discountInfo.value > 0) {\n <div class=\"order-discount-applied__content-item\">\n <p class=\"order-discount-applied__content-item-title\">\n Valor del descuento (solo entradas)\n @if (discountPercentage) {\n ({{ discountPercentage }}%)\n }\n </p>\n <p class=\"order-discount-applied__content-item-value\">\n ${{ discountInfo.value | currency: 'COP' : '' : '1.0-2' }}\n </p>\n </div>\n }\n\n @if (redeemedTicketsCount !== null) {\n <div class=\"order-discount-applied__content-item\">\n <p class=\"order-discount-applied__content-item-title\">Entradas redimidas</p>\n <p class=\"order-discount-applied__content-item-value\">\n {{ redeemedTicketsCount }} {{ redeemedTicketsCount === 1 ? 'entrada' : 'entradas' }} de tu Abono\n </p>\n </div>\n }\n\n @if (discountInfo.serviceFeeExempt) {\n <div class=\"order-discount-applied__content-item\">\n <p class=\"order-discount-applied__content-item-title\">Tarifa de servicio</p>\n <p class=\"order-discount-applied__content-item-value\">\n <s>${{ serviceFeeExemptValue | currency: 'COP' : '' : '1.0-2' }}</s>\n $0 (exonerada)\n </p>\n </div>\n }\n </div>\n </div>\n}\n", styles: [".order-discount-applied{background-color:#fff;border-radius:.5rem;border:1px solid #f3f4f6;box-sizing:border-box;overflow:hidden;position:relative;width:100%}.order-discount-applied__content{display:flex;flex-flow:row wrap;gap:1rem;padding:1rem}.order-discount-applied__content-item{align-items:flex-start;display:flex;flex-flow:column nowrap;flex:1 1 calc(50% - 1rem);position:relative}@media(min-width:768px){.order-discount-applied__content-item{flex:1 1 0}}.order-discount-applied__content-item.discount-icon{flex:0 0 auto;justify-content:center;width:auto}@media(min-width:768px){.order-discount-applied__content-item.discount-icon{flex:0 0 auto}}.order-discount-applied__content-item-title{color:#9ca3af;font-size:.75rem;margin:0;text-transform:uppercase}.order-discount-applied__content-item-value{color:#111827;font-weight:500;font-size:.875rem;margin:0}.order-discount-applied__content-item-icon-wrapper{align-items:center;border-radius:.375rem;border:1px solid #e5e7eb;display:flex;height:2.5rem;justify-content:center;width:2.5rem}.order-discount-applied__content-item-icon-wrapper i{font-size:1.25rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslocoModule }, { kind: "component", type: AppBadgeComponent, selector: "app-badge", inputs: ["text", "color", "size", "bordered", "backgroundColor", "textColor"] }, { kind: "pipe", type: i1$1.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i2.TranslocoPipe, name: "transloco" }], encapsulation: i0.ViewEncapsulation.None });
|
|
11264
11276
|
}
|
|
11265
11277
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OrderDiscountAppliedComponent, decorators: [{
|
|
11266
11278
|
type: Component,
|
|
11267
|
-
args: [{ selector: 'order-discount-applied', standalone: true, imports: [CommonModule, TranslocoModule, AppBadgeComponent], encapsulation: ViewEncapsulation.None, template: "@if (hasDiscount) {\n <div class=\"order-discount-applied\">\n <div class=\"order-discount-applied__content\">\n <div class=\"order-discount-applied__content-item discount-icon\">\n <div class=\"order-discount-applied__content-item-icon-wrapper\">\n <i class=\"order-discount-applied__content-item-icon\" [class]=\"discountInfo.icon\"></i>\n </div>\n </div>\n\n <div class=\"order-discount-applied__content-item\">\n <p class=\"order-discount-applied__content-item-title\">Tipo de descuento</p>\n <app-badge\n [text]=\"'order.discountTypes.' + discountInfo.type | transloco\"\n [backgroundColor]=\"badgeColors.bg\"\n [textColor]=\"badgeColors.text\"\n size=\"xs\"\n />\n </div>\n\n @if (discountInfo.code) {\n <div class=\"order-discount-applied__content-item\">\n <p class=\"order-discount-applied__content-item-title\">C\u00F3digo</p>\n <p class=\"order-discount-applied__content-item-value\">{{ discountInfo.code }}</p>\n </div>\n }\n\n @if (discountInfo.name && discountInfo.name !== discountInfo.code) {\n <div class=\"order-discount-applied__content-item\">\n <p class=\"order-discount-applied__content-item-title\">Nombre</p>\n <p class=\"order-discount-applied__content-item-value\">{{ discountInfo.name }}</p>\n </div>\n }\n\n @if (discountInfo.value > 0) {\n <div class=\"order-discount-applied__content-item\">\n <p class=\"order-discount-applied__content-item-title\">\n Valor del descuento (solo entradas)\n @if (discountPercentage) {\n ({{ discountPercentage }}%)\n }\n </p>\n <p class=\"order-discount-applied__content-item-value\">\n ${{ discountInfo.value | currency: 'COP' : '' : '1.0-2' }}\n </p>\n </div>\n }\n\n @if (discountInfo.serviceFeeExempt) {\n <div class=\"order-discount-applied__content-item\">\n <p class=\"order-discount-applied__content-item-title\">Tarifa de servicio</p>\n <p class=\"order-discount-applied__content-item-value\">\n <s>${{ serviceFeeExemptValue | currency: 'COP' : '' : '1.0-2' }}</s>\n $0 (exonerada)\n </p>\n </div>\n }\n </div>\n </div>\n}\n", styles: [".order-discount-applied{background-color:#fff;border-radius:.5rem;border:1px solid #f3f4f6;box-sizing:border-box;overflow:hidden;position:relative;width:100%}.order-discount-applied__content{display:flex;flex-flow:row wrap;gap:1rem;padding:1rem}.order-discount-applied__content-item{align-items:flex-start;display:flex;flex-flow:column nowrap;flex:1 1 calc(50% - 1rem);position:relative}@media(min-width:768px){.order-discount-applied__content-item{flex:1 1 0}}.order-discount-applied__content-item.discount-icon{flex:0 0 auto;justify-content:center;width:auto}@media(min-width:768px){.order-discount-applied__content-item.discount-icon{flex:0 0 auto}}.order-discount-applied__content-item-title{color:#9ca3af;font-size:.75rem;margin:0;text-transform:uppercase}.order-discount-applied__content-item-value{color:#111827;font-weight:500;font-size:.875rem;margin:0}.order-discount-applied__content-item-icon-wrapper{align-items:center;border-radius:.375rem;border:1px solid #e5e7eb;display:flex;height:2.5rem;justify-content:center;width:2.5rem}.order-discount-applied__content-item-icon-wrapper i{font-size:1.25rem}\n"] }]
|
|
11279
|
+
args: [{ selector: 'order-discount-applied', standalone: true, imports: [CommonModule, TranslocoModule, AppBadgeComponent], encapsulation: ViewEncapsulation.None, template: "@if (hasDiscount) {\n <div class=\"order-discount-applied\">\n <div class=\"order-discount-applied__content\">\n <div class=\"order-discount-applied__content-item discount-icon\">\n <div class=\"order-discount-applied__content-item-icon-wrapper\">\n <i class=\"order-discount-applied__content-item-icon\" [class]=\"discountInfo.icon\"></i>\n </div>\n </div>\n\n <div class=\"order-discount-applied__content-item\">\n <p class=\"order-discount-applied__content-item-title\">Tipo de descuento</p>\n <app-badge\n [text]=\"'order.discountTypes.' + discountInfo.type | transloco\"\n [backgroundColor]=\"badgeColors.bg\"\n [textColor]=\"badgeColors.text\"\n size=\"xs\"\n />\n </div>\n\n @if (discountInfo.code) {\n <div class=\"order-discount-applied__content-item\">\n <p class=\"order-discount-applied__content-item-title\">C\u00F3digo</p>\n <p class=\"order-discount-applied__content-item-value\">{{ discountInfo.code }}</p>\n </div>\n }\n\n @if (discountInfo.name && discountInfo.name !== discountInfo.code) {\n <div class=\"order-discount-applied__content-item\">\n <p class=\"order-discount-applied__content-item-title\">Nombre</p>\n <p class=\"order-discount-applied__content-item-value\">{{ discountInfo.name }}</p>\n </div>\n }\n\n @if (discountInfo.value > 0) {\n <div class=\"order-discount-applied__content-item\">\n <p class=\"order-discount-applied__content-item-title\">\n Valor del descuento (solo entradas)\n @if (discountPercentage) {\n ({{ discountPercentage }}%)\n }\n </p>\n <p class=\"order-discount-applied__content-item-value\">\n ${{ discountInfo.value | currency: 'COP' : '' : '1.0-2' }}\n </p>\n </div>\n }\n\n @if (redeemedTicketsCount !== null) {\n <div class=\"order-discount-applied__content-item\">\n <p class=\"order-discount-applied__content-item-title\">Entradas redimidas</p>\n <p class=\"order-discount-applied__content-item-value\">\n {{ redeemedTicketsCount }} {{ redeemedTicketsCount === 1 ? 'entrada' : 'entradas' }} de tu Abono\n </p>\n </div>\n }\n\n @if (discountInfo.serviceFeeExempt) {\n <div class=\"order-discount-applied__content-item\">\n <p class=\"order-discount-applied__content-item-title\">Tarifa de servicio</p>\n <p class=\"order-discount-applied__content-item-value\">\n <s>${{ serviceFeeExemptValue | currency: 'COP' : '' : '1.0-2' }}</s>\n $0 (exonerada)\n </p>\n </div>\n }\n </div>\n </div>\n}\n", styles: [".order-discount-applied{background-color:#fff;border-radius:.5rem;border:1px solid #f3f4f6;box-sizing:border-box;overflow:hidden;position:relative;width:100%}.order-discount-applied__content{display:flex;flex-flow:row wrap;gap:1rem;padding:1rem}.order-discount-applied__content-item{align-items:flex-start;display:flex;flex-flow:column nowrap;flex:1 1 calc(50% - 1rem);position:relative}@media(min-width:768px){.order-discount-applied__content-item{flex:1 1 0}}.order-discount-applied__content-item.discount-icon{flex:0 0 auto;justify-content:center;width:auto}@media(min-width:768px){.order-discount-applied__content-item.discount-icon{flex:0 0 auto}}.order-discount-applied__content-item-title{color:#9ca3af;font-size:.75rem;margin:0;text-transform:uppercase}.order-discount-applied__content-item-value{color:#111827;font-weight:500;font-size:.875rem;margin:0}.order-discount-applied__content-item-icon-wrapper{align-items:center;border-radius:.375rem;border:1px solid #e5e7eb;display:flex;height:2.5rem;justify-content:center;width:2.5rem}.order-discount-applied__content-item-icon-wrapper i{font-size:1.25rem}\n"] }]
|
|
11268
11280
|
}], propDecorators: { order: [{
|
|
11269
11281
|
type: Input,
|
|
11270
11282
|
args: [{ required: true }]
|