Compare commits

..

No commits in common. "dev" and "dev" have entirely different histories.
dev ... dev

13 changed files with 67 additions and 48 deletions

1
.gitignore vendored
View File

@ -1,6 +1,5 @@
node_modules
build/
dist/
config.my.php
.vscode/
.quasar

View File

@ -28,7 +28,7 @@ RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
# Hedera
RUN curl -sL https://apt.verdnatura.es/conf/verdnatura.gpg | tee /etc/apt/trusted.gpg.d/verdnatura.gpg \
RUN curl -sL https://apt.verdnatura.es/conf/verdnatura.gpg | apt-key add - \
&& echo "deb http://apt.verdnatura.es/ bookworm main" \
> /etc/apt/sources.list.d/vn.list \
&& apt-get update \

59
Jenkinsfile vendored
View File

@ -4,7 +4,6 @@ def BRANCH_ENV = [
test: 'test',
master: 'production'
]
def remote = [:]
node {
stage('Setup') {
@ -29,28 +28,35 @@ pipeline {
}
agent {
docker {
image 'registry.verdnatura.es/verdnatura/debuild:2.23.4-vn7'
image 'registry.verdnatura.es/debuild:2.23.4-vn1'
registryUrl 'https://registry.verdnatura.es/'
registryCredentialsId 'docker-registry'
args '-v /mnt/appdata/reprepro:/reprepro'
}
}
steps {
sh 'debuild -us -uc -b'
sh 'mkdir -p debuild'
sh 'mv ../hedera-web_* debuild'
sh 'vn-includedeb bookworm'
}
}
stage('Container') {
when {
anyOf {
branch 'master'
branch 'test'
}
}
environment {
CREDS = credentials('docker-registry')
}
steps {
script {
def files = findFiles(glob: 'debuild/*.changes')
files.each { file -> env.CHANGES_FILE = file.name }
}
configFileProvider([
configFile(fileId: "dput.cf", variable: 'DPUT_CONFIG')
]) {
sshagent(credentials: ['jenkins-agent']) {
sh 'dput --config "$DPUT_CONFIG" verdnatura "debuild/$CHANGES_FILE"'
}
def packageJson = readJSON file: 'package.json'
env.VERSION = packageJson.version
}
sh 'docker login --username $CREDS_USR --password $CREDS_PSW $REGISTRY'
sh 'docker-compose build --build-arg BUILD_ID=$BUILD_ID --parallel'
sh 'docker-compose push'
}
}
stage('Deploy') {
@ -60,35 +66,18 @@ pipeline {
branch 'test'
}
}
environment {
CREDS = credentials('docker-registry')
IMAGE = "$REGISTRY/verdnatura/hedera-web"
}
steps {
script {
def packageJson = readJSON file: 'package.json'
env.VERSION = "${packageJson.version}"
env.TAG = "${packageJson.version}-build${env.BUILD_ID}"
env.VERSION = packageJson.version
}
sh 'docker-compose build --build-arg BUILD_ID=$BUILD_ID --parallel'
sh 'docker login --username $CREDS_USR --password $CREDS_PSW $REGISTRY'
sh 'docker push $IMAGE:$TAG'
script {
if (env.BRANCH_NAME == 'master') {
sh 'docker tag $IMAGE:$TAG $IMAGE:latest'
sh 'docker push $IMAGE:latest'
}
}
withKubeConfig([
serverUrl: "$KUBERNETES_API",
credentialsId: 'kubernetes',
namespace: 'salix'
]) {
sh 'kubectl set image deployment/hedera-web-$BRANCH_NAME hedera-web-$BRANCH_NAME=$IMAGE:$TAG'
sh 'kubectl set image deployment/hedera-web-cron-$BRANCH_NAME hedera-web-cron-$BRANCH_NAME=$IMAGE:$TAG'
sh 'kubectl set image deployment/hedera-web-$BRANCH_NAME hedera-web-$BRANCH_NAME=$REGISTRY/hedera-web:$VERSION'
sh 'kubectl set image deployment/hedera-web-cron-$BRANCH_NAME hedera-web-cron-$BRANCH_NAME=$REGISTRY/hedera-web:$VERSION'
}
}
}

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
hedera-web (25.4.4) stable; urgency=low
hedera-web (24.14.8) stable; urgency=low
* Initial Release.

