How to create step forms in ionic 4 and angular 8? - ionic4

I have created five pages to hold five different forms. How can I create save and next type of feature for each forms until final one?
I'm using reactive form module for each forms.
Following is the file structure in case if question isn't clear.
app
|-- form(folder)
|----- step 1(folder)
|---------step1-routing.module.ts
|---------step1.module.ts
|---------step1.page.html
|---------step1.page.scss
|---------step1.page.ts
|----- step 2(folder)
|----- step 3(folder)
|----- step 4(folder)
|----- step 5(folder)
Any suggestion and hint will be appreciated.

Related

How to set paths for multi-page-applications when using vue?

I want to build a web-application using Vue which should have a website structure like this:
index-page
|--page1
|--page2
|--page3
...
That is, I have 1 index-page that will be my home-page which contains the link for all other pages.
But, each page is from some category and a sub-category, so I want that the address for each page should be like this:
localhost:8080/category/sub-category/page
example: localhost:8080/algorithms/sorting/bubble
In my project structure, these categories and sub-categories are placed like this:
my-project/src/category/sub-category/page/files
my-project
|--src
|--App.vue // for index page
|--main.js // for index page
|--algorithms
| |--sorting
| | |--bubble
| | | |--bubble.html
| | | |--App.vue
| | | |--main.js
| | |
| | |--selection
| | | |--selection.html
| | | |--App.vue
| | | |--main.js
| | ...
| ...
...
These categories and sub-categories are placed on index page like this:
<h2>category</h2>
<h3>sub-category</h3>
<ul>
<li>page</li>
...
</ul>
...
...
I want that any address of the form
localhost:8080/category
or
localhost:8080/category/sub-category
should lead to index page and addresses of the form
localhost:8080/category/sub-category/page
should load the corresponding page.
So, how should I configure my vue.config.js file?
Can I do it only once for all pages like given here for my project structure?
I only want that my website is working correctly and is developed in the correct way (without using any hacks).
Every page is independent of each other. But each page on its own should be a SPA.
Also, I want to know how these all things are related to each other in vue.config.js:
the string that we put in href of
the path displayed in browser window
the path from where the page is loaded from the project
I am asking above question because I have doubt whether the path user sees is same as the path in the project?
Well, since I am using no directory named pages, does that make a difference?
Well. Personally I was building a Vue app with laravel and what I used and mostly a lot of people use is a Vue router.
https://router.vuejs.org/
You can define the links there and it stops the page from reloading and supports transitions for pages. And uses a specific Vue Router href. Hope this somewhat answers your question.
nuxt.js was what I needed. The pages directory handles it all.

prestashop 1.4 to 1.6 image missing issue

I've upgraded a Prestashop site manually from 1.4 to 1.6.I can get the category images to appear but not the product images.
My product path on the old 1.4 site takes the following route
.../img/p/11-638-home.jpg
but version 1.6 is asking for
Original image is missing or empty (/.../.../../img/p/1/1.jpg) for product ID 11,when click regenerate thumbnails image
How do I change/recreate the url structure to match? I don't think I can create these directories manually, there's too many products.
Thanks in advance.
First Backup Your Entire code.Then follow step by step
Step 1 : When I try moving the images I get the following error.
Error: Your server configuration is not compatible with the new image system. No images were moved.
Step 2 : First disable friendly URL in SEO(backend) then Go to ../controllers/admin/AdminImagesController.php file and line no around 68
change
// No need to display the old image system migration tool except if product images are in _PS_PROD_IMG_DIR_
$this->display_move = false;
to
$this->display_move = true;
Step 3 : Click Move images.
Step 4 : Finally click REGENERATE THUMBNAILS(If you need Erase previous images -- NO)
It will take several minutes.After finishing,refresh your site you got images in the sites.
Thanks

Prestashop 1.6 custom module how to add custom input and table in Configuration at Back Office

