hedera-web/forms/account/address-list/ui.xml

75 lines
1.7 KiB
XML

<vn>
<vn-group>
<db-form id="user-form">
<db-model property="model" id="user-model" updatable="true">
<custom>
SELECT id, defaultAddressFk
FROM myClient c
</custom>
</db-model>
</db-form>
<db-model id="addresses" updatable="true">
<custom>
SELECT a.id, a.nickname, p.name province, a.postalCode,
a.city, a.street, a.isActive
FROM myAddress a
LEFT JOIN vn.province p ON p.id = a.provinceFk
WHERE a.isActive
</custom>
</db-model>
</vn-group>
<div id="title">
<h1><t>Addresses</t></h1>
</div>
<div id="actions">
<htk-bar-button
icon="add"
tip="_AddAddress"
on-click="this.onAddAddressClick()"/>
</div>
<div id="form" class="address-list">
<div class="box vn-w-sm">
<htk-radio-group
id="default-address"
column="defaultAddressFk"
form="user-form"/>
<htk-repeater model="addresses" form-id="address" class="htk-list">
<custom>
<div class="item clickable" on-click="this.onSetDefaultClick($event, address.id)">
<div class="side">
<htk-radio
radio-group="default-address"
val="{{address.id}}"
tip="_SetAsDefault"
name="test"/>
</div>
<div class="content">
<p class="important">
{{address.nickname}}
</p>
<p>
{{address.street}}
</p>
<p>
{{address.postalCode}}, {{address.city}}
</p>
</div>
<div
class="actions"
on-click="$event.preventDefault()">
<htk-button
icon="delete"
tip="_RemoveAddress"
on-click="this.onRemoveAddressClick($iter)"/>
<htk-button
icon="edit"
tip="_EditAddress"
on-click="this.onEditAddressClick(address.id)"/>
</div>
</div>
</custom>
</htk-repeater>
</div>
</div>
</vn>