-
Notifications
You must be signed in to change notification settings - Fork 10
Remove arbeitzeisatz when cancelling arbeitsangebot #930
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
base: prod
Are you sure you want to change the base?
Conversation
|
|
||
| private def prependAbgesagt(existing: Option[String]): Option[String] = | ||
| existing match { | ||
| case Some(txt) if txt.trim.startsWith("<span class=\"status-icon cancelled\" title=\"Cancelled\">❌</span>") => Some(txt) // already prefixed |
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.
Adding HTML to the Field is not very nice.
In addition we add something to a field the person has added their comments.
Shouldn't we display the icon on the UI based on the Arbeitseinsatz.Status? Updating the Status is absolutely fine.
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.
handle now in frontend
| case UserCommandFailed => | ||
| complete(StatusCodes.BadRequest, s"Could not cancel the Arbeitsangebot, please check the input data.") | ||
| case _ => | ||
| complete(StatusCodes.OK, "Arbeitsangebot cancelled and related einsätze removed.") |
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.
Not true, the Arbeitseinsatz was not removed but the Status is set to Abgesagt
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.
changed
| val einsatzModify = copyTo[Arbeitseinsatz, ArbeitseinsatzModify]( | ||
| einsatz, | ||
| "status" -> Abgesagt, | ||
| "bemerkungen" -> updatedBemerkungen |
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.
You are overwriting the bemerkungen field from the same object. Didn't you want to append the bemerkung of the arbeitsangebot or something?
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.
You are right, this is not required anymore. Now this is handled on frontend.
|
No description provided.