Fixes
gitea/hedera-web/pipeline/head This commit looks good
Details
gitea/hedera-web/pipeline/head This commit looks good
Details
This commit is contained in:
parent
28ca363348
commit
5e87da735f
|
@ -1,4 +1,4 @@
|
|||
hedera-web (1.408.11) stable; urgency=low
|
||||
hedera-web (1.408.12) stable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
|
|
|
@ -40,28 +40,30 @@
|
|||
<div class="form-group">
|
||||
<htk-entry
|
||||
placeholder="_Name"
|
||||
column="nickname" form="iter"/>
|
||||
form="iter" column="nickname"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<htk-entry
|
||||
placeholder="_Address"
|
||||
column="street" form="iter"/>
|
||||
form="iter" column="street"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<htk-entry
|
||||
placeholder="_City"
|
||||
column="city" form="iter"/>
|
||||
form="iter" column="city"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<htk-entry
|
||||
placeholder="_ZipCode"
|
||||
column="postalCode" form="iter"/>
|
||||
form="iter" column="postalCode"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<htk-combo
|
||||
placeholder="_Country"
|
||||
form="iter" column="countryFk"
|
||||
id="country"
|
||||
one-way="true">
|
||||
one-way="true"
|
||||
one-time="true">
|
||||
<db-model property="model">
|
||||
SELECT id, country FROM vn.country
|
||||
ORDER BY country
|
||||
|
|
|
@ -143,9 +143,9 @@ Hedera.Confirm = new Class({
|
|||
conn: this.conn,
|
||||
hash: this.hash
|
||||
});
|
||||
tpv.pay(payAmount, this.$.orderForm.$.companyFk);
|
||||
tpv.pay(payAmount, this.$.order.companyFk);
|
||||
} else
|
||||
this.hash.setAll({'form': 'ecomerce/orders'});
|
||||
this.hash.setAll({form: 'ecomerce/orders'});
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<vn>
|
||||
<vn-group>
|
||||
<db-form id="order-form" on-ready="onOrderReady">
|
||||
<db-form v-model="order" on-ready="onOrderReady">
|
||||
<db-model property="model" result-index="1">
|
||||
CALL myBasket_getTax;
|
||||
SELECT o.id, o.sent, o.notes, o.companyFk,
|
||||
|
@ -36,26 +36,17 @@
|
|||
<div class="delivery">
|
||||
<h6><t>ShippingInformation</t></h6>
|
||||
<p>
|
||||
<t>Delivery at</t>
|
||||
<htk-text format="%D" form="order-form" column="sent"/>
|
||||
<t>Delivery at</t> {{Vn.Value.format(order.sent, _('%D'))}}
|
||||
</p>
|
||||
<p>
|
||||
<span id="method"><t>Agency</t></span>
|
||||
<htk-text form="order-form" column="agency"/>
|
||||
<span id="method"><t>Agency</t></span> {{order.agency}}
|
||||
</p>
|
||||
</div>
|
||||
<div id="address" class="address vn-mt-md">
|
||||
<h6><t>DeliveryAddress</t></h6>
|
||||
<p>
|
||||
<htk-text form="order-form" column="nickname"/>
|
||||
</p>
|
||||
<p>
|
||||
<htk-text form="order-form" column="street"/>
|
||||
</p>
|
||||
<p>
|
||||
<htk-text form="order-form" column="postalCode"/>,
|
||||
<htk-text form="order-form" column="city"/>
|
||||
</p>
|
||||
<p>{{order.nickname}}</p>
|
||||
<p>{{order.street}}</p>
|
||||
<p>{{order.postalCode}}, {{order.city}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -64,9 +55,7 @@
|
|||
<table class="debt-info">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<t>Previous balance</t>
|
||||
</td>
|
||||
<td><t>Previous balance</t></td>
|
||||
<td class="currency">
|
||||
<htk-text format="%.2d€" id="debt"/>
|
||||
</td>
|
||||
|
@ -76,7 +65,7 @@
|
|||
<t>Order total</t>
|
||||
</td>
|
||||
<td class="currency">
|
||||
<htk-text format="%.2d€" form="order-form" column="taxableBase"/>
|
||||
{{Vn.Value.format(order.taxableBase, _('%.2d€'))}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -84,7 +73,7 @@
|
|||
<t>Order VAT</t>
|
||||
</td>
|
||||
<td class="currency">
|
||||
<htk-text format="%.2d€" form="order-form" column="tax"/>
|
||||
{{Vn.Value.format(order.tax, _('%.2d€'))}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="total-debt sum-total">
|
||||
|
@ -100,7 +89,7 @@
|
|||
<t>Credit</t>
|
||||
</td>
|
||||
<td class="currency">
|
||||
<htk-text format="%.2d€" form="order-form" column="credit"/>
|
||||
{{Vn.Value.format(order.credit, _('%.2d€'))}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="exceeded-info" class="exceeded-info sum-total">
|
||||
|
@ -183,8 +172,8 @@
|
|||
</db-model>
|
||||
<custom>
|
||||
<div class="transfer-account">
|
||||
<p><htk-text form="iter" column="name"/></p>
|
||||
<p><htk-text form="iter" column="iban"/></p>
|
||||
<p>{{iter.name}}</p>
|
||||
<p>{{iter.iban}}</p>
|
||||
</div>
|
||||
</custom>
|
||||
</htk-repeater>
|
||||
|
|
|
@ -13,7 +13,7 @@ Hedera.Ticket = new Class({
|
|||
onPrintClick: function() {
|
||||
let params = Vn.Url.makeUri({
|
||||
authorization: this.conn.token,
|
||||
ticketId: this.$.ticketId.value,
|
||||
ticketId: this.hash.$.ticket,
|
||||
recipientId: this.gui.user.id,
|
||||
type: 'deliveryNote'
|
||||
});
|
||||
|
|
|
@ -60,6 +60,15 @@ module.exports = new Class({
|
|||
return this._oneWay;
|
||||
}
|
||||
},
|
||||
oneTime: {
|
||||
type: Boolean
|
||||
,set: function(x) {
|
||||
this._oneTime = x;
|
||||
}
|
||||
,get: function() {
|
||||
return this._oneTime;
|
||||
}
|
||||
},
|
||||
editable: {
|
||||
type: Boolean
|
||||
,set: function(x) {
|
||||
|
|
|
@ -64,6 +64,15 @@ module.exports = new Class({
|
|||
,get: function() {
|
||||
return this._oneWay;
|
||||
}
|
||||
},
|
||||
oneTime: {
|
||||
type: Boolean
|
||||
,set: function(x) {
|
||||
this._oneTime = x;
|
||||
}
|
||||
,get: function() {
|
||||
return this._oneTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -51,10 +51,9 @@ module.exports = new Class({
|
|||
,_value: undefined
|
||||
,_type: null
|
||||
,_param: null
|
||||
,_paramLock: false
|
||||
,_lot: null
|
||||
,_sourceLock: false
|
||||
,_name: null
|
||||
,_lotLock: false
|
||||
,_oneWay: false
|
||||
|
||||
,_setValue: function(newValue) {
|
||||
|
@ -80,53 +79,57 @@ module.exports = new Class({
|
|||
this._type = type;
|
||||
this._onLotChange();
|
||||
}
|
||||
|
||||
,_onSourceChange(newValue) {
|
||||
if (this._oneTime && this._value !== undefined)
|
||||
return;
|
||||
|
||||
this._sourceLock = true;
|
||||
this._setValue(newValue);
|
||||
this._sourceLock = false;
|
||||
}
|
||||
|
||||
,_setParam: function(param) {
|
||||
this.link({_lot: null});
|
||||
this.link({_param: param}, {changed: this._onParamChange});
|
||||
this._refreshParam();
|
||||
}
|
||||
|
||||
,_onParamChange: function() {
|
||||
if (this._paramLock || !this._param)
|
||||
return;
|
||||
|
||||
this._paramLock = true;
|
||||
this._setValue(this._param.value);
|
||||
this._paramLock = false;
|
||||
if (this._sourceLock || !this._param) return;
|
||||
this._onSourceChange(this._param.value);
|
||||
}
|
||||
|
||||
,_refreshParam: function() {
|
||||
if (this._paramLock || !this._param)
|
||||
if (this._sourceLock || !this._param || this._oneWay)
|
||||
return;
|
||||
|
||||
this._paramLock = true;
|
||||
this._sourceLock = true;
|
||||
this._param.value = this._value;
|
||||
this._paramLock = false;
|
||||
this._sourceLock = false;
|
||||
}
|
||||
|
||||
,_setLot: function(lot) {
|
||||
this.link({_param: null});
|
||||
this.link({_lot: lot}, {change: this._onLotChange});
|
||||
this._onLotChange();
|
||||
}
|
||||
|
||||
,_onLotChange: function() {
|
||||
if (this._lotLock || !this._name || !this._lot)
|
||||
if (this._sourceLock || !this._lot || !this._name)
|
||||
return;
|
||||
|
||||
var newValue = this._lot.get(this._name, this._type);
|
||||
|
||||
this._lotLock = true;
|
||||
this._setValue(newValue);
|
||||
this._lotLock = false;
|
||||
this._onSourceChange(newValue);
|
||||
}
|
||||
|
||||
,_refreshLot: function() {
|
||||
if (this._lotLock || !this._name || !this._lot || this._oneWay)
|
||||
if (this._sourceLock || !this._name || !this._lot || this._oneWay)
|
||||
return;
|
||||
|
||||
this._lotLock = true;
|
||||
this._sourceLock = true;
|
||||
this._lot.set(this._name, this._value);
|
||||
this._lotLock = false;
|
||||
this._sourceLock = false;
|
||||
}
|
||||
|
||||
,_setName: function(name) {
|
||||
|
|
|
@ -74,6 +74,15 @@ module.exports = new Class({
|
|||
,get: function() {
|
||||
return this._oneWay;
|
||||
}
|
||||
},
|
||||
oneTime: {
|
||||
type: Boolean
|
||||
,set: function(x) {
|
||||
this._oneTime = x;
|
||||
}
|
||||
,get: function() {
|
||||
return this._oneTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hedera-web",
|
||||
"version": "1.408.11",
|
||||
"version": "1.408.12",
|
||||
"description": "Verdnatura web page",
|
||||
"license": "GPL-3.0",
|
||||
"repository": {
|
||||
|
|
|
@ -50,7 +50,7 @@ class JsonService extends RestService {
|
|||
if (_ENABLE_DEBUG || $errno & $eUser)
|
||||
$json->message = $message;
|
||||
else
|
||||
$json->message = s('Something went wrong');
|
||||
$json->message = \s('Something went wrong');
|
||||
|
||||
if (_ENABLE_DEBUG) {
|
||||
$json->code = $errno;
|
||||
|
@ -80,7 +80,7 @@ class JsonService extends RestService {
|
|||
$json->message = $e->getMessage();
|
||||
} else {
|
||||
$json->exception = 'Exception';
|
||||
$json->message = s('Something went wrong');
|
||||
$json->message = \s('Something went wrong');
|
||||
}
|
||||
|
||||
if (_ENABLE_DEBUG) {
|
||||
|
|
|
@ -34,7 +34,7 @@ class RestService extends Service {
|
|||
$isAuthorized = $db->getValue('SELECT myUser_checkRestPriv(#)',
|
||||
[$_REQUEST['method']]);
|
||||
if (!$isAuthorized)
|
||||
throw new ForbiddenException(s('You don\'t have enough privileges'));
|
||||
throw new ForbiddenException(\s('You don\'t have enough privileges'));
|
||||
|
||||
if ($method::SECURITY == Security::DEFINER) {
|
||||
$methodDb = $db;
|
||||
|
@ -42,7 +42,7 @@ class RestService extends Service {
|
|||
$methodDb = $this->getUserDb($_SESSION['user']);
|
||||
|
||||
if ($method::PARAMS !== NULL && !$method->checkParams($_REQUEST, $method::PARAMS))
|
||||
throw new UserException (s('Missing parameters'));
|
||||
throw new UserException (\s('Missing parameters'));
|
||||
|
||||
Locale::addPath('rest/'. dirname($_REQUEST['method']));
|
||||
|
||||
|
@ -52,7 +52,7 @@ class RestService extends Service {
|
|||
$res = $method->run($methodDb);
|
||||
} catch (Db\Exception $e) {
|
||||
if ($e->getCode() == 1644)
|
||||
throw new UserException(s($e->getMessage()));
|
||||
throw new UserException(\s($e->getMessage()));
|
||||
}
|
||||
|
||||
if ($method::SECURITY == Security::DEFINER)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"buildDir": "build",
|
||||
"devServerPort": 9000,
|
||||
"devServerPort": 9090,
|
||||
"entry": "./app.js"
|
||||
}
|
Loading…
Reference in New Issue