tickera-angular-components 0.0.1-dev.73 → 0.0.1-dev.74
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.
- package/fesm2022/tickera-angular-components.mjs +19 -8
- package/fesm2022/tickera-angular-components.mjs.map +1 -1
- package/i18n/en.json +2 -1
- package/i18n/es.json +2 -1
- package/index.d.ts +17 -14
- package/package.json +1 -1
|
@@ -111,7 +111,8 @@ var order$1 = {
|
|
|
111
111
|
},
|
|
112
112
|
itemType: {
|
|
113
113
|
PRODUCT: "Producto",
|
|
114
|
-
TICKET: "Entrada"
|
|
114
|
+
TICKET: "Entrada",
|
|
115
|
+
GIFT_BOND: "Bono de regalo"
|
|
115
116
|
}
|
|
116
117
|
};
|
|
117
118
|
var es = {
|
|
@@ -215,7 +216,8 @@ var order = {
|
|
|
215
216
|
},
|
|
216
217
|
itemType: {
|
|
217
218
|
PRODUCT: "Product",
|
|
218
|
-
TICKET: "Ticket"
|
|
219
|
+
TICKET: "Ticket",
|
|
220
|
+
GIFT_BOND: "Gift bond"
|
|
219
221
|
}
|
|
220
222
|
};
|
|
221
223
|
var en = {
|
|
@@ -7985,11 +7987,11 @@ class OrderInformationComponent {
|
|
|
7985
7987
|
this.transloco = transloco;
|
|
7986
7988
|
}
|
|
7987
7989
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OrderInformationComponent, deps: [{ token: i2$1.TranslocoService }], target: i0.ɵɵFactoryTarget.Component });
|
|
7988
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: OrderInformationComponent, isStandalone: true, selector: "order-information", inputs: { order: "order" }, ngImport: i0, template: "@if (!!order) {\n <div class=\"order-information\">\n <div class=\"order-information__header\">\n <div>\n <p class=\"order-information__header-id\">Orden #{{ order.id }}</p>\n <p class=\"order-information__header-uuid\">{{ order.uuid }}</p>\n </div>\n\n <order-status-badge [order]=\"order\" />\n </div>\n\n <div class=\"order-information__content\">\n @if (order.show_snapshot && order.show_snapshot['title']) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Evento</p>\n <p class=\"order-information__content-item-value\">\n {{ order.show_snapshot['title'] }}\n </p>\n </div>\n }\n\n @if (order.performance_snapshot && order.performance_snapshot['start_time']) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Fecha de la funci\u00F3n</p>\n <p class=\"order-information__content-item-value\">\n {{ order.performance_snapshot['start_time'] | date: 'dd/MM/yyyy hh:mm a' }}\n </p>\n </div>\n }\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Fecha de la compra</p>\n <p class=\"order-information__content-item-value\">\n {{ order.created_at | date: 'dd/MM/yyyy hh:mm a' }}\n </p>\n </div>\n\n <div class=\"order-information__content-item\">\n
|
|
7990
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: OrderInformationComponent, isStandalone: true, selector: "order-information", inputs: { order: "order" }, ngImport: i0, template: "@if (!!order) {\n <div class=\"order-information\">\n <div class=\"order-information__header\">\n <div>\n <p class=\"order-information__header-id\">Orden #{{ order.id }}</p>\n <p class=\"order-information__header-uuid\">{{ order.uuid }}</p>\n </div>\n\n <order-status-badge [order]=\"order\" />\n </div>\n\n <div class=\"order-information__content\">\n @if (order.show_snapshot && order.show_snapshot['title']) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Evento</p>\n <p class=\"order-information__content-item-value\">\n {{ order.show_snapshot['title'] }}\n </p>\n </div>\n }\n\n @if (order.performance_snapshot && order.performance_snapshot['start_time']) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Fecha de la funci\u00F3n</p>\n <p class=\"order-information__content-item-value\">\n {{ order.performance_snapshot['start_time'] | date: 'dd/MM/yyyy hh:mm a' }}\n </p>\n </div>\n }\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Fecha de la compra</p>\n <p class=\"order-information__content-item-value\">\n {{ order.created_at | date: 'dd/MM/yyyy hh:mm a' }}\n </p>\n </div>\n\n @if (order.payment_method) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">M\u00E9todo de pago</p>\n <p class=\"order-information__content-item-value\">\n {{ `order.paymentMethods.${order.payment_method}` | transloco }}\n </p>\n </div>\n }\n\n @if (order.service_fee && order.service_fee > 0) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Tarifa de servicio</p>\n <p class=\"order-information__content-item-value\">\n ${{ order.service_fee | currency: 'COP' : '' : '1.0-2' }}\n </p>\n </div>\n }\n\n @if (!!order.discount_amount && order.discount_amount > 0) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Descuento</p>\n <p class=\"order-information__content-item-value\">\n ${{ order.discount_amount | currency: 'COP' : '' : '1.0-2' }}\n </p>\n </div>\n }\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Total</p>\n @if (order.total_discounted && order.total_discounted >= 0) {\n <p class=\"order-information__content-item-total_discounted\">\n <span class=\"discounted\">\n ${{ order.total_discounted | currency: 'COP' : '' : '1.0-2' }}\n </span>\n <span class=\"order-information__content-item-value total\">\n ${{ order.total | currency: 'COP' : '' : '1.0-2' }}\n </span>\n </p>\n } @else {\n <p class=\"order-information__content-item-value total\">\n ${{ order.total | currency: 'COP' : '' : '1.0-2' }}\n </p>\n }\n </div>\n </div>\n </div>\n}\n", styles: [".order-information{background-color:#fff;border-radius:.5rem;border:1px solid #f3f4f6;box-sizing:border-box;overflow:hidden;position:relative;width:100%}.order-information__header{align-items:center;border-bottom:1px solid #f3f4f6;display:flex;flex-flow:row wrap;gap:.75rem;justify-content:space-between;padding:1rem;width:100%}.order-information__header-id{color:#6b7280;font-size:.875rem;font-weight:500;margin:0}.order-information__header-uuid{color:#9ca3af;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:.75rem;margin:0;word-break:break-all}.order-information__content{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;padding:1rem}@media(min-width:768px){.order-information__content{grid-template-columns:repeat(3,minmax(0,1fr))}}.order-information__content-item{align-items:flex-start;display:flex;flex-flow:column nowrap;position:relative;width:100%}.order-information__content-item-title{color:#9ca3af;font-size:.75rem;margin:0;text-transform:uppercase}.order-information__content-item-value{color:#111827;font-weight:500;font-size:.875rem;margin:0}.order-information__content-item-value.total{font-weight:700}.order-information__content-item-total_discounted{display:flex;flex-flow:row nowrap;gap:.25rem;margin:0;width:100%}.order-information__content-item-total_discounted .discounted{color:#111827;font-size:.875rem;font-weight:700}.order-information__content-item-total_discounted .total{color:#9ca3af;margin:0;text-decoration:line-through}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: OrderStatusBadgeComponent, selector: "order-status-badge", inputs: ["order", "size"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "pipe", type: i2.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i2$1.TranslocoPipe, name: "transloco" }], encapsulation: i0.ViewEncapsulation.None });
|
|
7989
7991
|
}
|
|
7990
7992
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OrderInformationComponent, decorators: [{
|
|
7991
7993
|
type: Component,
|
|
7992
|
-
args: [{ selector: 'order-information', standalone: true, imports: [CommonModule, OrderStatusBadgeComponent, TranslocoModule], encapsulation: ViewEncapsulation.None, template: "@if (!!order) {\n <div class=\"order-information\">\n <div class=\"order-information__header\">\n <div>\n <p class=\"order-information__header-id\">Orden #{{ order.id }}</p>\n <p class=\"order-information__header-uuid\">{{ order.uuid }}</p>\n </div>\n\n <order-status-badge [order]=\"order\" />\n </div>\n\n <div class=\"order-information__content\">\n @if (order.show_snapshot && order.show_snapshot['title']) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Evento</p>\n <p class=\"order-information__content-item-value\">\n {{ order.show_snapshot['title'] }}\n </p>\n </div>\n }\n\n @if (order.performance_snapshot && order.performance_snapshot['start_time']) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Fecha de la funci\u00F3n</p>\n <p class=\"order-information__content-item-value\">\n {{ order.performance_snapshot['start_time'] | date: 'dd/MM/yyyy hh:mm a' }}\n </p>\n </div>\n }\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Fecha de la compra</p>\n <p class=\"order-information__content-item-value\">\n {{ order.created_at | date: 'dd/MM/yyyy hh:mm a' }}\n </p>\n </div>\n\n <div class=\"order-information__content-item\">\n
|
|
7994
|
+
args: [{ selector: 'order-information', standalone: true, imports: [CommonModule, OrderStatusBadgeComponent, TranslocoModule], encapsulation: ViewEncapsulation.None, template: "@if (!!order) {\n <div class=\"order-information\">\n <div class=\"order-information__header\">\n <div>\n <p class=\"order-information__header-id\">Orden #{{ order.id }}</p>\n <p class=\"order-information__header-uuid\">{{ order.uuid }}</p>\n </div>\n\n <order-status-badge [order]=\"order\" />\n </div>\n\n <div class=\"order-information__content\">\n @if (order.show_snapshot && order.show_snapshot['title']) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Evento</p>\n <p class=\"order-information__content-item-value\">\n {{ order.show_snapshot['title'] }}\n </p>\n </div>\n }\n\n @if (order.performance_snapshot && order.performance_snapshot['start_time']) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Fecha de la funci\u00F3n</p>\n <p class=\"order-information__content-item-value\">\n {{ order.performance_snapshot['start_time'] | date: 'dd/MM/yyyy hh:mm a' }}\n </p>\n </div>\n }\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Fecha de la compra</p>\n <p class=\"order-information__content-item-value\">\n {{ order.created_at | date: 'dd/MM/yyyy hh:mm a' }}\n </p>\n </div>\n\n @if (order.payment_method) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">M\u00E9todo de pago</p>\n <p class=\"order-information__content-item-value\">\n {{ `order.paymentMethods.${order.payment_method}` | transloco }}\n </p>\n </div>\n }\n\n @if (order.service_fee && order.service_fee > 0) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Tarifa de servicio</p>\n <p class=\"order-information__content-item-value\">\n ${{ order.service_fee | currency: 'COP' : '' : '1.0-2' }}\n </p>\n </div>\n }\n\n @if (!!order.discount_amount && order.discount_amount > 0) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Descuento</p>\n <p class=\"order-information__content-item-value\">\n ${{ order.discount_amount | currency: 'COP' : '' : '1.0-2' }}\n </p>\n </div>\n }\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Total</p>\n @if (order.total_discounted && order.total_discounted >= 0) {\n <p class=\"order-information__content-item-total_discounted\">\n <span class=\"discounted\">\n ${{ order.total_discounted | currency: 'COP' : '' : '1.0-2' }}\n </span>\n <span class=\"order-information__content-item-value total\">\n ${{ order.total | currency: 'COP' : '' : '1.0-2' }}\n </span>\n </p>\n } @else {\n <p class=\"order-information__content-item-value total\">\n ${{ order.total | currency: 'COP' : '' : '1.0-2' }}\n </p>\n }\n </div>\n </div>\n </div>\n}\n", styles: [".order-information{background-color:#fff;border-radius:.5rem;border:1px solid #f3f4f6;box-sizing:border-box;overflow:hidden;position:relative;width:100%}.order-information__header{align-items:center;border-bottom:1px solid #f3f4f6;display:flex;flex-flow:row wrap;gap:.75rem;justify-content:space-between;padding:1rem;width:100%}.order-information__header-id{color:#6b7280;font-size:.875rem;font-weight:500;margin:0}.order-information__header-uuid{color:#9ca3af;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:.75rem;margin:0;word-break:break-all}.order-information__content{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;padding:1rem}@media(min-width:768px){.order-information__content{grid-template-columns:repeat(3,minmax(0,1fr))}}.order-information__content-item{align-items:flex-start;display:flex;flex-flow:column nowrap;position:relative;width:100%}.order-information__content-item-title{color:#9ca3af;font-size:.75rem;margin:0;text-transform:uppercase}.order-information__content-item-value{color:#111827;font-weight:500;font-size:.875rem;margin:0}.order-information__content-item-value.total{font-weight:700}.order-information__content-item-total_discounted{display:flex;flex-flow:row nowrap;gap:.25rem;margin:0;width:100%}.order-information__content-item-total_discounted .discounted{color:#111827;font-size:.875rem;font-weight:700}.order-information__content-item-total_discounted .total{color:#9ca3af;margin:0;text-decoration:line-through}\n"] }]
|
|
7993
7995
|
}], ctorParameters: () => [{ type: i2$1.TranslocoService }], propDecorators: { order: [{
|
|
7994
7996
|
type: Input,
|
|
7995
7997
|
args: [{ required: true }]
|
|
@@ -8167,11 +8169,17 @@ class OrderItemsComponent {
|
|
|
8167
8169
|
get tickets() {
|
|
8168
8170
|
return this.orderItems?.filter(({ item_type }) => item_type === OrderItemType.TICKET) ?? [];
|
|
8169
8171
|
}
|
|
8172
|
+
get giftBonds() {
|
|
8173
|
+
return this.orderItems?.filter(({ item_type }) => item_type === OrderItemType.GIFT_BOND) ?? [];
|
|
8174
|
+
}
|
|
8175
|
+
get showActionColumn() {
|
|
8176
|
+
return this.order.status === 'completed' && this.tickets.length > 0;
|
|
8177
|
+
}
|
|
8170
8178
|
itemTotal(quantity, price) {
|
|
8171
8179
|
return quantity * Number(price);
|
|
8172
8180
|
}
|
|
8173
8181
|
hasDiscount() {
|
|
8174
|
-
return this.order.discount_amount > 0;
|
|
8182
|
+
return !!this.order.discount_amount && this.order.discount_amount > 0;
|
|
8175
8183
|
}
|
|
8176
8184
|
get totals() {
|
|
8177
8185
|
const products = this.products?.reduce((accumulator, currentProduct) => {
|
|
@@ -8180,13 +8188,16 @@ class OrderItemsComponent {
|
|
|
8180
8188
|
const tickets = this.tickets?.reduce((accumulator, currentTicket) => {
|
|
8181
8189
|
return accumulator + currentTicket?.normal_price;
|
|
8182
8190
|
}, 0);
|
|
8183
|
-
|
|
8191
|
+
const giftBonds = this.giftBonds?.reduce((accumulator, currentTicket) => {
|
|
8192
|
+
return accumulator + currentTicket?.normal_price;
|
|
8193
|
+
}, 0);
|
|
8194
|
+
return { products, tickets, giftBonds };
|
|
8184
8195
|
}
|
|
8185
8196
|
openTicketQr(ticketUuid, description) {
|
|
8186
8197
|
this.ticketQrModalService.open(ticketUuid, description);
|
|
8187
8198
|
}
|
|
8188
8199
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OrderItemsComponent, deps: [{ token: TicketQrModalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
8189
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: OrderItemsComponent, isStandalone: true, selector: "order-items", inputs: { order: "order" }, ngImport: i0, template: "@if (!!order) {\n <div class=\"order-items\">\n <div class=\"order-items__header\">\n <ticket-map-widget-header [title]=\"`Art\u00EDculos (${order.order_items.length})`\" />\n </div>\n <div class=\"order-items__table-container\">\n <table class=\"order-items__table\">\n <thead class=\"order-items__table-head\">\n <tr class=\"order-items__table-head-row\">\n <th class=\"order-items__table-head-cell\">Tipo</th>\n <th class=\"order-items__table-head-cell\">Descripci\u00F3n</th>\n\n <th class=\"order-items__table-head-cell text-right\">Cant.</th>\n <th class=\"order-items__table-head-cell text-right\">Precio</th>\n <th class=\"order-items__table-head-cell text-right\">Total</th>\n @if (
|
|
8200
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: OrderItemsComponent, isStandalone: true, selector: "order-items", inputs: { order: "order" }, ngImport: i0, template: "@if (!!order) {\n <div class=\"order-items\">\n <div class=\"order-items__header\">\n <ticket-map-widget-header [title]=\"`Art\u00EDculos (${order.order_items.length})`\" />\n </div>\n <div class=\"order-items__table-container\">\n <table class=\"order-items__table\">\n <thead class=\"order-items__table-head\">\n <tr class=\"order-items__table-head-row\">\n <th class=\"order-items__table-head-cell\">Tipo</th>\n <th class=\"order-items__table-head-cell\">Descripci\u00F3n</th>\n\n <th class=\"order-items__table-head-cell text-right\">Cant.</th>\n <th class=\"order-items__table-head-cell text-right\">Precio</th>\n <th class=\"order-items__table-head-cell text-right\">Total</th>\n @if (showActionColumn) {\n <th class=\"order-items__table-head-cell\">Acciones</th>\n }\n </tr>\n </thead>\n <tbody class=\"order-items__table-body\">\n @for (item of order.order_items; track $index) {\n <tr class=\"order-items__table-body-row\">\n <td class=\"order-items__table-body-cell\">\n <order-item-type-badge [item]=\"item\" size=\"xs\" />\n </td>\n\n <td class=\"order-items__table-body-cell\">\n {{ item.description }}\n </td>\n\n <td class=\"order-items__table-body-cell text-right\">\n {{ item.quantity }}\n </td>\n\n <td class=\"order-items__table-body-cell text-right\">\n ${{ item.normal_price | number: '1.0-2' }}\n </td>\n\n <td class=\"order-items__table-body-cell text-right\">\n <strong>\n ${{ itemTotal(item.quantity, item.normal_price) | number: '1.0-2' }}\n </strong>\n </td>\n\n @if (item.ticket_uuid && order.status === 'completed' && showActionColumn) {\n <td class=\"order-items__table-body-cell actions\">\n <app-button\n text=\"Ver ticket\"\n size=\"xs\"\n icon=\"ri-eye-line\"\n (clicked)=\"openTicketQr(item.ticket_uuid!, item.description)\"\n />\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n\n <div class=\"order-items__totals\">\n <dl class=\"order-items__totals-container\">\n @if (giftBonds.length > 0 && totals.giftBonds > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">Bonos de regalo ({{ giftBonds.length }})</dt>\n <dd class=\"order-items__totals-item-value\">\n @if (totals.giftBonds > 0) {\n <span class=\"text-gray-900\"> ${{ totals.giftBonds | number: '1.0-2' }} </span>\n }\n </dd>\n </div>\n }\n\n @if (tickets.length > 0 && totals.tickets > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">Entradas ({{ tickets.length }})</dt>\n <dd class=\"order-items__totals-item-value\">\n @if (totals.tickets > 0) {\n <span class=\"text-gray-900\"> ${{ totals.tickets | number: '1.0-2' }} </span>\n }\n </dd>\n </div>\n }\n\n @if (products.length > 0 && totals.products > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">Productos</dt>\n <dd class=\"order-items__totals-item-value\">\n @if (totals.products > 0) {\n <span class=\"text-gray-900\"> ${{ totals.products | number: '1.0-2' }} </span>\n }\n </dd>\n </div>\n }\n\n @if (order.service_fee && order.service_fee > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">Tarifa de servicio</dt>\n <dd class=\"order-items__totals-item-value\">\n <span class=\"text-gray-900\"> ${{ order.service_fee | number: '1.0-2' }} </span>\n </dd>\n </div>\n }\n\n @if (hasDiscount()) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">Descuento</dt>\n <dd class=\"order-items__totals-item-title\">\n $-{{ order.discount_amount | number: '1.0-2' }}\n </dd>\n </div>\n }\n\n <div class=\"order-items__totals-item total-item\">\n <dt class=\"order-items__totals-item-total\">Total</dt>\n <dd class=\"order-items__totals-item-value\">\n @if (!hasDiscount()) {\n <span class=\"order-items__totals-item-total\">\n ${{ order.total | number: '1.0-2' }}\n </span>\n }\n @if (hasDiscount()) {\n <span class=\"order-items__totals-item-discount-wrapper\">\n <span class=\"order-items__totals-item-discount\">\n ${{ order.total | number: '1.0-2' }}\n </span>\n <span class=\"order-items__totals-item-total\">\n ${{ order.total_discounted | number: '1.0-2' }}\n </span>\n </span>\n }\n </dd>\n </div>\n </dl>\n </div>\n </div>\n\n <ticket-qr-modal />\n}\n", styles: [".order-items{background-color:#fff;border-radius:.5rem;border:1px solid #f3f4f6;box-sizing:border-box;overflow:hidden;position:relative;width:100%}.order-items__header{align-items:center;display:flex;flex-flow:row wrap;gap:1rem;padding:1rem;width:100%}.order-items__table-container{overflow-x:auto}.order-items__table{border-collapse:collapse;font-size:.875rem;width:100%}.order-items__table-head-row{background-color:#f9fafb;text-align:left}.order-items__table-head-cell{color:#6b7280;font-size:.75rem;font-weight:700;padding:.75rem 1.5rem;text-transform:uppercase}.order-items__table-head-cell.text-right{text-align:right}.order-items__table-body>:not(:last-child){border-bottom:1px solid #f9fafb}.order-items__table-body-row{transition:all .4s ease}.order-items__table-body-row:hover{background-color:#f9fafb}.order-items__table-body-cell{color:#374151;padding:.75rem 1.5rem;white-space:nowrap}.order-items__table-body-cell.text-right{text-align:right}.order-items__totals{background-color:#f9fafb;border-top:1px solid #f3f4f6;padding:1rem 1.5rem;width:100%}.order-items__totals-container{display:flex;flex-flow:column;gap:.5rem;margin-left:auto;max-width:20rem;width:100%}.order-items__totals-item{display:flex;font-size:.875rem;justify-content:space-between;width:100%}.order-items__totals-item.actions{text-align:left}.order-items__totals-item.total-item{border-top:1px solid #e5e7eb;padding-top:.5rem}.order-items__totals-item-title{color:#6b7280}.order-items__totals-item-total{color:#111827;font-size:1.125rem;font-weight:700;line-height:100%}.order-items__totals-item-discount-wrapper{align-items:flex-end;display:flex;flex-flow:column nowrap;width:100%}.order-items__totals-item-discount{color:#9ca3af;font-size:.75rem;text-decoration:line-through}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AppButtonComponent, selector: "app-button", inputs: ["disabled", "loading", "type", "variant", "text", "size", "loadingText", "icon"], outputs: ["clicked"] }, { kind: "component", type: TicketQrModalComponent, selector: "ticket-qr-modal" }, { kind: "component", type: TicketMapWidgetHeaderComponent, selector: "ticket-map-widget-header", inputs: ["title"] }, { kind: "component", type: OrderItemTypeBadgeComponent, selector: "order-item-type-badge", inputs: ["item", "size"] }, { kind: "pipe", type: i2.DecimalPipe, name: "number" }], encapsulation: i0.ViewEncapsulation.None });
|
|
8190
8201
|
}
|
|
8191
8202
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OrderItemsComponent, decorators: [{
|
|
8192
8203
|
type: Component,
|
|
@@ -8196,7 +8207,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
8196
8207
|
TicketQrModalComponent,
|
|
8197
8208
|
TicketMapWidgetHeaderComponent,
|
|
8198
8209
|
OrderItemTypeBadgeComponent,
|
|
8199
|
-
], encapsulation: ViewEncapsulation.None, template: "@if (!!order) {\n <div class=\"order-items\">\n <div class=\"order-items__header\">\n <ticket-map-widget-header [title]=\"`Art\u00EDculos (${order.order_items.length})`\" />\n </div>\n <div class=\"order-items__table-container\">\n <table class=\"order-items__table\">\n <thead class=\"order-items__table-head\">\n <tr class=\"order-items__table-head-row\">\n <th class=\"order-items__table-head-cell\">Tipo</th>\n <th class=\"order-items__table-head-cell\">Descripci\u00F3n</th>\n\n <th class=\"order-items__table-head-cell text-right\">Cant.</th>\n <th class=\"order-items__table-head-cell text-right\">Precio</th>\n <th class=\"order-items__table-head-cell text-right\">Total</th>\n @if (
|
|
8210
|
+
], encapsulation: ViewEncapsulation.None, template: "@if (!!order) {\n <div class=\"order-items\">\n <div class=\"order-items__header\">\n <ticket-map-widget-header [title]=\"`Art\u00EDculos (${order.order_items.length})`\" />\n </div>\n <div class=\"order-items__table-container\">\n <table class=\"order-items__table\">\n <thead class=\"order-items__table-head\">\n <tr class=\"order-items__table-head-row\">\n <th class=\"order-items__table-head-cell\">Tipo</th>\n <th class=\"order-items__table-head-cell\">Descripci\u00F3n</th>\n\n <th class=\"order-items__table-head-cell text-right\">Cant.</th>\n <th class=\"order-items__table-head-cell text-right\">Precio</th>\n <th class=\"order-items__table-head-cell text-right\">Total</th>\n @if (showActionColumn) {\n <th class=\"order-items__table-head-cell\">Acciones</th>\n }\n </tr>\n </thead>\n <tbody class=\"order-items__table-body\">\n @for (item of order.order_items; track $index) {\n <tr class=\"order-items__table-body-row\">\n <td class=\"order-items__table-body-cell\">\n <order-item-type-badge [item]=\"item\" size=\"xs\" />\n </td>\n\n <td class=\"order-items__table-body-cell\">\n {{ item.description }}\n </td>\n\n <td class=\"order-items__table-body-cell text-right\">\n {{ item.quantity }}\n </td>\n\n <td class=\"order-items__table-body-cell text-right\">\n ${{ item.normal_price | number: '1.0-2' }}\n </td>\n\n <td class=\"order-items__table-body-cell text-right\">\n <strong>\n ${{ itemTotal(item.quantity, item.normal_price) | number: '1.0-2' }}\n </strong>\n </td>\n\n @if (item.ticket_uuid && order.status === 'completed' && showActionColumn) {\n <td class=\"order-items__table-body-cell actions\">\n <app-button\n text=\"Ver ticket\"\n size=\"xs\"\n icon=\"ri-eye-line\"\n (clicked)=\"openTicketQr(item.ticket_uuid!, item.description)\"\n />\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n\n <div class=\"order-items__totals\">\n <dl class=\"order-items__totals-container\">\n @if (giftBonds.length > 0 && totals.giftBonds > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">Bonos de regalo ({{ giftBonds.length }})</dt>\n <dd class=\"order-items__totals-item-value\">\n @if (totals.giftBonds > 0) {\n <span class=\"text-gray-900\"> ${{ totals.giftBonds | number: '1.0-2' }} </span>\n }\n </dd>\n </div>\n }\n\n @if (tickets.length > 0 && totals.tickets > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">Entradas ({{ tickets.length }})</dt>\n <dd class=\"order-items__totals-item-value\">\n @if (totals.tickets > 0) {\n <span class=\"text-gray-900\"> ${{ totals.tickets | number: '1.0-2' }} </span>\n }\n </dd>\n </div>\n }\n\n @if (products.length > 0 && totals.products > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">Productos</dt>\n <dd class=\"order-items__totals-item-value\">\n @if (totals.products > 0) {\n <span class=\"text-gray-900\"> ${{ totals.products | number: '1.0-2' }} </span>\n }\n </dd>\n </div>\n }\n\n @if (order.service_fee && order.service_fee > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">Tarifa de servicio</dt>\n <dd class=\"order-items__totals-item-value\">\n <span class=\"text-gray-900\"> ${{ order.service_fee | number: '1.0-2' }} </span>\n </dd>\n </div>\n }\n\n @if (hasDiscount()) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">Descuento</dt>\n <dd class=\"order-items__totals-item-title\">\n $-{{ order.discount_amount | number: '1.0-2' }}\n </dd>\n </div>\n }\n\n <div class=\"order-items__totals-item total-item\">\n <dt class=\"order-items__totals-item-total\">Total</dt>\n <dd class=\"order-items__totals-item-value\">\n @if (!hasDiscount()) {\n <span class=\"order-items__totals-item-total\">\n ${{ order.total | number: '1.0-2' }}\n </span>\n }\n @if (hasDiscount()) {\n <span class=\"order-items__totals-item-discount-wrapper\">\n <span class=\"order-items__totals-item-discount\">\n ${{ order.total | number: '1.0-2' }}\n </span>\n <span class=\"order-items__totals-item-total\">\n ${{ order.total_discounted | number: '1.0-2' }}\n </span>\n </span>\n }\n </dd>\n </div>\n </dl>\n </div>\n </div>\n\n <ticket-qr-modal />\n}\n", styles: [".order-items{background-color:#fff;border-radius:.5rem;border:1px solid #f3f4f6;box-sizing:border-box;overflow:hidden;position:relative;width:100%}.order-items__header{align-items:center;display:flex;flex-flow:row wrap;gap:1rem;padding:1rem;width:100%}.order-items__table-container{overflow-x:auto}.order-items__table{border-collapse:collapse;font-size:.875rem;width:100%}.order-items__table-head-row{background-color:#f9fafb;text-align:left}.order-items__table-head-cell{color:#6b7280;font-size:.75rem;font-weight:700;padding:.75rem 1.5rem;text-transform:uppercase}.order-items__table-head-cell.text-right{text-align:right}.order-items__table-body>:not(:last-child){border-bottom:1px solid #f9fafb}.order-items__table-body-row{transition:all .4s ease}.order-items__table-body-row:hover{background-color:#f9fafb}.order-items__table-body-cell{color:#374151;padding:.75rem 1.5rem;white-space:nowrap}.order-items__table-body-cell.text-right{text-align:right}.order-items__totals{background-color:#f9fafb;border-top:1px solid #f3f4f6;padding:1rem 1.5rem;width:100%}.order-items__totals-container{display:flex;flex-flow:column;gap:.5rem;margin-left:auto;max-width:20rem;width:100%}.order-items__totals-item{display:flex;font-size:.875rem;justify-content:space-between;width:100%}.order-items__totals-item.actions{text-align:left}.order-items__totals-item.total-item{border-top:1px solid #e5e7eb;padding-top:.5rem}.order-items__totals-item-title{color:#6b7280}.order-items__totals-item-total{color:#111827;font-size:1.125rem;font-weight:700;line-height:100%}.order-items__totals-item-discount-wrapper{align-items:flex-end;display:flex;flex-flow:column nowrap;width:100%}.order-items__totals-item-discount{color:#9ca3af;font-size:.75rem;text-decoration:line-through}\n"] }]
|
|
8200
8211
|
}], ctorParameters: () => [{ type: TicketQrModalService }], propDecorators: { order: [{
|
|
8201
8212
|
type: Input,
|
|
8202
8213
|
args: [{ required: true }]
|