Fix webgui inventory

This commit is contained in:
2026-08-20 08:15:01 +02:00
parent 80ad142d52
commit a550d98720
7 changed files with 36 additions and 8 deletions
+4
View File
@@ -18,6 +18,10 @@ To set your own passwords via console there is a helper script
ymspass.py ymspass.py
Use it to get an SQL-statement for changing passwords. Use it to get an SQL-statement for changing passwords.
For users using idesktop there is a prepared link file "yms.lnk".
Copy it to your private .idesktop directory to create a
desktop link.
For further information go to https://computerclub.hoogi.de/yms For further information go to https://computerclub.hoogi.de/yms
(currently german only) (currently german only)
+1 -1
View File
@@ -369,7 +369,7 @@ CREATE TABLE maintenance (
interval_hours smallint(6) DEFAULT NULL, interval_hours smallint(6) DEFAULT NULL,
last_hours int(10) DEFAULT NULL, last_hours int(10) DEFAULT NULL,
remarks varchar(150) DEFAULT NULL, remarks varchar(150) DEFAULT NULL,
maintstate enum('new','planned','ongoing','done') NOT NULL DEFAULT 'new', maintstate enum('new','plan','ongoing','done') NOT NULL DEFAULT 'new',
PRIMARY KEY (maintid), PRIMARY KEY (maintid),
FOREIGN KEY fk_maintenance_vessel (vid) FOREIGN KEY fk_maintenance_vessel (vid)
REFERENCES vessel(vid), REFERENCES vessel(vid),
+5 -1
View File
@@ -15,9 +15,10 @@ SOURCEDIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
if [ "$1" = "uninstall" ]; then if [ "$1" = "uninstall" ]; then
echo "Uninstalling YMS..." echo "Uninstalling YMS..."
rm -f "${BINDIR}/yms"
rm -rf "${LIBDIR}" rm -rf "${LIBDIR}"
rm -rf "${SHAREDIR}" rm -rf "${SHAREDIR}"
rm -f "${BINDIR}/yms" rm -f "${SHAREDIR}/yms.lnk"
rm -f "${DESKTOPDIR}/yms.desktop" rm -f "${DESKTOPDIR}/yms.desktop"
rm -rf "${DOCDIR}" rm -rf "${DOCDIR}"
rm -f "${MANDIR}/yms.1" rm -f "${MANDIR}/yms.1"
@@ -65,6 +66,9 @@ install -m 0644 \
cp -a \ cp -a \
"${SOURCEDIR}/shapes/." \ "${SOURCEDIR}/shapes/." \
"${SHAREDIR}/shapes/" "${SHAREDIR}/shapes/"
install -m 0644 \
"${SOURCEDIR}/yms.lnk" \
"${SHAREDIR}/yms.lnk"
# Documentation # Documentation
echo "Installing documentation..." echo "Installing documentation..."
+1 -1
View File
@@ -557,7 +557,7 @@ function get_enum($enum) {
'paused' => _('Paused'), 'paused' => _('Paused'),
'pending' => _('Pending'), 'pending' => _('Pending'),
'picture' => _('Picture'), 'picture' => _('Picture'),
'planned' => _('Planned'), 'plan' => _('Planned'),
'precise' => _('Precise'), 'precise' => _('Precise'),
'project' => _('Project'), 'project' => _('Project'),
'removed' => _('Removed'), 'removed' => _('Removed'),
+15 -4
View File
@@ -48,8 +48,13 @@ switch ($submit = form_get_action()) {
$p[':invname'] = gpc_get_string($_POST, 'invname'); $p[':invname'] = gpc_get_string($_POST, 'invname');
$p[':number'] = gpc_get_int($_POST, 'number'); $p[':number'] = gpc_get_int($_POST, 'number');
$p[':conttype'] = gpc_get_string($_POST, 'conttype'); $p[':conttype'] = gpc_get_string($_POST, 'conttype');
$p[':sid'] = gpc_get_uint($_POST, 'sid', 0); if ($p[':conttype'] == 'storage') {
$p[':boxid'] = gpc_get_uint($_POST, 'boxid', 0); $p[':sid'] = gpc_get_uint($_POST, 'sid', 0);
$p[':boxid'] = NULL;
} else {
$p[':boxid'] = gpc_get_uint($_POST, 'boxid', 0);
$p[':sid'] = NULL;
}
if ($p[':sid'] == NULL && $p[':boxid'] == NULL) { if ($p[':sid'] == NULL && $p[':boxid'] == NULL) {
$p[':conttype'] = 'storage'; $p[':conttype'] = 'storage';
$sid = db_get_default_storage($user->vid); $sid = db_get_default_storage($user->vid);
@@ -69,8 +74,13 @@ switch ($submit = form_get_action()) {
$p[':invname'] = gpc_get_string($_POST, 'invname'); $p[':invname'] = gpc_get_string($_POST, 'invname');
$p[':number'] = gpc_get_int($_POST, 'number'); $p[':number'] = gpc_get_int($_POST, 'number');
$p[':conttype'] = gpc_get_string($_POST, 'conttype'); $p[':conttype'] = gpc_get_string($_POST, 'conttype');
$p[':sid'] = gpc_get_uint($_POST, 'sid', 0); if ($p[':conttype'] == 'storage') {
$p[':boxid'] = gpc_get_uint($_POST, 'boxid', 0); $p[':sid'] = gpc_get_uint($_POST, 'sid', NULL);
$p[':boxid'] = NULL;
} else {
$p[':boxid'] = gpc_get_uint($_POST, 'boxid', NULL);
$p[':sid'] = NULL;
}
if ($p[':sid'] == NULL && $p[':boxid'] == NULL) { if ($p[':sid'] == NULL && $p[':boxid'] == NULL) {
$p[':conttype'] = 'storage'; $p[':conttype'] = 'storage';
$sid = db_get_default_storage($user->vid); $sid = db_get_default_storage($user->vid);
@@ -86,6 +96,7 @@ switch ($submit = form_get_action()) {
$p[':invcond'] = gpc_get_string($_POST, 'invcond'); $p[':invcond'] = gpc_get_string($_POST, 'invcond');
$p[':remarks'] = gpc_get_string($_POST, 'remarks', 150); $p[':remarks'] = gpc_get_string($_POST, 'remarks', 150);
$p[':eid'] = gpc_get_int($_POST, 'eid'); $p[':eid'] = gpc_get_int($_POST, 'eid');
if ($p[':eid'] <= 0) $p[':eid'] = NULL;
db_exec_update('inventory', $p, 'invid'); db_exec_update('inventory', $p, 'invid');
$action = ACT_VIEW; $action = ACT_VIEW;
break; break;
+1 -1
View File
@@ -13,7 +13,7 @@ $pagetitle = _('Maintenance');
$id = gpc_get_int($_REQUEST, 'id', 0); $id = gpc_get_int($_REQUEST, 'id', 0);
$opt_equipment = db_get_opt_equip($user->vid, [0 => _('*** unassigned ***')]); $opt_equipment = db_get_opt_equip($user->vid);
$opt_state = db_load_enum('maintenance', 'maintstate', true, true); $opt_state = db_load_enum('maintenance', 'maintstate', true, true);
// ========== ACTIONS START =================================================== // ========== ACTIONS START ===================================================
+9
View File
@@ -0,0 +1,9 @@
table Icon
Caption: Yacht Management
Command: /usr/local/bin/yms
Icon: /usr/local/share/icons/hicolor/48x48/apps/yms.png
Width: 48
Height: 48
X: 168
Y: 16
end