GroceriStar / groceristar-fetch

json arrays for Food Tech projects
https://groceristar.github.io/groceristar-fetch/
GNU General Public License v3.0
8 stars 18 forks source link

redux constants. stage1. methods #448

Open atherdon opened 5 years ago

atherdon commented 5 years ago

Is your feature request related to a problem? Please describe. @AkshayChoulwar Sorry for short description, let's explore this task at comments. feel free and ask me anything

right now here we have 2 files that will give you an idea of what we need to do. 1) check this file https://github.com/GroceriStar/groceristar-fetch/blob/master/docs/constants.md we'll use information from it in order to create 50-70 constants before moving to a next stage 2) this is an example of how methods of groceristar - departments entity looks as constants: https://github.com/GroceriStar/groceristar-fetch/blob/master/docs/const-departments-example.js

Is it was created as task at GitHub issues? Please provide an issue number or link

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

atherdon commented 5 years ago

You may ask me - how departments file was created? This is an actual task for those departments:


"By using names on methods from this page we created a set of constants. Each constant is just a human version of the method that we have. But we didn't finish work, related to department methods. You'll need to do it.

Example: Get data, related to single department equal to export const GET_DEPARTMENT_DATA = "GET_DEPARTMENT_DATA";

"

atherdon commented 5 years ago

youre first assesment to this task will be:

By using names on methods from this page In order to make it better, we'll create set of constants, each for a different method.

Example: Create or find at db new ingredient new ingredient and attach it to grocery list will became export const FIND_OR_CREATE_AND_ATTACH_TO_GROCERY = "FIND_OR_CREATE_AND_ATTACH_TO_GROCERY";

atherdon commented 5 years ago

[Completed] @elnur004 you can grab this one

By using names on methods from this page In order to make it better, we'll create a set of constants, each for a different method.

Example: Get All ingredients with status favorite will became export const GET_ALL_FAVORITE_INGREDIENTS = "GET_ALL_FAVORITE_INGREDIENTS ";

https://github.com/GroceriStar/fetch-constants/issues/3

atherdon commented 5 years ago

@elnur004 another one for you

By using names on methods from this page In order to make it better, we'll create set of constants, each for a different method.

Example: Method that will Display Grocery List Data will became export const GET_FULL_GROCERY_LIST = "GET_FULL_GROCERY_LIST";


atherdon commented 5 years ago

@elnur004 similar to previous one, but will require some time for research

https://chickenkyiv.github.io/search-api-documentation/docs/db-schema

https://chickenkyiv.github.io/search-api-documentation/docs/db-schema By using names on URLS from this page In order to make it better, we'll create set of constants, each for a different method.

Example: http://localhost:3000/api/attribute?filter[where][type]=allergy will became export const ATTRIBUTE_FILTER_TYPE_ALLERGY = "ATTRIBUTE_FILTER_TYPE_ALLERGY";

atherdon commented 5 years ago

@elnur004 same thing, but step2

https://chickenkyiv.github.io/search-api-documentation/docs/db-schema

https://chickenkyiv.github.io/search-api-documentation/docs/db-schema By using names on URLS from this page In order to make it better, we'll create set of constants, each for a different method.

Example: http://localhost:3000/api/attribute?filter[where][type]=allergy will became export const ATTRIBUTE_FILTER_TYPE_ALLERGY = "ATTRIBUTE_FILTER_TYPE_ALLERGY";

atherdon commented 5 years ago

@elnur004 next thing is to create constants for our models: https://github.com/GroceriStar/groceristar-fetch/blob/master/docs/constants.md#models

atherdon commented 5 years ago

@siddharthp538 you can grab this part of data. https://github.com/GroceriStar/groceristar-fetch/blob/master/docs/constants.md#models-1 this part is similar to work that was done before here

elnur004 commented 5 years ago

@atherdon in which file we need to create constants for models? create new files or how?

atherdon commented 5 years ago

each new sub-task here is a new file. because in other case we'll be very confused. as you see - we trying to cover a lot of cases an the same time and it's very confusing right now :)

atherdon commented 5 years ago

@elnur004 you should continue to work on this task. I think at this file https://github.com/GroceriStar/groceristar-fetch/blob/master/docs/constants.md we have a lot of work to do

AkshayChoulwar commented 5 years ago

Hi @atherdon,

There is an existing depatment.js file under the docs directory, my question is which constants should have to add on that file because I am seeing some constants in that already.

atherdon commented 5 years ago

@AkshayChoulwar this was your first task: https://github.com/GroceriStar/groceristar-fetch/issues/448#issuecomment-506798133 departments was just an example, that shows how this task should be done: https://github.com/GroceriStar/groceristar-fetch/issues/448#issuecomment-506797807

atherdon commented 5 years ago

but, as you already checking departments - tell me - do all of the methods were transferred? we didn't miss anything?

AkshayChoulwar commented 5 years ago

@atherdon according to this page for departments it's completed.

AkshayChoulwar commented 5 years ago

@atherdon for this task whether we have to create the separate file or should we add to the ingredient.js file.

atherdon commented 5 years ago

make a separated file for it please.

Thanks for letting me know about departments

AkshayChoulwar commented 5 years ago

@atherdon thanks for clearing doubts.

atherdon commented 5 years ago

@elnur004 do we have something left here for you?

elnur004 commented 5 years ago

@atherdon i guess we've done all constants and models

elnur004 commented 5 years ago

@atherdon if this task has been done already, may i get a new one, please?

atherdon commented 5 years ago

all things from this file: https://github.com/GroceriStar/groceristar-fetch/blob/master/docs/constants.md? i just not remember what exactly we were working on :) give me more details so I can refresh my memory.

if we finish it - then yeah - i'll find a new task for you

elnur004 commented 5 years ago

we just created several constants and model files.

atherdon commented 5 years ago

so we can do other sections from this file? if yes - then you can jump into it. i'm a bit busy right now - soon will find something more interesting to you

elnur004 commented 5 years ago

@atherdon need we create constants related to relations for model schemas?

atherdon commented 5 years ago

yes, please do it