msandrini / achiever

A tool built to achieve... wrapper over the old "Achievo" legacy system, transforming the old php+html return into a modern one-page app in React with GraphQL for the API.
MIT License
1 stars 2 forks source link

Update button on Edit Screen #31

Closed henriquefacioli closed 6 years ago

henriquefacioli commented 6 years ago

The "enviar" (send) button should be replaced with an "atualizar" (update) button if the data is already on server and is possible to edit it. To do so, for now, it is need to do a mutation that will do like:

mutation updateTimeentries {
  delTimeEntry(date: '2018-01-25')
  addTimeEntry(TimeEntry)
}

but, to avoid inserting before deleting on async calls, maybe should create a new mutation editTimeEntry(TimeEntry) that would do that in one call. This should be implemented on server/schema/resolver.js

msandrini commented 6 years ago

This was done recently.