Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notes Dashboard Form Component #4

Open
11 tasks done
drfaustusfade opened this issue Mar 7, 2018 · 23 comments
Open
11 tasks done

Notes Dashboard Form Component #4

drfaustusfade opened this issue Mar 7, 2018 · 23 comments
Assignees
Labels
enhancement New feature or request

Comments

@drfaustusfade
Copy link
Contributor

drfaustusfade commented Mar 7, 2018

  • Sometimes the number of fields is conditional and depending on the select option as if to select city F additional field appears, "facility area" for example, and it will show up, but for others, it will not be shown, and if contained in table for lines that do not contain that field in configuration, it will be blocked for editing, and there will be no value, in other words there should be functionality where a field appears based on value from another field
  • Depending field should be nulled if fields before where reselected
  • It should not be possible to save if required fields are not filled, required option in the configuration
  • Some fields are independent of others
  • allProducts defined in the component, is it possible to update it to be also in the config and be generalized, maybe to be dropdown selections field in forms config (also there will be the case that selections coming from another component - checkbox selections)
  • Is it possible to retrieve data for form table part from config where it would have a values field with all data
  • configuration so that add row is not shown and it is not possible to edit rows( for cases when form is submit as completed), and having configuration for edit button, that will allow editing
  • form card should be responsive to form itself
  • table in another component should also be updated
  • setting that allows numeric field to be less then zero, default cannot
  • field type in config
@drfaustusfade
Copy link
Contributor Author

currently we have for example activities selection config, like conditional drop down

admin0pcode	cluster_id	cluster	activity_type_id	activity_type_name	activity_description_id	activity_description_name
AF, ET, IQ, KE, NG, SO, UA, UR	health	Health	primary_health_care	Primary Health Care	opd_consultation	OPD Consultation
AF, ET, IQ, KE, NG, SO, UA, UR	health	Health	primary_health_care	Primary Health Care	phc_referrals	OPD Referrals

there would propably be additionally reporting form fields field that specify which fields to appear on selection,
but could be desinged with other more suitable structure, and automatically generated json config

@drfaustusfade
Copy link
Contributor Author

example of existing functionality
2018-03-05_16-39-13

@drfaustusfade drfaustusfade added the enhancement New feature or request label Mar 7, 2018
@drfaustusfade
Copy link
Contributor Author

note: Is it possible to retrieve data for form table part from config where it would have a values field with all data
the user case is reopening a saved form, so that data could be changed

@fakhrihawari
Copy link
Contributor

for field type config , is it like this?
input-type
or we add another property e.g field like this?
field

@pfitzpaddy
Copy link

Good question, id take a look at what Angular Forms suggests for this.
It seems 'type' and 'field' might both be required, but im not sure....

@drfaustusfade
Copy link
Contributor Author

check this for inspiration https://github.com/formio/angular-formio
field could be named more explicitly like inputType etc
so we can put diff types like in specs https://material.angular.io/components/input/overview
constraint config also needed to make it greater than zero for example

@fakhrihawari
Copy link
Contributor

Sorry, can you explain about this one "configuration so that add row is not shown and it is not possible to edit rows( for cases when form is submit as completed), and having configuration for edit button, that will allow editing", I'm bit confused about the configuration? the configuration is in the file(like in this picture below
field
) or just in the component ?

@fakhrihawari
Copy link
Contributor

rs80xdexl7

@drfaustusfade
Copy link
Contributor Author

check this out:
2018-03-14_15-16-24

@drfaustusfade
Copy link
Contributor Author

so maybe if you have in config complete it will show not editable table
and if has editButton or edit then it will be possible to edit form
we need also take into consideration when developing user roles functionality that it could also be dependent on a role, like some users will only see but not be able to update data, other will have always such functionality

@drfaustusfade
Copy link
Contributor Author

drfaustusfade commented Mar 16, 2018

configuration so that add row is not shown and it is not possible to edit rows( for cases when form is submit as completed), and having configuration for edit button, that will allow editing

  • is it possible to have in config like editButton: true or formActive: true?

@drfaustusfade
Copy link
Contributor Author

drfaustusfade commented Mar 16, 2018

  • is required in config working?
    so that next if facility is empty it would be not possible to add?
    2018-03-16_14-02-50

@drfaustusfade
Copy link
Contributor Author

adding one field after ( copy from previous) gives next:

chrome_2018-03-16_14-05-43

@drfaustusfade
Copy link
Contributor Author

drfaustusfade commented Mar 16, 2018

  • adding/deleting row on next page removes wrong row
    2018-03-16_14-01-26

  • not possible to go first page

@drfaustusfade
Copy link
Contributor Author

drfaustusfade commented Mar 16, 2018

  • can we add number increment in edit like in add row
    chrome_2018-03-16_14-21-37

@drfaustusfade
Copy link
Contributor Author

drfaustusfade commented Mar 16, 2018

  • is it possible to have cascade config only once for required rows? without repeating, DRY principle, maybe like dataraw and on field referencing it, or having named cascade for multi cascade on form, so there is in field select config name of cascade and one of the cascade fields

  • is it possible to have also cascade config outside select element? so that each needed select element references it, e.g. cascade: 'activities' and having a key on config activities: [ ... ] or cascade: [ activities: [ ...] ,]?

@drfaustusfade
Copy link
Contributor Author

drfaustusfade commented Mar 22, 2018

  • it should be possible to edit in edit mode select options after first
    2018-03-22_11-37-14

@fakhrihawari
Copy link
Contributor

For "is it possible to have also cascade config outside select element? so that each needed select element references it, e.g. cascade: 'activities' and having a key on config activities: [ ... ] or cascade: [ activities: [ ...] ,]?", I think it's possible to put it outside the select element and can you give me more detail example

@drfaustusfade
Copy link
Contributor Author

on form component
dataraw: [
{  location: 'city A',facility: 'SmallWidget1', food:"Apple"   , place:'City A', star:4, number:5,people:100}],
cascade: [
 {  location: 'city A',facility: 'SmallWidget1', food:"Apple"   }],
or
cascade: { locations: [{  location: 'city A',facility: 'SmallWidget1', food:"Apple"   }}
or
cascade: [ {id: 'locations', data: [{  location: 'city A',facility: 'SmallWidget1', food:"Apple"   }]},]

and on each neede select

{
type: 'select',
...
cascade: 'locations', reference from above
}

or even on dashboard 
{
'id':1,
'formdata':[ {id: 'locations', data: [{  location: 'city A',facility: 'SmallWidget1', food:"Apple"   }]},]
or 
'formdata': { locations: [{  location: 'city A',facility: 'SmallWidget1', food:"Apple"   }}
...
}

@drfaustusfade
Copy link
Contributor Author

the above is when we have multiple forms on one dash referencing one cascade data
or we need to tackle cases when we have checkbox form that selects location cities A,B,C and that filters then to select only these checked for select form, that is cross forms data sharing

@fakhrihawari
Copy link
Contributor

so the cascade is from dataraw??

@drfaustusfade
Copy link
Contributor Author

dataraw is for table data part
cascade for form data part
Two separate

@fakhrihawari
Copy link
Contributor

oh ok,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants