Skip to content

Commit

Permalink
hotfix 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelsack committed May 10, 2022
1 parent 95a34e3 commit c4d168d
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 7 deletions.
4 changes: 4 additions & 0 deletions frontend/public/locales/de-DE/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,10 @@
"title": "Bitte gebe alle geforderten Daten ein",
"text": "Um einen Raum zu speichern, muss es einen Eintrag in den folgenden Feldern geben: Name, Beschreibung!"
},
"npc":{
"title": "Bitte gebe alle geforderten Daten ein",
"text": "Um einen NPC zu speichern, muss es einen Eintrag in den folgenden Feldern geben: Name, Beschreibung und Spezies!"
},
"gender": {
"title": "Bitte gebe alle geforderten Daten ein",
"text": "Bitte gebe einen Namen für das Geschlecht an"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ const AddActionModal: React.FC<AddActionModalProps> = (props) => {
]

const onSubmit = () => {
if (validator.alreadyExists(command, "command", dconf.actions)){
if (!props.editData && validator.alreadyExists(command, "command", dconf.actions)){
setError(t(`actionalreadyexists`));
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const AddClassModal: React.FC<AddClassModalProps> = (props) => {
}

const onSubmit = () => {
if (validator.alreadyExists(name, "name", dconf.classes)) {
if (!props.editData && validator.alreadyExists(name, "name", dconf.classes)) {
setError(t(`classalreadyexists`));
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const AddGenderModal: React.FC<AddGenderModalProps> = (props) => {
}

const onSubmit = () => {
if (validator.alreadyExists(name, "name", dconf.genders)) {
if (!props.editData && validator.alreadyExists(name, "name", dconf.genders)) {
setError(t(`genderalreadyexists`));
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const AddItemModal: React.FC<AddItemModalProps> = (props) => {
}

const onSubmit = () => {
if (validator.alreadyExists(name, "name", dconf.items)) {
if (!props.editData && validator.alreadyExists(name, "name", dconf.items)) {
setError(t(`itemalreadyexists`));
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const AddNpcModal: React.FC<AddNpcModalProps> = (props) => {
}

const onSubmit = () => {
if (validator.alreadyExists(name, "name", npcs)) {
if (!props.editData && validator.alreadyExists(name, "name", npcs)) {
setError(t(`npcalreadyexists`));
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const AddRoomModal: React.FC<AddRoomModalProps> = (props) => {
}

const onSubmit = () => {
console.log(validator.alreadyExists(name, "name", rooms))
if (validator.alreadyExists(name, "name", rooms)) {
setError(t(`roomalreadyexists`));
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const AddSpeciesModal: React.FC<AddSpeciesModalProps> = (props) => {
}

const onSubmit = () => {
if (validator.alreadyExists(name, "name", species)) {
if (!props.editData && validator.alreadyExists(name, "name", species)) {
setError(t(`speciesalreadyexists`));
return;
}
Expand Down

0 comments on commit c4d168d

Please sign in to comment.