View File

@ -1,9 +1,12 @@
version: '3.7'
services:
main:
image: registry.verdnatura.es/verdnatura/hedera-web:${TAG:?}
image: registry.verdnatura.es/hedera-web:${VERSION:?}
build:
context: .
dockerfile: Dockerfile
args:
- VERSION=${VERSION:?}
cron:
image: registry.verdnatura.es/hedera-web:${VERSION:?}
command: 'cron -f'

View File

@ -18,8 +18,8 @@
LEFT JOIN image im
ON im.collectionFk = 'catalog'
AND im.name = i.image
WHERE i.isActive
AND (i.longName LIKE CONCAT('%', #search, '%') OR i.id = #search)
WHERE i.longName LIKE CONCAT('%', #search, '%')
OR i.id = #search
ORDER BY i.longName LIMIT 50
</db-model>
<custom>

View File

@ -105,8 +105,7 @@
auto-load="false"
result-index="3"
on-status-changed="onItemsChange">
DROP TEMPORARY TABLE IF EXISTS tmp.item;
CREATE TEMPORARY TABLE tmp.item
CREATE OR REPLACE TEMPORARY TABLE tmp.item
(INDEX (itemFk))
ENGINE = MEMORY
SELECT i.id itemFk

View File

@ -67,7 +67,7 @@ export default new Class({
methods = ['balance'];
selectedMethod = 'BALANCE';
} else {
methods = ['card'];
methods = ['card', 'transfer', 'later'];
if (!creditExceededCond) {
methods.push('credit');
@ -98,6 +98,9 @@ export default new Class({
case 'CARD':
id = 'cardMethod';
break;
case 'TRANSFER':
id = 'transferMethod';
break;
default:
id = null;
}

View File

@ -162,6 +162,32 @@
<t>You will be redirected to the payment.</t>
</div>
</div>
<div id="transfer-method">
<label>
<htk-radio radio-group="pay-method" value="TRANSFER"/>
<t>Bank Transfer</t>
</label>
<div>
<t>Make a transfer to one account.</t>
<htk-repeater form-id="iter">
<db-model property="model">
SELECT name, iban FROM mainAccountBank
</db-model>
<custom>
<div class="transfer-account">
<p>{{iter.name}}</p>
<p>{{iter.iban}}</p>
</div>
</custom>
</htk-repeater>
</div>
</div>
<div id="later-method">
<label>
<htk-radio radio-group="pay-method" value="LATER"/>
<t>Pay later</t>
</label>
</div>
</div>
</div>
<div class="button-bar vn-mt-md">

View File

@ -26,7 +26,7 @@
<db-model property="model">
SELECT c.id, c.name reportTitle, c.namePrefix, c.warehouse, c.family,
c.shelf, c.maxAmount, c.showPacking, c.stack, it.categoryFk realm
FROM shelfMultiConfig c
FROM shelfConfig c
JOIN vn.itemType it ON it.id = c.family
</db-model>
</htk-combo>

View File

@ -1,6 +1,6 @@
{
"name": "hedera-web",
"version": "25.4.4",
"version": "24.14.8",
"description": "Verdnatura web page",
"license": "GPL-3.0",
"repository": {

View File

@ -8,7 +8,7 @@ class Clean extends Edi\Method {
$cleanPeriod = $db->getValue(
"SELECT ic.cleanPeriod
FROM imapMultiConfig ic
FROM imapConfig ic
JOIN util.config c ON c.environment = ic.environment");
$deleted = 0;

View File

@ -14,7 +14,7 @@ abstract class Method extends \Vn\Lib\Method {
$imapConf = $db->getRow(
"SELECT ic.host, ic.user, ic.pass, ic.successFolder, ic.errorFolder
FROM imapMultiConfig ic
FROM imapConfig ic
JOIN util.config c ON c.environment = ic.environment");
$this->mailbox = sprintf('{%s/imap/ssl/novalidate-cert}',