-
Notifications
You must be signed in to change notification settings - Fork 0
feat(agent): Creates payload and request to create/update translations for agents #321
feat(agent): Creates payload and request to create/update translations for agents #321
Conversation
…ds in the Agent Service to create & update translations for an agent. These methods are consumed in the agent-detail component by passing appropriate payload. Writes tests for the new methods in the agent service. creates a new interface for IAgentTranslationRequest that is used as the payload type while setting translation. creates `translationCreated` & `translationUpdated` translation keys in INotificationTranslationKey. Adds these new translation keys in the languauge JSON files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good to me. I really like the patterns and use of easy to use services. Couple of non-blocking questions and suggestions around the tests.
translationForLanguage.hasTranslation | ||
? this.updateTranslation(translationPayload) | ||
: this.createTranslation(translationPayload); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if we trigger setTranslation
and it actually goes not contain any changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for the delayed response. Do you mean the form values don't change? The client will send a request to the server regardless of whether or not the payload value changes.
…when the language requested isnt part of the agent data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good to me. Just one non-blocking question.
…reEach` description
Changes
IAgentTranslationRequest
that is used as the payload type while setting translation.translationCreated
&translationUpdated
translation keys inINotificationTranslationKey
.Purpose
Send requests to the server to create/update the agent translation as described in #318
Approach
The frontend sends requests to the new POST & PUT endpoints
agent/:id/translations
as defined here to create/update the translations.Testing Steps
If you are not a member of this project, skip this step
Description
value in the form.agent/:id/translations
endpoint using a POST method.dynamicContent
object including all languages that have translations available.Closes #318