#
#	ITSV-GmbH
#	CCDB - Command and Control Database
#
#	FILE:				dquerymfile_LSWEDITOR.txt
#	DESCRIPTION:		DQUERY definitions for CCDB-query LSWEDITOR
#
#	AUTHOR:				Wolfgang Scherer
#	VERSION:			1.0
#	ISSUE:				11.10.2019
#
@querytitle			Bearbeite Regelwerk der Lohnsoftware-Produkte
@querydescription	Zeigt alle bekannten Lohnsoftware-Produkte an und erlaubt die Bearbeitung
@group				SVCLMVBRFAUSWDATALOAD
@querytype			dbselect
@sql				SELECT lsw.LSWID,lsw.LSWHID,lsw.LSWATTRIBS,'' as LOESCHEN
					  FROM SVCLRWLSW lsw 
					  order by lsw.LSWID asc
@post_query
	logger.debug(that.query.dataname+".RESULT: "+aux.objTxt(that.result));
	let lcn = that.result.findColumn("LOESCHEN");
	logger.debug(that.query.dataname+".LOESCHEN_colnumber="+lcn);
	let trow, thtml;
	for (let i=0; i<that.result.getRowCount(); i++) {
		if (lcn) {
			trow = that.result.getRowObject(i,"value");
			thtml = "<a href=\"/dquery?dataname=performObjectAction&objtype=svcllsw&key="+trow.LSWID+"&action=DROP\""+
					" title=\"LSW-Eintrag zu "+trow.LSWID+" l&ouml;schen\"><span class=\"fas fa-trash-alt\"></span></a>";
			logger.debug(that.query.dataname+".ROW="+i+".LCN="+lcn+".LOESCH_HTML="+thtml);
			that.result.setCellValue(i,lcn,"rawhtml",thtml);
		}
	}
@toptext
	<h3>Weitere Aktionen</h3>
	<ul>
		<li><a href="/dquery?dataname=LSWEDITOR">Neu Anzeigen</a></li>
	</ul>
@tableclass			excelFilterTable
@decoration.decorate_colcell.0			$CONTROL:lswideingabe:lsweoptions
@lsweoptions.control_type				edit
@lsweoptions.value						@@celldata@@
@lsweoptions.url						/dquery?dataname=performObjectAction&objtype=svcllsw&key=@@row.LSWID@@&attribute=LSWID&action=SET
@lsweoptions.submitlabel				geänderte ID speichern
@lsweoptions.textinput_fieldname		value
#
@decoration.decorate_colcell.1			$CONTROL:lswhideingabe:lswheoptions
@lswheoptions.control_type				edit
@lswheoptions.value						@@celldata@@
@lswheoptions.url						/dquery?dataname=performObjectAction&objtype=svcllsw&key=@@row.LSWID@@&attribute=LSWHID&action=SET
@lswheoptions.submitlabel				geänderte Hersteller-ID speichern
@lswheoptions.textinput_fieldname		value
#
@decoration.decorate_colcell.2			$CONTROL:lswattribseingabe:lswaeoptions
@lswaeoptions.control_type				edit
@lswaeoptions.url						/dquery?dataname=performObjectAction&objtype=svcllsw&key=@@row.LSWID@@&attribute=LSWATTRIBS&action=SET
@lswaeoptions.submitlabel				geänderte Attribute speichern
@lswaeoptions.textinput_fieldname		value
@title				Lohnsoftware-Produkte
