71 lines
1.6 KiB
XML
71 lines
1.6 KiB
XML
<vn>
|
|
<vn-group>
|
|
<db-form id="user-form">
|
|
<db-model property="model" id="user-model" updatable="true">
|
|
SELECT id, defaultAddressFk
|
|
FROM myClient c
|
|
</db-model>
|
|
</db-form>
|
|
<db-model id="addresses" updatable="true">
|
|
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
|
|
</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="hedera-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>
|