Fix webgui inventory
This commit is contained in:
@@ -18,6 +18,10 @@ To set your own passwords via console there is a helper script
|
||||
ymspass.py
|
||||
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
|
||||
(currently german only)
|
||||
|
||||
|
||||
+1
-1
@@ -369,7 +369,7 @@ CREATE TABLE maintenance (
|
||||
interval_hours smallint(6) DEFAULT NULL,
|
||||
last_hours int(10) 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),
|
||||
FOREIGN KEY fk_maintenance_vessel (vid)
|
||||
REFERENCES vessel(vid),
|
||||
|
||||
+5
-1
@@ -15,9 +15,10 @@ SOURCEDIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
||||
if [ "$1" = "uninstall" ]; then
|
||||
echo "Uninstalling YMS..."
|
||||
|
||||
rm -f "${BINDIR}/yms"
|
||||
rm -rf "${LIBDIR}"
|
||||
rm -rf "${SHAREDIR}"
|
||||
rm -f "${BINDIR}/yms"
|
||||
rm -f "${SHAREDIR}/yms.lnk"
|
||||
rm -f "${DESKTOPDIR}/yms.desktop"
|
||||
rm -rf "${DOCDIR}"
|
||||
rm -f "${MANDIR}/yms.1"
|
||||
@@ -65,6 +66,9 @@ install -m 0644 \
|
||||
cp -a \
|
||||
"${SOURCEDIR}/shapes/." \
|
||||
"${SHAREDIR}/shapes/"
|
||||
install -m 0644 \
|
||||
"${SOURCEDIR}/yms.lnk" \
|
||||
"${SHAREDIR}/yms.lnk"
|
||||
|
||||
# Documentation
|
||||
echo "Installing documentation..."
|
||||
|
||||
+1
-1
@@ -557,7 +557,7 @@ function get_enum($enum) {
|
||||
'paused' => _('Paused'),
|
||||
'pending' => _('Pending'),
|
||||
'picture' => _('Picture'),
|
||||
'planned' => _('Planned'),
|
||||
'plan' => _('Planned'),
|
||||
'precise' => _('Precise'),
|
||||
'project' => _('Project'),
|
||||
'removed' => _('Removed'),
|
||||
|
||||
+13
-2
@@ -48,8 +48,13 @@ switch ($submit = form_get_action()) {
|
||||
$p[':invname'] = gpc_get_string($_POST, 'invname');
|
||||
$p[':number'] = gpc_get_int($_POST, 'number');
|
||||
$p[':conttype'] = gpc_get_string($_POST, 'conttype');
|
||||
if ($p[':conttype'] == 'storage') {
|
||||
$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) {
|
||||
$p[':conttype'] = 'storage';
|
||||
$sid = db_get_default_storage($user->vid);
|
||||
@@ -69,8 +74,13 @@ switch ($submit = form_get_action()) {
|
||||
$p[':invname'] = gpc_get_string($_POST, 'invname');
|
||||
$p[':number'] = gpc_get_int($_POST, 'number');
|
||||
$p[':conttype'] = gpc_get_string($_POST, 'conttype');
|
||||
$p[':sid'] = gpc_get_uint($_POST, 'sid', 0);
|
||||
$p[':boxid'] = gpc_get_uint($_POST, 'boxid', 0);
|
||||
if ($p[':conttype'] == 'storage') {
|
||||
$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) {
|
||||
$p[':conttype'] = 'storage';
|
||||
$sid = db_get_default_storage($user->vid);
|
||||
@@ -86,6 +96,7 @@ switch ($submit = form_get_action()) {
|
||||
$p[':invcond'] = gpc_get_string($_POST, 'invcond');
|
||||
$p[':remarks'] = gpc_get_string($_POST, 'remarks', 150);
|
||||
$p[':eid'] = gpc_get_int($_POST, 'eid');
|
||||
if ($p[':eid'] <= 0) $p[':eid'] = NULL;
|
||||
db_exec_update('inventory', $p, 'invid');
|
||||
$action = ACT_VIEW;
|
||||
break;
|
||||
|
||||
@@ -13,7 +13,7 @@ $pagetitle = _('Maintenance');
|
||||
|
||||
$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);
|
||||
|
||||
// ========== ACTIONS START ===================================================
|
||||
|
||||
Reference in New Issue
Block a user