hedera-web/forms/ecomerce/checkout/ui.xml

202 lines
5.2 KiB
XML
Raw Normal View History

2015-03-06 23:33:54 +00:00
<vn>
<vn-group>
2022-05-30 01:30:33 +00:00
<vn-lot id="lot" on-change="this.onAddressChange()"/>
2015-07-15 13:39:07 +00:00
<db-form id="defaults" on-ready="onValuesReady">
2015-11-09 08:14:33 +00:00
<db-model property="model">
2018-09-14 13:13:28 +00:00
SELECT deliveryMethod, agencyModeFk, addressFk, defaultAgencyFk
2018-05-11 09:25:10 +00:00
FROM myBasketDefaults
</db-model>
</db-form>
2015-07-15 13:39:07 +00:00
<db-form id="order-form" on-ready="onValuesReady">
2015-11-09 08:14:33 +00:00
<db-model property="model">
2018-05-11 09:25:10 +00:00
SELECT m.code deliveryMethod, o.sent, o.agencyModeFk, o.addressFk
FROM myBasket o
JOIN vn.deliveryMethod m ON m.id = o.deliveryMethodFk
2015-07-03 05:49:45 +00:00
</db-model>
</db-form>
2018-01-19 14:59:44 +00:00
<db-model id="agencies"
auto-load="false"
2022-05-30 01:30:33 +00:00
lot="lot"
2018-01-19 14:59:44 +00:00
result-index="1"
on-status-changed="onAgenciesReady">
2020-02-12 07:24:32 +00:00
CALL vn.zone_getAgency(#address, #date);
2019-06-05 07:05:54 +00:00
SELECT DISTINCT a.agencyModeFk id, a.description
FROM tmp.zoneGetAgency a
2018-05-11 09:25:10 +00:00
JOIN vn.deliveryMethod d
2019-06-05 07:05:54 +00:00
ON d.id = a.deliveryMethodFk
2018-05-11 09:25:10 +00:00
WHERE d.code IN ('AGENCY', 'DELIVERY')
2020-04-11 11:37:03 +00:00
AND a.isVisible
2019-06-05 07:05:54 +00:00
ORDER BY a.description;
DROP TEMPORARY TABLE tmp.zoneGetAgency;
2015-07-17 14:34:42 +00:00
</db-model>
2018-01-19 14:59:44 +00:00
<db-model id="warehouses"
auto-load="false"
2022-05-30 01:30:33 +00:00
lot="lot"
2018-01-19 14:59:44 +00:00
result-index="1"
on-status-changed="onWarehousesReady">
2020-02-12 07:24:32 +00:00
CALL vn.zone_getAgency(#address, #date);
2019-06-05 07:05:54 +00:00
SELECT DISTINCT a.agencyModeFk id, a.description
FROM tmp.zoneGetAgency a
2018-05-11 09:25:10 +00:00
JOIN vn.deliveryMethod d
2019-06-05 07:05:54 +00:00
ON d.id = a.deliveryMethodFk
2018-05-11 09:25:10 +00:00
WHERE d.code IN ('PICKUP')
2020-04-11 11:37:03 +00:00
AND a.isVisible
2019-06-05 07:05:54 +00:00
ORDER BY a.description;
DROP TEMPORARY TABLE tmp.zoneGetAgency;
2015-07-15 13:39:07 +00:00
</db-model>
2015-03-06 23:33:54 +00:00
</vn-group>
<div id="title">
<h1><t>ConfigureOrder</t></h1>
</div>
2015-09-16 16:11:15 +00:00
<div id="actions">
2016-09-19 06:40:18 +00:00
<htk-bar-button
icon="close"
2015-09-16 16:11:15 +00:00
tip="_Cancel"
2016-09-19 06:40:18 +00:00
on-click="onCancelClick"/>
</div>
2015-03-06 23:33:54 +00:00
<div id="form" class="checkout">
2022-05-26 06:08:31 +00:00
<div class="vn-w-sm">
<div class="box bar">
<htk-assistant-bar
id="assistant-bar"
assistant="assistant"/>
</div>
<div class="box vn-px-lg vn-py-xl">
<div class="form">
<htk-assistant id="assistant"
endFunc="onConfirmClick">
<htk-step
name="method"
validate-func="methodValidate">
<h2><t>DeliveryOrPickupQuestion</t></h2>
<div class="answers radio">
<htk-radio-group
id="rg-method"
param="method"
on-changed="onMethodChange"/>
<div>
<label>
<htk-radio radio-group="rg-method" value="AGENCY"/>
<t>Receive the order</t>
</label>
</div>
<div>
<label>
<htk-radio radio-group="rg-method" value="PICKUP"/>
<t>PickupInStore</t>
</label>
</div>
</div>
</htk-step>
<htk-step
name="date"
show-func="dateShow"
validate-func="dateValidate">
<h2 id="date-question"/>
<div class="answers">
<htk-calendar
id="calendar"
class="thin-calendar"
param="date"
restrict-func="calendarRestrict"
on-changed="onFieldChange"/>
</div>
</htk-step>
<htk-step
name="address"
show-func="addressShow"
validate-func="addressValidate">
<h2 id="address-question"/>
<div class="answers target">
<db-form id="address-form" model="addresses"/>
<htk-repeater
id="repeater"
form-id="iter"
on-change="onAddressChange"
renderer="addressRenderer">
<db-model property="model" id="addresses">
SELECT a.id, a.nickname, p.name province, a.city, a.street, a.isActive, c.country
FROM myAddress a
LEFT JOIN vn.province p ON p.id = a.provinceFk
JOIN vn.country c ON c.id = p.countryFk
WHERE a.isActive
</db-model>
<custom>
<div class="address" id="address">
<p class="consignee">
<htk-text form="iter" column="nickname"/>
</p>
<p>
<htk-text form="iter" column="street"/>
</p>
</div>
</custom>
</htk-repeater>
</div>
</htk-step>
<htk-step
name="agency"
show-func="agencyShow"
validate-func="agencyValidate">
<h2><t>AgencyQuestion</t></h2>
<div class="answers target">
<htk-combo
id="agency-combo"
param="agency"
on-changed="onFieldChange"
model="agencies"/>
</div>
</htk-step>
<htk-step
name="pickup"
show-func="pickupShow"
validate-func="pickupValidate">
<h2><t>PickupWarehouseQuestion</t></h2>
<div class="answers target">
<htk-combo
id="warehouse-combo"
param="agency"
on-changed="onFieldChange"
model="warehouses"/>
</div>
</htk-step>
<htk-step
name="confirm-delivery">
<h2><t>ConfirmData</t></h2>
<div class="answers target">
<p>
<t>Arrival</t>
<htk-text format="%D" param="date"/>
</p>
<p>
<htk-text form="address-form" column="street"/>
</p>
<p>
<t>Agency</t>
<htk-text form="agency-combo" column="description"/>
</p>
<div class="clear"/>
</div>
2022-05-26 06:08:31 +00:00
</htk-step>
<htk-step
name="confirm-pickup">
<h2><t>ConfirmData</t></h2>
<div class="answers target">
<p>
<t>Pickup</t>
<htk-text format="%D" param="date"/>
</p>
<p>
<t>Warehouse</t>
<htk-text form="warehouse-combo" column="description"/>
</p>
<div class="clear"/>
2015-07-10 12:30:08 +00:00
</div>
2022-05-26 06:08:31 +00:00
</htk-step>
</htk-assistant>
</div>
2015-03-06 23:33:54 +00:00
</div>
</div>
</div>
</vn>