components_node/object-categories-listing.js
/**
     * Get categories listing according to search parameters.
     * @param {*} terminal 0 - backend | 1 - frontend
     * @param {*} returnType 1 - array | 3 - Json Object | 10 - html
     * @returns {json}
     */
Get categories listing according to search parameters.
Get categories listing according to search parameters .
async recordsListingGet(terminal = 0, returnType = 1)
    {
        try
        {
            this.resultsCategoriesListing = await FunctionsDB.genericTableGet02(gSystemConfig.configSystemDBTableCategories, 
                                                                                this.arrSearchParameters, 
                                                                                this.configSortOrder, 
                                                                                this.strNRecords, 
                                                                                FunctionsGeneric.tableFieldsQueryBuild01(gSystemConfig.configSystemDBTableCategories, "all", "string"), 
                                                                                1, 
                                                                                this.objSpecialParameters);
        }catch(asyncError){
            if(gSystemConfig.configDebug === true)
            {
                console.log(asyncError)
            }
        }finally{
        }
    }
async recordsListingGet ( terminal = 0 , returnType = 1 ) { try { this . resultsCategoriesListing = await FunctionsDB . genericTableGet02 ( gSystemConfig . configSystemDBTableCategories , this . arrSearchParameters , this . configSortOrder , this . strNRecords , FunctionsGeneric . tableFieldsQueryBuild01 ( gSystemConfig . configSystemDBTableCategories , "all" , "string" ) , 1 , this . objSpecialParameters ) ; } catch ( asyncError ) { if ( gSystemConfig . configDebug === true ) { console . log ( asyncError ) } } finally { } }
Get categories listing according to search parameters.
Get categories listing according to search parameters .
//static async categoriesListingGet(idParent = null, terminal = 0, returnType = 1) //function categoriesListingGet(idParent = null, terminal = 0, returnType = 1) //terminal: 0 - backend | 1 - frontend //returnType: 1 - array | 3 - Json Object | 10 - html /**/ //Debug. //console.log("objSpecialParameters", this.objSpecialParameters); //const note = await apnProvider.send(note, deviceToken) //console.log(note) /*
            this.resultsCategoriesListing = await FunctionsDB.genericTableGet02("categories", 
                                                                            ["id_parent;0;i", "activation;1;i"], 
                                                                            gSystemConfig.configCategoriesSort, 
                                                                            "5", 
                                                                            "id, id_parent, sort_order, category_type, date_creation, title, activation", 
                                                                            1, 
                                                                            {}); //working
            */ //id, id_parent, sort_order, category_type, date_creation, title, image_main, activation //debug //this.resultsCategoriesListing = await FunctionsDB.genericTableGet02("categories",  //FunctionsGeneric.tableFieldsQueryBuild01("categories", "all", "string"),  /*
        return FunctionsDB.genericTableGet02("categories", 
                                            ["id_parent;0;i", "activation;1;i"], 
                                            gSystemConfig.configCategoriesSort, 
                                            "5", 
                                            "id, id_parent, sort_order, category_type, date_creation, title, activation", 
                                            1, 
                                            {}).then(function(async_result){
                                                return new ObjectCategoriesListing(async_result);
                                            });

        */ //return new ObjectCategoriesListing(); //return "teste2"