I am trying to create a custom footer module for my site, It is my first time to create a module in prestashop 1.6 and I read about this article
http://doc.prestashop.com/display/PS16/Adding+a+configuration+page
my problem is i cannot fully understand if I need to create a custom table for my module or not
Configuration::updateValue('FOOTERCUSTOM_NAME', $footercustom);
as you can see in this code, the Configuration table is already created and Configuration::updateValue is a default prestashop code
if I wanted to create a input 1 , input 2 and input 3 at our configuration page in module backoffice and it automatically output the data in the database at my hookfooter.
what is the proper way of doing this?
Note that I already succeeded in creating a basic module, my main problem in how to insert data on my database using the configuration in my module
You don't have to a create a custom table. With the Configuration::updateValue method you can store/update values in the ps_configuration table and you can retrieve these values with the Configuration::get and Configuration::getMultiple methods. Values can be removed with the Configuration::deleteByName method.
Example:
Configuration::updateValue('FOOTERCUSTOM_INPUT_1', $input1Stored);
$input1Retrieved = Configuration::get('FOOTERCUSTOM_INPUT_1');
You can refer to this guide as well, still valid
http://doc.prestashop.com/display/PS15/Creating+a+PrestaShop+module#CreatingaPrestaShopmodule-ThegetContent()method

cucumber (LoadError) for my model

I'm sure this is basic as I'm a new Rails user and want to do Cucumber right. I spent the weekend reading the Pragmatic book and have a small project I want to create and use it. I intentionally set up my first feature as broadly as possible so that it wouldn't be brittle depending too much on how it works on the rails side. I created a new rails app using DanielKehoe's starter on github. I think I got the user figured out. But when I attempt to use Cucumber to creating my first table of Reference Units which would be a table of constants, I expected that cucumber would drive me to create a Reference Units model but I spent all morning trying to get it to do so using the book, Railscasts and stackoverflow to push me to where I'm at now. I went ahead and generated a model for Reference Units, controller with a new action and an empty view. But it now cannot figure out that I have Reference Unit model with a (LoadError). Odd because it's there in the app.
Here's my current feature:
Feature: I want to have Reference Units that I can refer to so they can be used elsewhere. That way
they can be updated in one place. I want to create and edit these Units.
Background:
Given I am logged in as the following user:
| name | "Testy McUserton" |
| password | "please" |
| email | "testy#userton.com" |
Scenario: Adding Reference Units
When I go to the new Reference Units page
And I fill in the following:
| commodity | "corn" |
| language | "en" |
| wholesale unit | "xton" |
| retail unit | "xliter" |
| receipt unit | "dollar" |
Then it should create a new Reference Unit
here is my step definition:
Given /^I am logged in as the following user:$/ do |table|
sign_up valid_user
end
When /^I go to the new Reference Units page$/ do
visit new_reference_unit_path
end
When /^I fill in the following:$/ do |table|
#reference_unit = Reference_unit.create!(table.rows_hash)
end
Then /^it should create a new Reference Unit$/ do
pending # express the regexp above with the code you wish you had
end
new_reference_unit_path is in my feature/support/paths.rb as:
when /the new Reference Units page/
'/reference_units/new'
Running this in 3.1.3 the following is in red:
Scenario: Adding Reference Units # features/user_can_create_units.feature:10
When I go to the new Reference Units page # features/step_definitions/user_create_unit_reference.rb:6
Expected /Users/sam/apps/keriakoo/app/models/reference_unit.rb to define Reference_unit (LoadError)
./app/controllers/reference_units_controller.rb:4:in `new'
./features/step_definitions/user_create_unit_reference.rb:7:in `/^I go to the new Reference Units page$/'
features/user_can_create_units.feature:11:in `When I go to the new Reference Units page'
As I mentioned above. the reference_unit.rb file is in the correct place. Of course, I haven't added any methods or attributes to it expecting cucumber to guide me at the right time. I'm sure it's something simple, but I tried all kinds of combinations of words and capitalization to shake something loose, sam
OK, I think I hit on the clue. Digging around, I used the --backtrace option on cucumber and it pointed me to a dependency with a key word of "const". OK, it doesn't like something in the text. Looking around for info on two-word models, I can tell that my model was correct: ReferenceUnit. But looking at my error output, it was looking for Reference_unit. So for laughs I altered the regex for that step to be "When /^I go to the new Reference units page$" the error went away. So the syntax of the first line is important, and not 'freestylin' as I suspected.

How to overwrite some data's in columnFicture?

my ColumnFicture test table look like this:
|categoryId|subcategoryId|showResults?|
| 2 | 1 | |
I overwrite in my ficture code (C#) categoryId (2) if subcategory is more than 0. Is that possible overwrite categoryId on fitnesse test site? That evry one can see what happend.
No, from your fixture code you can not change the test in the FitNesse wiki. A test in the wiki is rendered into HTML, passed to a FitServer, parsed into a tree structure, passed to your fixture which can modify the tree, and then rendered into the test result HTML. So your fixture is too far down the pipeline to access the original wiki test source.