components_node/object-forms-details.js
/**
     * Get form details according to search parameters.
     * @param {*} terminal 0 - backend | 1 - frontend
     * @param {*} returnType 1 - array | 3 - Json Object | 10 - html
     * @returns {json}
     */
Get form details according to search parameters.
Get form details according to search parameters .
async recordDetailsGet(terminal = 0, returnType = 1)
    {
        try
        {
            this.resultsFormsDetails = await FunctionsDB.genericTableGet02(gSystemConfig.configSystemDBTableForms, 
                                                                            this.arrSearchParameters, 
                                                                            "", 
                                                                            "", 
                                                                            FunctionsGeneric.tableFieldsQueryBuild01(gSystemConfig.configSystemDBTableForms, "all", "string"), 
                                                                            1, 
                                                                            this.objSpecialParameters);
            this.tblFormsID = this.resultsFormsDetails[0].id;
            this.tblFormsIdParent = this.resultsFormsDetails[0].id_parent;
            this.tblFormsSortOrder = this.resultsFormsDetails[0].sort_order;
            this.tblFormsSortOrder_print = FunctionsGeneric.valueMaskRead(this.tblFormsSortOrder, gSystemConfig.configSystemCurrency, 3);
            this.tblFormsDateCreation = this.resultsFormsDetails[0].date_creation; 
            this.tblFormsDateTimezone = this.resultsFormsDetails[0].date_timezone;
            this.tblFormsDateEdit = this.resultsFormsDetails[0].date_edit;
            this.tblFormsIdRegisterUser = this.resultsFormsDetails[0].id_register_user;
            this.tblFormsFormTitle = FunctionsGeneric.contentMaskRead(this.resultsFormsDetails[0].form_title, "db");
            this.tblFormsFormSubject = FunctionsGeneric.contentMaskRead(this.resultsFormsDetails[0].form_subject, "db");
            this.tblFormsRecipientName = FunctionsGeneric.contentMaskRead(this.resultsFormsDetails[0].recipient_name, "db");
            this.tblFormsRecipientEmail = FunctionsGeneric.contentMaskRead(this.resultsFormsDetails[0].recipient_email, "db");
            this.tblFormsRecipientEmailCopy = FunctionsGeneric.contentMaskRead(this.resultsFormsDetails[0].recipient_email_copy, "db");
            this.tblFormsSenderName = FunctionsGeneric.contentMaskRead(this.resultsFormsDetails[0].sender_name, "db");
            this.tblFormsSenderEmail = FunctionsGeneric.contentMaskRead(this.resultsFormsDetails[0].sender_email, "db");
            this.tblFormsSenderConfig = FunctionsGeneric.contentMaskRead(this.resultsFormsDetails[0].sender_config, "db");
            this.tblFormsEmailFormat = this.resultsFormsDetails[0].email_format;
            switch(this.tblFormsFileConfig)
            {
                case 0:
                    this.tblFormsFileConfig_print = FunctionsGeneric.appLabelsGet(gSystemConfig.configLanguageBackend.appLabels, this.labelPrefix + "ItemEmailFormat0");
                    break;
                case 1:
                    this.tblFormsFileConfig_print = FunctionsGeneric.appLabelsGet(gSystemConfig.configLanguageBackend.appLabels, this.labelPrefix + "ItemEmailFormat1");
            }
            this.tblFormsMessageSuccess = FunctionsGeneric.contentMaskRead(this.resultsFormsDetails[0].message_success, "db");
            this.tblFormsMessageSuccess_edit = FunctionsGeneric.contentMaskRead(this.resultsFormsDetails[0].message_success, "editTextBox=" + gSystemConfig.configBackendTextBox); 
            this.tblFormsActivation = this.resultsFormsDetails[0].activation;
            if(this.tblFormsActivation == 0)
            {
                this.tblFormsActivation_print = FunctionsGeneric.appLabelsGet(gSystemConfig.configLanguageBackend.appLabels, this.labelPrefix + "ItemActivation0");
            }
            if(this.tblFormsActivation == 1)
            {
                this.tblFormsActivation_print = FunctionsGeneric.appLabelsGet(gSystemConfig.configLanguageBackend.appLabels, this.labelPrefix + "ItemActivation1");
            }
            this.tblFormsNotes = FunctionsGeneric.contentMaskRead(this.resultsFormsDetails[0].notes, "db");
        }catch(asyncError){
            if(gSystemConfig.configDebug === true)
            {
                console.log(asyncError)
            }
        }finally{
        }
    }
