JS exporting / importing default and named export together - ecmascript-6

Sorry for the naming for the issue I select. This will most likely show how much confused I am :)
I am working on jhipster generated react project (really good structure, I liked it). What I want to do is to bind account menu item to store to include current user's login name. Current directory structure;
- .menus/account (exporting standart component and a default which is return value of connect HOC)
- .menus/admin
- .menus/user-management
- .menus/index.tsx
index.tsx exports all from the other account, admin, user-management
export * from 'acount'
export * from 'admin' ....
here, is there a possibility to import de default from account file ? or should I explicitly import it with another import statement ?

Related

Best practices for creating and reading app configuration file for angular app

I have an angular application that is gona be installed on many sites (owner requeriment) but, for every site, the configuration must be different (colors, some texts, some logos, backend server, etc). I want to write a configuration file that will be read by the angular app and then apply that configuration, I will put the file in every site and when I make a change to the backend server, any configuration text or other configuration I will only change the configuration file and the angular app will work transparently.
How can I achieve this?
I was thinking in writing a json file and read it from angular. Is this a good practice?
you can use 'environment.ts' for your problem.
but I use 'environment.ts' or 'environment.prod.ts' for the Variables that have different value in product and develop mode.
for values like store/app/crm name, simply you can add 'ts' file like 'myAppConfig.ts' in 'src' folder or 'app' folder.
then declare your variables like this:
export const myAppConfig = {
appName:'samuels online store',
expireDate:'2023/30/12',
customerName:'samuel l jackson'
};
then you can use it,like this:
first import it in your 'ts' file, for example in 'app.component.ts'.
import { myAppConfig } from 'src/myAppConfig';
then use the values of it, like this:
customerName = myAppConfig.clientName;
finally, you can put or change values in 'myAppConfig' from your backend and give a fresh version to your new customers.
have a good time!

MS Access 2013 export query-to-XML not saving file

I'm trying to save several of my queries as XML files in order to re-assemble my database in another location where the only viable transfer method is text or XML files via email (long story).
When I use the built-in export function, Access allows me to select a save location and nest the schema inside of the XML file, and then says that the export was completed successfully. The file is not in the destination folder, and no error was thrown.
This only happens when exporting bound queries. Other Access elements (tables and forms, for example) export just fine.
If I watch the folder during the export process, I see a file appear very briefly, and then dissapear. Has anyone else experienced this?

Using wordpress database details for login purposes

How can I import data from an Excel file into a database for Wordpress?
I would like to use this data for login purposes. e.g. I have an existing member that I'd like my Wordpress site to log in with his/her email, without having to register on the site again.
There is an option to import excel, csv file into the database. Just convert the file according to the table structure and import that file into your database.
Reference

How this react-redux exports connect?

As per this file connect is imported from the connect module using the ES6 syntax. The connect.js does not export connect but createConnect class.
How the connect is exported from the connect.js?
In the index.js the following import statement is used:
import connect from './connect/connect'
That imports the default export from ./connect/connect and assigns it to the name connect (you can name it whatever you want).
In connect.js the default export is on Line 90:
export default createConnect()
This exports the return value of the createConnect(), which is the function connect. Note that the name is not important, but it's common and logical to give it the same name as the module, it technically doesn't even need a name.
For details about default exports and imports see: Exploring ES6 - Default exports

Magento - No products are showing at front end nor admin panel , though csv file imported successfully

I have referred related questions, but the solutions didn't work at my case. Hence, raising a question.
I have imported csv file to import products in our magento store.
Products are imported successfully from admin panel import functionality and also from Data flow - Profile functionality
But, There are no products getting displayed at front end nor at admin panel.
If anyone has faced such issue, please help to solve the issue.
Please note : All products are simple new products.
Thank You.
I've also faced such issue. So you need to flush all Magento cache and reindex data. It can solve your problem. But first of all, you need to check in the database that products are stored or not by given below query.
select count(*) from 'catalog_product_entity';
Or you can check given below URL for more detail:
https://magento.stackexchange.com/questions/53157/products-exist-in-the-database-but-are-not-showing-in-backend-or-frontend
In my case,
I have created one new spreadsheet in open office and have copied all the data of import file.
I saved it again with UTF-8 encoding and .csv format.
And then, i have tried to import it again.
With this process, i was able to import all the products successfully as magento admin panel has considered it as completely new file for import.
Thank You.