Skip to content

Commit

Permalink
Fix: #26
Browse files Browse the repository at this point in the history
Added HansK, Jelle, and Peter als MemberPortfios rather than as Photographers.
  • Loading branch information
vdhamer committed Oct 6, 2024
1 parent 766b5a0 commit e7bbe5c
Showing 1 changed file with 50 additions and 17 deletions.
67 changes: 50 additions & 17 deletions Photo Club Hub HTML/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -113,23 +113,56 @@ struct ContentView: View {
func addTestMembers() {
let fgDeGender = ContentView.addFGdeGender()

let hansKrüsemann = PersonName(givenName: "Hans", infixName: "", familyName: "Krüsemann")
_ = Photographer.findCreateUpdate(context: viewContext,
personName: hansKrüsemann,
optionalFields: PhotographerOptionalFields())

let jelleVanDeVoort = PersonName(givenName: "Jelle", infixName: "van de", familyName: "Voort")
_ = Photographer.findCreateUpdate(context: viewContext,
personName: jelleVanDeVoort,
optionalFields: PhotographerOptionalFields())

let peterVanDenHamer = PersonName(givenName: "Peter", infixName: "van den", familyName: "Hamer")
_ = Photographer.findCreateUpdate(context: viewContext,
personName: peterVanDenHamer,
optionalFields: PhotographerOptionalFields(
photographerWebsite: URL(string: "https://glass.photo/vdhamer")
)
)
let hansKrüsemannPN = PersonName(givenName: "Hans", infixName: "", familyName: "Krüsemann")
let hansKrüsemannPho = Photographer.findCreateUpdate(context: viewContext,
personName: hansKrüsemannPN,
optionalFields: PhotographerOptionalFields())
let hansKrüsemannOpt = MemberOptionalFields(
level3URL: URL(string: "http://www.vdhamer.com/fgDeGender/Hans_Krusemann/"),
memberRolesAndStatus: MemberRolesAndStatus(role: [ .admin: true ], status: [:]),
fotobondNumber: 1620090,
membershipStartDate: "2016-04-01".extractDate(),
membershipEndDate: nil)
let hansKrüsemannMem = MemberPortfolio.findCreateUpdate(bgContext: viewContext,
organization: fgDeGender,
photographer: hansKrüsemannPho,
optionalFields: hansKrüsemannOpt)
hansKrüsemannMem.refreshFirstImage()

let jelleVanDeVoortPN = PersonName(givenName: "Jelle", infixName: "van de", familyName: "Voort")
let jelleVanDeVoortPho = Photographer.findCreateUpdate(context: viewContext,
personName: jelleVanDeVoortPN,
optionalFields: PhotographerOptionalFields())
let jelleVanDeVoortOpt = MemberOptionalFields(
level3URL: URL(string: "http://www.vdhamer.com/fgDeGender/Jelle_van_de_Voort/"),
memberRolesAndStatus: MemberRolesAndStatus(role: [ .chairman: true ], status: [:]),
fotobondNumber: 1620103,
membershipStartDate: "2020-01-01".extractDate(),
membershipEndDate: nil)
let jelleVanDeVoortMem = MemberPortfolio.findCreateUpdate(bgContext: viewContext,
organization: fgDeGender,
photographer: jelleVanDeVoortPho,
optionalFields: jelleVanDeVoortOpt)
jelleVanDeVoortMem.refreshFirstImage()

let peterVanDenHamerPN = PersonName(givenName: "Peter", infixName: "van den", familyName: "Hamer")
let peterVanDenHamerPho = Photographer.findCreateUpdate(context: viewContext,
personName: peterVanDenHamerPN,
optionalFields: PhotographerOptionalFields(
bornDT: "1957-10-18".extractDate(),
photographerWebsite: URL(string: "https://glass.photo/vdhamer")
))
let peterVanDenHamerOpt = MemberOptionalFields(
level3URL: URL(string: "http://www.vdhamer.com/fgDeGender/Peter_van_den_Hamer/"),
memberRolesAndStatus: MemberRolesAndStatus(role: [ .admin: true ], status: [:]),
fotobondNumber: 1620110,
membershipStartDate: "2024-01-01".extractDate(),
membershipEndDate: nil)
let peterVanDenHamerMem = MemberPortfolio.findCreateUpdate(bgContext: viewContext,
organization: fgDeGender,
photographer: peterVanDenHamerPho,
optionalFields: peterVanDenHamerOpt)
peterVanDenHamerMem.refreshFirstImage()
}

public static func addFGdeGender() -> Organization {
Expand Down

0 comments on commit e7bbe5c

Please sign in to comment.