async recordDetailsGet ( terminal = 0 , returnType = 1 ) { try { this . resultsFormsDetails = await FunctionsDB . genericTableGet02 ( gSystemConfig . configSystemDBTableForms , this . arrSearchParameters , "" , "" , FunctionsGeneric . tableFieldsQueryBuild01 ( gSystemConfig . configSystemDBTableForms , "all" , "string" ) , 1 , this . objSpecialParameters ) ; this . tblFormsID = this . resultsFormsDetails [ 0 ] . id ; this . tblFormsIdParent = this . resultsFormsDetails [ 0 ] . id_parent ; this . tblFormsSortOrder = this . resultsFormsDetails [ 0 ] . sort_order ; this . tblFormsSortOrder_print = FunctionsGeneric . valueMaskRead ( this . tblFormsSortOrder , gSystemConfig . configSystemCurrency , 3 ) ; this . tblFormsDateCreation = this . resultsFormsDetails [ 0 ] . date_creation ; this . tblFormsDateTimezone = this . resultsFormsDetails [ 0 ] . date_timezone ; this . tblFormsDateEdit = this . resultsFormsDetails [ 0 ] . date_edit ; this . tblFormsIdRegisterUser = this . resultsFormsDetails [ 0 ] . id_register_user ; this . tblFormsFormTitle = FunctionsGeneric . contentMaskRead ( this . resultsFormsDetails [ 0 ] . form_title , "db" ) ; this . tblFormsFormSubject = FunctionsGeneric . contentMaskRead ( this . resultsFormsDetails [ 0 ] . form_subject , "db" ) ; this . tblFormsRecipientName = FunctionsGeneric . contentMaskRead ( this . resultsFormsDetails [ 0 ] . recipient_name , "db" ) ; this . tblFormsRecipientEmail = FunctionsGeneric . contentMaskRead ( this . resultsFormsDetails [ 0 ] . recipient_email , "db" ) ; this . tblFormsRecipientEmailCopy = FunctionsGeneric . contentMaskRead ( this . resultsFormsDetails [ 0 ] . recipient_email_copy , "db" ) ; this . tblFormsSenderName = FunctionsGeneric . contentMaskRead ( this . resultsFormsDetails [ 0 ] . sender_name , "db" ) ; this . tblFormsSenderEmail = FunctionsGeneric . contentMaskRead ( this . resultsFormsDetails [ 0 ] . sender_email , "db" ) ; this . tblFormsSenderConfig = FunctionsGeneric . contentMaskRead ( this . resultsFormsDetails [ 0 ] . sender_config , "db" ) ; this . tblFormsEmailFormat = this . resultsFormsDetails [ 0 ] . email_format ; switch ( this . tblFormsFileConfig ) { case 0 : this . tblFormsFileConfig_print = FunctionsGeneric . appLabelsGet ( gSystemConfig . configLanguageBackend . appLabels , this . labelPrefix + "ItemEmailFormat0" ) ; break ; case 1 : this . tblFormsFileConfig_print = FunctionsGeneric . appLabelsGet ( gSystemConfig . configLanguageBackend . appLabels , this . labelPrefix + "ItemEmailFormat1" ) ; } this . tblFormsMessageSuccess = FunctionsGeneric . contentMaskRead ( this . resultsFormsDetails [ 0 ] . message_success , "db" ) ; this . tblFormsMessageSuccess_edit = FunctionsGeneric . contentMaskRead ( this . resultsFormsDetails [ 0 ] . message_success , "editTextBox=" + gSystemConfig . configBackendTextBox ) ; this . tblFormsActivation = this . resultsFormsDetails [ 0 ] . activation ; if ( this . tblFormsActivation == 0 ) { this . tblFormsActivation_print = FunctionsGeneric . appLabelsGet ( gSystemConfig . configLanguageBackend . appLabels , this . labelPrefix + "ItemActivation0" ) ; } if ( this . tblFormsActivation == 1 ) { this . tblFormsActivation_print = FunctionsGeneric . appLabelsGet ( gSystemConfig . configLanguageBackend . appLabels , this . labelPrefix + "ItemActivation1" ) ; } this . tblFormsNotes = FunctionsGeneric . contentMaskRead ( this . resultsFormsDetails [ 0 ] . notes , "db" ) ; } catch ( asyncError ) { if ( gSystemConfig . configDebug === true ) { console . log ( asyncError ) } } finally { } }
Get form details according to search parameters.
Get form details according to search parameters .
//terminal: 0 - backend | 1 - frontend //returnType: 1 - array | 3 - Json Object | 10 - html /**/ //Define values. //if(this.resultsCategoryDetails[0]) //{ //DEV: Create logic to chech if record exist. //} //format: yyyy-mm-dd hh:MM:ss or yyyy-mm-dd //TODO: condition detect terminal //Debug. //console.log("this.arrSearchParameters=", this.arrSearchParameters)