refs #4922 Project root clean
gitea/hedera-web/pipeline/head This commit looks good Details

This commit is contained in:
Juan Ferrer 2024-11-26 14:25:57 +01:00
parent 850f4ba804
commit 5b84a03e16
564 changed files with 25 additions and 25250 deletions

View File

@ -18,6 +18,7 @@ $ npm run dev
Launch project backend.
```
$ cd back
$ php -S 127.0.0.1:3002 -t . index.php
Run server side method from command line.

41
app.js
View File

@ -1,41 +0,0 @@
__webpack_public_path__ = _PUBLIC_PATH;
import 'promise-polyfill/src/polyfill';
import 'hedera/hedera';
const locales = require('./import').locales;
const packageJson = require('./package.json');
window.onload = function() {
loadLocale(main);
}
function main() {
Vn.setVersion(packageJson.version);
const hederaWeb = new Hedera.App();
window.hederaWeb = hederaWeb;
hederaWeb.run();
}
function loadLocale(callback) {
Vn.Locale.init();
var lang = Vn.Locale.language;
var req = require.context('js', true, /locale\/en.yml$/);
onLocaleLoad(Vn.Locale.fallbackLang, req);
const loadFn = locales[lang];
if (loadFn)
loadFn(function(req) {
onLocaleLoad(lang, req);
callback();
});
else
callback();
}
function onLocaleLoad(lang, req) {
var keys = req.keys();
for (var i = 0; i < keys.length; i++)
Vn.Locale.add(req(keys[i]), lang);
}

View File

@ -1,6 +1,6 @@
<?php
require_once __DIR__.'/../php-vn-lib/env.php';
require_once __DIR__.'/../../php-vn-lib/env.php';
set_include_path(__DIR__.PATH_SEPARATOR.get_include_path());

8
back/package.json Normal file
View File

@ -0,0 +1,8 @@
{
"name": "hedera-web-back",
"version": "24.50.10",
"description": "Verdnatura web page backend",
"license": "GPL-3.0",
"productName": "Salix",
"author": "Verdnatura"
}

24
debian/install vendored
View File

@ -1,14 +1,14 @@
apache.conf etc/hedera-web
config.php etc/hedera-web
php.ini etc/hedera-web
web usr/share/php/vn
doc/* usr/share/doc/hedera-web
utils usr/share/hedera-web
README.md usr/share/hedera-web
index.php usr/share/hedera-web/back
hedera-web.php usr/share/hedera-web/back
package.json usr/share/hedera-web/back
rest usr/share/hedera-web/back
reports usr/share/hedera-web/back
back/apache.conf etc/hedera-web
back/config.php etc/hedera-web
back/php.ini etc/hedera-web
back/web usr/share/php/vn
back/index.php usr/share/hedera-web/back
back/hedera-web.php usr/share/hedera-web/back
back/rest usr/share/hedera-web/back
back/reports usr/share/hedera-web/back
back/package.json usr/share/hedera-web/back
dist/spa/* usr/share/hedera-web/spa
build-deps/node_modules usr/share/hedera-web/spa
utils usr/share/hedera-web
README.md usr/share/hedera-web
doc/* usr/share/doc/hedera-web

View File

@ -1,43 +0,0 @@
import './style.scss';
export default new Class({
Extends: Hedera.Form,
Template: require('./ui.xml')
,activate() {
this.$.userModel.setInfo('c', 'myClient', 'hedera');
this.$.addresses.setInfo('a', 'myAddress', 'hedera');
}
,onAddAddressClick() {
this.hash.setAll({
form: 'account/address',
address: 0
});
}
,onReturnClick() {
window.history.back();
}
,onSetDefaultClick(event, addressId) {
if (event.defaultPrevented) return;
this.$.defaultAddress.value = addressId;
Htk.Toast.showMessage(_('DefaultAddressModified'));
}
,async onRemoveAddressClick(form) {
if (confirm(_('AreYouSureDeleteAddress'))) {
await form.set('isActive', false);
await form.refresh();
}
}
,onEditAddressClick(address) {
this.hash.setAll({
form: 'account/address',
address
});
}
});

View File

@ -1,8 +0,0 @@
Addresses: Adreces
Return: Tornar
AddAddress: Afegir adreça
SetAsDefault: Establir com per defecte
RemoveAddress: Esborrar direcció
EditAddress: Modificar direcció
AreYouSureDeleteAddress: Estàs segur de que vols eliminar la direcció?
DefaultAddressModified: Adreça per defecte modificada

View File

@ -1,8 +0,0 @@
Addresses: Addresses
Return: Return
AddAddress: Add address
SetAsDefault: Set as default
RemoveAddress: Remove address
EditAddress: Edit address
AreYouSureDeleteAddress: Are you sure you want to delete the address?
DefaultAddressModified: Default address modified

View File

@ -1,8 +0,0 @@
Addresses: Direcciones
Return: Volver
AddAddress: Añadir dirección
SetAsDefault: Establecer como predeterminada
RemoveAddress: Borrar dirección
EditAddress: Modificar dirección
AreYouSureDeleteAddress: ¿Estás seguro de que quieres borrar la dirección?
DefaultAddressModified: Dirección por defecto modificada

View File

@ -1,8 +0,0 @@
Addresses: Adresses
Return: Retour
AddAddress: Ajouter une adresse
SetAsDefault: Définir par défaut
RemoveAddress: Supprimer l'adresse
EditAddress: Changement d'adresse
AreYouSureDeleteAddress: Souhaitez-vous vraiment supprier l'adresse?
DefaultAddressModified: Adresse par défaut modifiée

View File

@ -1,8 +0,0 @@
Addresses: Moradas
Return: Voltar
AddAddress: Adicionar Morada
SetAsDefault: Selecionar como pre-determinado
RemoveAddress: Eliminar Morada
EditAddress: Modificar Morada
AreYouSureDeleteAddress: Tens certeza que queres eliminar esta morada?
DefaultAddressModified: Endereço padrão modificado

View File

@ -1,6 +0,0 @@
hedera-address-list {
.htk-list .side {
padding-right: 16px;
}
}

View File

@ -1,70 +0,0 @@
<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>

Some files were not shown because too many files have changed in this diff Show More