Skip to content

Commit

Permalink
migrations naam to titel
Browse files Browse the repository at this point in the history
  • Loading branch information
githubjimmeicatt committed Sep 18, 2023
1 parent c8b6cab commit e53c3a6
Show file tree
Hide file tree
Showing 9 changed files with 352 additions and 8 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Kiss.Bff.NieuwsEnWerkinstructies.Migrations
{
public partial class NameChangeVragenSetNaamToTitel : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "Naam",
table: "ContactVerzoekVragenSets",
newName: "Titel");
}

protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "Titel",
table: "ContactVerzoekVragenSets",
newName: "Naam");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.Property<string>("JsonVragen")
.HasColumnType("json");

b.Property<string>("Naam")
b.Property<string>("Titel")
.IsRequired()
.HasColumnType("text");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class ContactVerzoekVragenSet
[Required]
public int Id { get; set; } = default!;
[Required]
public string Naam { get; set; } = default!;
public string Titel { get; set; } = default!;
public string? JsonVragen { get; set; }
public string? AfdelingId { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public async Task<IActionResult> Put(int id, ContactVerzoekVragenSet model, Canc
return NotFound();
}

contactVerzoekVragenSet.Naam = model.Naam;
contactVerzoekVragenSet.Titel = model.Titel;
contactVerzoekVragenSet.JsonVragen = model.JsonVragen;
contactVerzoekVragenSet.AfdelingId = model.AfdelingId;

Expand Down
2 changes: 1 addition & 1 deletion src/features/contactverzoek/ContactverzoekFormulier.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
>
<option value="" selected>Geen</option>
<option v-for="item in data" :key="item.id" :value="item.id">
{{ item.naam }}
{{ item.titel }}
</option>
</select>
</label>
Expand Down
4 changes: 2 additions & 2 deletions src/features/contactverzoek/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const contactMomentVragenSets = "/api/contactverzoekvragensets";

type ServerContactVerzoekVragenSet = {
id: string;
naam: string;
titel: string;
jsonVragen: string;
afdelingId: string;
};
Expand Down Expand Up @@ -277,7 +277,7 @@ function mapToClientContactVerzoekVragenSets(
);
return {
id: serverData.id,
naam: serverData.naam,
titel: serverData.titel,
vraagAntwoord: parsedQuestions,
afdelingId: serverData.afdelingId,
};
Expand Down
Loading

0 comments on commit e53c3a6

Please sign in to comment.