Closed viktorsmari closed 3 years ago
I tried to get all users and put it in the list of receivers and providers but - if I try to set my name fore action in which my name does not showed in filtered list - I got a bad request - You are not provider or receiver!
How can new users create new Resources? - the answer is : backend team allow to create Resources for all users already after registration
And after this fixes we need uncomment function above in frontend and pass it's result in providers and receivers list
@oksanasalohubova if my new user first does this:
mutation {
createEconomicEvent(
event: {
action: "transfer",
note: "lalala"
},
newInventoriedResource: {
name: "New inventory via ecoEvent"
}
)
{
economicEvent {
id
note
}
}
}
After this query, the user is now able to select his name from the receiver
and provider
dropdown in the new Resource
modal.
Can we enable create a new Resource
using this method?
Is there an easier way, using this mutation, that we can use to create a new inventory?
We added a 'quick hack' to add new users to the RECEIVER list.
In order to create a new Resource via event and be able to transfer
it to yourself, your username needs to be in the provider
and receiver
list.
This button which is now under My profile executes the mutation in the previous comment:
https://github.com/reflow-project/weloop/pull/93 new PR
Now you will see new user in provider and receiver list immediately after registration and login I set agent list as provider and receiver
I have not found a way to get a timely update of the list of providers and receivers without reloading the page If this solution is acceptable, then the Create default Economic Event to become a provide button is no longer needed, but it remains in the code, in case the user suddenly does not appear in the list of agents.
Issue fixed after using agents
query instead of user
query!
Problem: How can new users create new Resources?
How to reproduce:
receiver
andprovider
)This means it's not possible for new users to create resources.
Can we use this query instead in
receiver
andprovider
?Or use the agents