locale &update handling
This commit is contained in:
@@ -66,6 +66,7 @@ export default {
|
||||
'Registrierung erfolgreicht, leider konnte die Verifizierungs-E-Mail nicht versendet werden. Bitte wenden Sie sich an den Verein um Ihre Emailadresse zu bestätigen und Ihren Account zu aktivieren.'
|
||||
},
|
||||
validation: {
|
||||
invalid: 'ungültig',
|
||||
invalid_user_id: 'Nutzer ID ungültig',
|
||||
invalid_subscription_model: 'Model nicht gefunden',
|
||||
user_not_found: '{field} konnte nicht gefunden werden',
|
||||
@@ -86,7 +87,9 @@ export default {
|
||||
image: 'Dies ist kein Bild',
|
||||
alphanum: 'beinhaltet ungültige Zeichen',
|
||||
user_disabled: 'Benutzer ist deaktiviert',
|
||||
alphaunicode: 'darf nur aus Buchstaben bestehen'
|
||||
duplicate: 'Schon vorhanden..',
|
||||
alphaunicode: 'darf nur aus Buchstaben bestehen',
|
||||
too_soon: 'zu früh'
|
||||
}
|
||||
},
|
||||
licenceCategory: {
|
||||
|
||||
@@ -19,8 +19,6 @@ export function formDataToObject(formData) {
|
||||
}
|
||||
/** @type {string[]} */
|
||||
const keys = key.match(/\[([^\]]+)\]/g)?.map((k) => k.slice(1, -1)) || [key];
|
||||
console.log('Processed keys:', keys);
|
||||
console.dir(value);
|
||||
/** @type {Record<string, any>} */
|
||||
let current = object;
|
||||
|
||||
|
||||
@@ -99,15 +99,14 @@ func (uc *UserController) UpdateHandler(c *gin.Context) {
|
||||
utils.RespondWithError(c, err, "Error finding an existing user", http.StatusNotFound, errors.Responses.Fields.User, errors.Responses.Keys.NotFound)
|
||||
return
|
||||
}
|
||||
// user.Membership.ID = existingUser.Membership.ID
|
||||
|
||||
// user.MembershipID = existingUser.MembershipID
|
||||
// if existingUser.Licence != nil {
|
||||
// user.Licence.ID = existingUser.Licence.ID
|
||||
// }
|
||||
// user.LicenceID = existingUser.LicenceID
|
||||
// user.BankAccount.ID = existingUser.BankAccount.ID
|
||||
// user.BankAccountID = existingUser.BankAccountID
|
||||
user.MembershipID = existingUser.MembershipID
|
||||
user.Membership.ID = existingUser.Membership.ID
|
||||
if existingUser.Licence != nil {
|
||||
user.Licence.ID = existingUser.Licence.ID
|
||||
}
|
||||
user.LicenceID = existingUser.LicenceID
|
||||
user.BankAccount.ID = existingUser.BankAccount.ID
|
||||
user.BankAccountID = existingUser.BankAccountID
|
||||
|
||||
if requestUser.RoleID <= constants.Priviliges.View {
|
||||
existingUser.Password = ""
|
||||
|
||||
@@ -46,9 +46,9 @@ func HandleUserUpdateError(c *gin.Context, err error) {
|
||||
case errors.ErrSubscriptionNotFound:
|
||||
RespondWithError(c, err, "Couldn't find subscription", http.StatusNotFound, errors.Responses.Fields.SubscriptionModel, errors.Responses.Keys.NotFound)
|
||||
default:
|
||||
}
|
||||
RespondWithError(c, err, "Couldn't update user", http.StatusInternalServerError, errors.Responses.Fields.User, errors.Responses.Keys.InternalServerError)
|
||||
}
|
||||
}
|
||||
|
||||
func HandleSubscriptionDeleteError(c *gin.Context, err error) {
|
||||
switch err {
|
||||
|
||||
Reference in New Issue
Block a user