Index: development/models/rvg/RVG Configurator.trl =================================================================== diff -u --- development/models/rvg/RVG Configurator.trl (revision 0) +++ development/models/rvg/RVG Configurator.trl (revision 3157) @@ -0,0 +1,664 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: development/models/rvg/RVG Configurator.mtd =================================================================== diff -u --- development/models/rvg/RVG Configurator.mtd (revision 0) +++ development/models/rvg/RVG Configurator.mtd (revision 3157) @@ -0,0 +1,4 @@ + + + + \ No newline at end of file Index: development/models/rvg/RVG Configurator.xml =================================================================== diff -u --- development/models/rvg/RVG Configurator.xml (revision 0) +++ development/models/rvg/RVG Configurator.xml (revision 3157) @@ -0,0 +1,1105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + STATE.Initialized + + + Initialisatie + ; + + + true + +CONFIG.Backend = GetArg("backend"); // Voorlopig alleen "axapta", dus AX +CONFIG.ProcessMode = GetArg("processmode"); // Alleen in AX : "Background" of "Interactive" +CONFIG.Token = GetArg("vh_token"); // Alleen in Web : Token van Intracto +CONFIG.Language = GetArg("language"); // Web en AX +CONFIG.Initiator = GetArg("initiator"); // Alleen in AX + +CONFIG.Settings.HeeftAssortimentIP = CBool(GetArg("HeeftAssortimentIP")); // Alleen in AX +CONFIG.Settings.HeeftAssortimentKS = CBool(GetArg("HeeftAssortimentKS")); // Alleen in AX + + Algemene input parameters ophalen + ;config.backend@value;config.processmode@value;config.token@value;config.language@value;config.initiator@value;config.settings.heeftassortimentip@value;config.settings.heeftassortimentks@value; + + + true + +BEHAVIOR.IsEconAx = (CONFIG.Backend == "axapta"); +BEHAVIOR.IsEconWeb = (CONFIG.Backend <> "axapta"); + + Instellen Gedrag Omgeving + ;behavior.iseconax@value;behavior.iseconweb@value; + + + BEHAVIOR.IsEconAx + +local string _Configuration = GetArg("configuration"); + +local string _BEHAVIOR_AccessMode; +local string _BEHAVIOR_OperationMode; +local string _BEHAVIOR_ContextName; +local boolean _IsNieuweIngaveInAx = (DATA.Lijn.GroeperingCode == ""); // Tijdelijk getest via GroeperingCode ingevuld; [TODO] vind een goede manier om de AxNew te bepalen. +local boolean _IsEditEdiFromSalesOrderIn; +local boolean _IsInitiatorAxSalesOrderIn = ((CONFIG.Initiator == "Ax.SalesOrderIn") or (CONFIG.Initiator == "Ax.MsgTableSalesOrderIn")); + +_BEHAVIOR_AccessMode = "Intern"; // Voor AX is AccessMode altijd "Intern". (voorlopig toch) + + +_BEHAVIOR_OperationMode = ""; +if (CONFIG.ProcessMode == "Background") then + _BEHAVIOR_OperationMode = "AxCreate"; +else + if (_IsNieuweIngaveInAx) then + _BEHAVIOR_OperationMode = "New"; + else + _BEHAVIOR_OperationMode = "Edit"; + end if; +end if; + + +_BEHAVIOR_ContextName = "null"; +if (CONFIG.ProcessMode == "Background") then + + if (_IsInitiatorAxSalesOrderIn) then + _BEHAVIOR_ContextName = "AxCreateEdi"; + else + _BEHAVIOR_ContextName = "AxCreateVH4"; +/* * / + _KenmerkenOorsprong = "VH4"; // VH4 of EDI of OCC [TODO] onderscheid nog te bepalen, indien mogelijk. + if _KenmerkenOorsprong == "VH4" then + _BEHAVIOR_ContextName = "AxCreateVH4"; + end if; + if _KenmerkenOorsprong == "OCC" then + _BEHAVIOR_ContextName = "AxCreateOcc"; + end if; +/* */ + end if; + +else + + if (_IsNieuweIngaveInAx) then + _BEHAVIOR_ContextName = "AxNew"; + else + _IsEditEdiFromSalesOrderIn = _IsInitiatorAxSalesOrderIn; + if _IsEditEdiFromSalesOrderIn then + _BEHAVIOR_ContextName = "AxEditEdi"; + else + _BEHAVIOR_ContextName = "AxEdit"; + end if; + end if; + +end if; + + +BEHAVIOR.AccessMode = _BEHAVIOR_AccessMode; +BEHAVIOR.OperationMode = _BEHAVIOR_OperationMode; +BEHAVIOR.ContextName = _BEHAVIOR_ContextName; +BEHAVIOR.IsInteractive = (CONFIG.ProcessMode <> "Background"); + +CONFIG.InputMode = BEHAVIOR.OperationMode; +CONFIG.Settings.OperationMode = BEHAVIOR.AccessMode; + + Instellen Gedrag Ax (AccessMode, OperationMode, ContextName) + ;behavior.accessmode@value;behavior.operationmode@value;behavior.contextname@value;behavior.isinteractive@value;config.inputmode@value;config.settings.operationmode@value; + + + BEHAVIOR.IsEconWeb + +local string _AccessMode = GetArg("operationmode"); +local string _Configuration = GetArg("configuration"); + +local string _BEHAVIOR_AccessMode; +local string _BEHAVIOR_OperationMode; +local string _BEHAVIOR_ContextName; + + +_BEHAVIOR_AccessMode = "Extern"; +if (LCase(_AccessMode) == "intern") then + _BEHAVIOR_AccessMode = "Intern"; +end if; + + +_BEHAVIOR_OperationMode = ""; +if (CONFIG.TOKEN == "128eababb1a1596e3c130b0e0fd5be820334a01a16bf777d1c5439fcfa861e16") then + _BEHAVIOR_OperationMode = "CreateConfig"; + _BEHAVIOR_AccessMode = "Intern"; // CreateConfig volgt de beperkingen van de InterneVerwerking (o.a. voor EDI-bestellingen met specifieke verpakking of verlaagde rug of stalen rug) +else + if (_Configuration <> "") then + _BEHAVIOR_OperationMode = "Edit"; + else + _BEHAVIOR_OperationMode = "New"; + end if; +end if; + + +_BEHAVIOR_ContextName = "null"; +if (_BEHAVIOR_OperationMode == "CreateConfig") then + _BEHAVIOR_ContextName = "WebCreateConfig"; +else + if (_BEHAVIOR_OperationMode == "Edit") then + _BEHAVIOR_ContextName = "WebShopEdit"; + else + _BEHAVIOR_ContextName = "WebShopNew"; + end if; +end if; + + +BEHAVIOR.AccessMode = _BEHAVIOR_AccessMode; +BEHAVIOR.OperationMode = _BEHAVIOR_OperationMode; +BEHAVIOR.ContextName = _BEHAVIOR_ContextName; +BEHAVIOR.IsInteractive = (_BEHAVIOR_OperationMode <> "CreateConfig"); + +CONFIG.InputMode = BEHAVIOR.OperationMode; +CONFIG.Settings.OperationMode = BEHAVIOR.AccessMode; + + Instellen Gedrag Web (AccessMode, OperationMode, ContextName) + ;behavior.accessmode@value;behavior.operationmode@value;behavior.contextname@value;behavior.isinteractive@value;config.inputmode@value;config.settings.operationmode@value; + + + BEHAVIOR.IsEconAx + + + Initialisatie AX + ; + + + true + +CONFIG.Settings.KlantId = GetArg("KlantId"); +CONFIG.Settings.PersonalityId = GetArg("PersonalityId"); + +CONFIG.Settings.AXUserId = GetArg("axuserid"); // Alleen in AX +CONFIG.Settings.IsMaatwerkViewerToegelaten = CBool(GetArg("IsMaatwerkViewerToegelaten")); // Alleen in AX + +SalesTableAx = GetArg("SalesTableAx"); + + Settings ophalen uit argumenten + ;config.settings.klantid@value;config.settings.personalityid@value;config.settings.axuserid@value;config.settings.ismaatwerkviewertoegelaten@value;salestableax@value; + + + not(BEHAVIOR.IsInteractive) // = AxCreate + +/* +Data.Kenmerken.CorpusBreedte = CDbl(Replace(GetArg("data;kenmerken;corpusbreedte");".";",")); +Data.Kenmerken.CorpusWanddikte = CDbl(Replace(GetArg("data;kenmerken;corpuswanddikte");".";",")); + +Data.Kenmerken.Familie = GetArg("data;kenmerken;familie"); +Data.Kenmerken.HeeftOpvullijstLinks = CBool(GetArg("data;kenmerken;heeftopvullijstlinks")); +Data.Kenmerken.HeeftOpvullijstRechts = CBool(GetArg("data;kenmerken;heeftopvullijstrechts")); + +Data.Kenmerken.IsBinnenbreedte = CBool(GetArg("data;kenmerken;isbinnenbreedte")); + +Data.Kenmerken.LadeDiepte = GetArg("data;kenmerken;ladediepte"); + +Data.Kenmerken.Variant = GetArg("data;kenmerken;variant"); +Data.Kenmerken.VerpakkingType = GetArg("data;kenmerken;verpakkingtype"); + + +Data.Lijn.Aantal = CDbl(GetArg("data;lijn;aantal")); +Data.Lijn.Referentie = GetArg("data;lijn;referentie"); + +*/ + Kenmerken ophalen uit argumenten (Background) + ; + + + BEHAVIOR.IsInteractive + + + Kenmerken ophalen uit argumenten (Interactive) + ; + + + + + BEHAVIOR.IsEconWeb + +if (CONFIG.Token == "") then + // todo: configurator afsluiten indien geen token opgegeven + local boolean _Result = true; //Exit(true;false); +end if; + + Initialisatie web + ; + + + true + +STATE.KlantVoorkeurenSaved = false; + + Initialisatie states + ;state.klantvoorkeurensaved@value; + + + true + +local string _DebugMode = GetSetting("ui.debugmode"); + +if (LCase(_DebugMode) == "true") then + Config.Settings.DebugMode = true; +end if; + +$InspectorPane@visible = Config.Settings.DebugMode; + + Ophalen DebugMode + ;config.settings.debugmode@value; + + + BEHAVIOR.IsEconWeb + +/*local string _Connection = GetSetting("data.connectionstring"); +local string _Query = "SELECT Id, Name FROM ti.MDLanguage WHERE Active = '1'"; + +CONFIG.Database.Languages@options = {}; +CONFIG.Database.Languages@options = ExecuteOptionsQuery("CONFIG.Database.Languages"; true; _Connection; _Query); + +STATE.LanguagesLoaded = true; +*/ + + Actieve talen ophalen (Web) + ; + + + BEHAVIOR.IsInteractive + +// HELP.HelpUrl = "mat/" + CONFIG.Language + ".xml"; + + Tooltips + ; + + + true + +/* +local boolean _Result = CopyOptionsToArray("UI.Kenmerken.NietMeeleverenOptions"; "UI.Kenmerken.NietMeeleveren"); + +index i of UI.Kenmerken.NietMeeleveren + UI.Kenmerken.NietMeeleveren(i)@label = DATA.Kenmerken.NietMeeleveren@label; + UI.Kenmerken.NietMeeleveren(i)@repeat = false; + UI.Kenmerken.NietMeeleveren(i).IsSelected@style.controlclass = "vh-slidercheckbox"; + UI.Kenmerken.NietMeeleveren(i).Text@style.controlclass = "vh-checkboxlist-item"; + UI.Kenmerken.NietMeeleveren(i).Text = GetLocalizedLabel(UI.Kenmerken.NietMeeleveren(i).Text); +end index; +*/ + + NietMeeleveren + ; + + + true + +local boolean _Result; + +local string _SaveAs = GetArg("saveas"); +local string _Configuration = GetArg("configuration"); +local string _Version = GetArg("version"); + +if (_SaveAs == "" and _Configuration <> "") then + _SaveAs = ElementId(_Configuration; _Version); +end if; + +if (CONFIG.ConfigurationName == "") then + if (_SaveAs <> "") then + CONFIG.ConfigurationName = _SaveAs; + //else + // NewId()? + // CONFIG.ConfigurationName = NewId() + ",1"; + end if; +end if; + +if ((_SaveAs == "") and (CONFIG.ConfigurationName <> "")) then + _Result = SetArg("saveas"; ElementName(CONFIG.ConfigurationName)); + _SaveAs = CONFIG.ConfigurationName; +end if; + +if ((CONFIG.ConfigurationName <> "") and (_SaveAs <> "") and (CONFIG.ConfigurationName <> _SaveAs)) then + CONFIG.ConfigurationName = _SaveAs; +end if; + + ConfigurationId bepalen + ;config.configurationname@value; + + + (CONFIG.Token <> "") and (BEHAVIOR.IsEconWeb) + +//local string _Setting = GetSetting("data.vanhoecke.connectionstring.vhisie4.settings"); +//local string _Json = _Setting + CONFIG.Token; + +//local boolean _Result; + +// if not(BEHAVIOR.OperationMode == "CreateConfig") then + // Setings ophalen op basis van de vh_token + + //_Result = LoadFromJSONService("CONFIG.Settings.KeyValue"; _Json; false); + + /*if not(_Result) then + ReturnValue = "{\"status\":\"cancel\"}"; + _Result = Exit(true;false); + end if;*/ +//end if; + +/* +index i of CONFIG.Settings.KeyValue + _Result = SetValue("CONFIG.Settings." + CONFIG.Settings.KeyValue(i).Name; CONFIG.Settings.KeyValue(i).Value); +end index; +*/ + + Config settings ophalen (Web) + ; + + + (BEHAVIOR.IsEconWeb) and (CONFIG.Token <> "") + +local collection _ExportPersonalities = {"3";"10";"11";"13";"14";"16";"17";"18";"19";"20";"32";"33";"34";"35";"36"}; + + Config settings hardcoded (settings voor de MP) + ; + + + true + +Config.ReferentieConfiguratie = GetArg("referentieconfiguratie"); + + ReferentieConfiguratie ophalen + ;config.referentieconfiguratie@value; + + + (BEHAVIOR.IsEconWeb) and (BEHAVIOR.IsInteractive) + + +CONFIG.KlantVoorkeurenConfigurationName = DATA.Kenmerken.Variant + "_" + Config.Settings.PersonalityId + "_" + CONFIG.Settings.KlantId; + + KlantVoorkeuren naam bepalen + ;config.klantvoorkeurenconfigurationname@value; + + + true + UI.Buttons.Top.SaveAndExitButton@default = "task:eCon.UI.Tasks.SetValueTask:'STATE.SavedAndExit','true'"; +UI.Buttons.Top.SaveAndContinueButton@default = "task:eCon.UI.Tasks.SetValueTask:'STATE.SavedAndContinue','true'"; +UI.Buttons.Top.CancelButton@default = "task:eCon.UI.Tasks.SetValueTask:'STATE.Cancelled','true'"; +UI.Buttons.Top.PreferencesButton@default = "task:eCon.UI.Tasks.SetValueTask:'STATE.KlantVoorkeurenSaved','true'"; + +UI.MWViewer.InlineButtons.StartMaatwerkViewerButton@default = "task:eCon.UI.Tasks.SetValueTask:'STATE.StartMaatwerkViewer','true'"; +UI.Buttons.Top.ProcessButton@default = "task:eCon.UI.Tasks.SetValueTask:'STATE.ProcessedAndExit','true'|task:eCon.UI.Tasks.ProcessAndExitTask"; + +UI.Buttons.Bottom.SaveAndExitButton@default = UI.Buttons.Top.SaveAndExitButton@default; +UI.Buttons.Bottom.SaveAndContinueButton@default = UI.Buttons.Top.SaveAndContinueButton@default; + + +local boolean _IsEditMode = (CONFIG.InputMode == "Edit"); +local string _LabelSave = UI.Buttons.Top.SaveAndExitButton@label; + +if (_IsEditMode) then + _LabelSave = TRL.SaveChangesButton@label; +end if; + +UI.Buttons.Top.SaveAndExitButton@label = _LabelSave; +UI.Buttons.Bottom.SaveAndExitButton@label = _LabelSave; + +UI.Buttons.Top.SaveAndExitButton@visible = BEHAVIOR.IsEconWeb; +UI.Buttons.Top.SaveAndContinueButton@visible = not(_IsEditMode) and BEHAVIOR.IsEconWeb; +UI.Buttons.Top.PreferencesButton@visible = BEHAVIOR.IsEconWeb; +UI.Buttons.Top.ProcessButton@visible = BEHAVIOR.IsEconAx; + +UI.Buttons.Bottom.SaveAndExitButton@visible = BEHAVIOR.IsEconWeb; +UI.Buttons.Bottom.SaveAndContinueButton@visible = not(_IsEditMode) and BEHAVIOR.IsEconWeb; + +UI.MWViewer.InlineButtons.StartMaatwerkViewerButton@label = "Maatwerk Viewer"; + + Buttons + ;ui.buttons.top.saveandexitbutton@default;ui.buttons.top.saveandcontinuebutton@default;ui.buttons.top.cancelbutton@default;ui.buttons.top.preferencesbutton@default;ui.mwviewer.inlinebuttons.startmaatwerkviewerbutton@default;ui.buttons.top.processbutton@default;ui.buttons.bottom.saveandexitbutton@default;ui.buttons.bottom.saveandcontinuebutton@default;ui.buttons.top.saveandexitbutton@visible;ui.buttons.top.saveandcontinuebutton@visible;ui.buttons.top.preferencesbutton@visible;ui.buttons.top.processbutton@visible;ui.buttons.bottom.saveandexitbutton@visible;ui.buttons.bottom.saveandcontinuebutton@visible; + + + true + /* +local string SelectedOption = ""; + +SelectedOption = UI.Kenmerken.Materiaal; +for i = 1 to len(UI.Kenmerken.Materiaal@options) + UI.Kenmerken.Materiaal = UI.Kenmerken.Materiaal@option(i)@id; + UI.Kenmerken.Materiaal.Text = DATA.Kenmerken.Materiaal@option(UI.Kenmerken.Materiaal.Value)@label; +end for; +UI.Kenmerken.Materiaal = SelectedOption; + +SelectedOption = UI.Kenmerken.MatAntislipFiberKleur; +for i = 1 to len(UI.Kenmerken.MatAntislipFiberKleur@options) + UI.Kenmerken.MatAntislipFiberKleur = UI.Kenmerken.MatAntislipFiberKleur@option(i)@id; + UI.Kenmerken.MatAntislipFiberKleur.Text = GetLocalizedLabel("MatAntislipFiberKleur_" + UI.Kenmerken.MatAntislipFiberKleur); +end for; +UI.Kenmerken.MatAntislipFiberKleur = SelectedOption; + +SelectedOption = UI.Kenmerken.MatAntislipFlockKleur; +for i = 1 to len(UI.Kenmerken.MatAntislipFlockKleur@options) + UI.Kenmerken.MatAntislipFlockKleur = UI.Kenmerken.MatAntislipFlockKleur@option(i)@id; + UI.Kenmerken.MatAntislipFlockKleur.Text = GetLocalizedLabel("MatAntislipFlockKleur_" + UI.Kenmerken.MatAntislipFlockKleur); +end for; +UI.Kenmerken.MatAntislipFlockKleur = SelectedOption; + +SelectedOption = UI.Kenmerken.MatVinylFiberglassKleur; +for i = 1 to len(UI.Kenmerken.MatVinylFiberglassKleur@options) + UI.Kenmerken.MatVinylFiberglassKleur = UI.Kenmerken.MatVinylFiberglassKleur@option(i)@id; + UI.Kenmerken.MatVinylFiberglassKleur.Text = GetLocalizedLabel("MatVinylFiberglassKleur_" + UI.Kenmerken.MatVinylFiberglassKleur); +end for; +UI.Kenmerken.MatVinylFiberglassKleur = SelectedOption;*/ + + Vertalingen UI image labels + ; + + + true + +local boolean _IsIntern = (CONFIG.Settings.OperationMode == "Intern"); + + Beperkingen Intern/Extern + ; + + + true + +if not(BEHAVIOR.IsInteractive) then + if (BEHAVIOR.IsEconWeb and (CONFIG.InputMode == "CreateConfig")) then + STATE.DataKenmerkenInvullenVia = ""; + end if; + + if (BEHAVIOR.OperationMode == "AxCreate") then + STATE.DataKenmerkenInvullenVia = "GetArgs"; + end if; +else + if (CONFIG.InputMode == "New") then + STATE.DataKenmerkenInvullenVia = "InitieleDefaults"; + end if; + + if (CONFIG.InputMode == "Edit") then + STATE.DataKenmerkenInvullenVia = "UI"; + end if; +end if; + Start StatenFlow DataKenmerkenInvullenVia + ; + + + true + +STATE.Initialized = false; + + Einde initialisatie + ;state.initialized@value; + + + + + + + + + + + + + + \ No newline at end of file