From 4079fd9417e11c6233a4a85fa14d315788b18806 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Fri, 12 May 2023 17:52:13 +0800 Subject: Coupon part is made so it can be customised --- Shop/Checkout/RightSidebar/OrderSummary.ui.qml | 128 ++++++++++++++----------- 1 file changed, 72 insertions(+), 56 deletions(-) (limited to 'Shop/Checkout') diff --git a/Shop/Checkout/RightSidebar/OrderSummary.ui.qml b/Shop/Checkout/RightSidebar/OrderSummary.ui.qml index faf136f..bf9ba8d 100644 --- a/Shop/Checkout/RightSidebar/OrderSummary.ui.qml +++ b/Shop/Checkout/RightSidebar/OrderSummary.ui.qml @@ -8,6 +8,7 @@ import "../../../Button" import "../.." ColumnLayout { + property alias coupon: coupon property alias courseItems: courseItems property alias priceValue: priceValue property alias discountValue: discountValue @@ -24,77 +25,92 @@ ColumnLayout { Layout.topMargin: 16 } - ColumnLayout { + ListView { + id: coupon + Layout.fillWidth: true Layout.margins: 16 - spacing: 16 + interactive: false + implicitHeight: 87 + model: 1 + delegate: ColumnLayout { + Bootstrap.mode: coupon.Bootstrap.mode + width: coupon.width + spacing: 16 - Item { - Layout.fillWidth: true - implicitHeight: codeLabel.implicitHeight + Item { + Layout.fillWidth: true + implicitHeight: codeLabel.implicitHeight + codeValue.implicitHeight - Label { - id: codeLabel - text: qsTr("Transaction code") - wrapMode: Label.Wrap - anchors.verticalCenter: parent.verticalCenter - } - - Label { - id: codeValue - text: "AB12365E" - wrapMode: Label.Wrap - Bootstrap.heading: 6 - font { - family: Eduport.fwLightFont.family - weight: Eduport.fwLightFont.weight - pointSize: Eduport.h6FontSize + Label { + id: codeLabel + text: qsTr("Transaction code") + wrapMode: Label.Wrap + anchors.verticalCenter: parent + .verticalCenter } - anchors { - right: parent.right - verticalCenter: parent.verticalCenter + + Label { + id: codeValue + text: "AB12365E" + wrapMode: Label.Wrap + Bootstrap.heading: 6 + font { + family: Eduport + .fwLightFont.family + weight: Eduport + .fwLightFont.weight + pointSize: Eduport.h6FontSize + } + anchors { + right: parent.right + verticalCenter: parent + .verticalCenter + } } } - } - RowLayout { + RowLayout { - Rectangle { - implicitHeight: 56 - color: "#f5f7f9" - radius: 8 - border.width: 0 - Layout.fillWidth: true - RowLayout { - anchors.fill: parent - Input { - placeholderText: + Rectangle { + implicitHeight: 56 + color: "#f5f7f9" + radius: 8 + border.width: 0 + Layout.fillWidth: true + RowLayout { + anchors.fill: parent + Input { + placeholderText: qsTr("COUPON CODE") - Layout.fillWidth: true - Layout.fillHeight: true + Layout.fillWidth: true + Layout.fillHeight: true + } } } - } - Button { - text: qsTr("Apply") - font.pointSize: 14 - font.family: "roboto" - implicitHeight: 56 - contentItem: Text { - color: "#ffffff" - text: "Apply" - padding: 12 - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - font.weight: Font.Medium - font.family: "Roboto" + Button { + text: qsTr("Apply") font.pointSize: 14 - } + font.family: "roboto" + implicitHeight: 56 + contentItem: Text { + color: "#ffffff" + text: "Apply" + padding: 12 + horizontalAlignment: Text + .AlignHCenter + verticalAlignment: Text + .AlignVCenter + font.weight: Font.Medium + font.family: "Roboto" + font.pointSize: 14 + } - background: Rectangle { - color: "#066ac9" - radius: 8 + background: Rectangle { + color: "#066ac9" + radius: 8 + } } } } -- cgit v1.2.3