diff --git a/src/main/kotlin/no/fg/hilflingbackend/MockDataService.kt b/src/main/kotlin/no/fg/hilflingbackend/MockDataService.kt index bdb68ba4..5166a063 100644 --- a/src/main/kotlin/no/fg/hilflingbackend/MockDataService.kt +++ b/src/main/kotlin/no/fg/hilflingbackend/MockDataService.kt @@ -382,162 +382,6 @@ class MockDataService { email = Email("fg-web@samfundet.no") ) ) - /* - private fun generatePhotoOnPurchaseOrderData(): List { - return listOf( - PhotoOnPurchaseOrder { - photo = generatePhotoData().single { - it.id == 1 - } - purchaseOrder = generatePurchaseOrderData().single { - it.id == 1 - } - amount = 2 - size = "A4" - - }, - PhotoOnPurchaseOrder { - photo = generatePhotoData().single { - it.id == 2 - } - purchaseOrder = generatePurchaseOrderData().single { - it.id == 1 - } - amount = 2 - size = "A4" - } - ) - } - - private fun generatePurchaseOrderData(): List { - return listOf( - PurchaseOrder { - name = "Caroline Sandsbråten" - email = "carosa@samfundet.no" - address = "Magnus den Godes gt. 10" - zipCode = "7030" - city = "Trondheim" - sendByPost = true - comment = "TRENGER BILDENE ASAP!!!!" - isCompleted = false - }, - PurchaseOrder { - name = "Oscar Selnes Bognæs" - email = "Oscarsb1@gmail.com" - address = "Frode Rinnas Vei 159" - zipCode = "7051" - city = "Trondheim" - sendByPost = true - comment = "Hvis jeg ikke får bildene innen fredag refunder jeg og legger igjen 1 stjerne på TripAdvisor" - isCompleted = false - } - ) - } - - private fun generatePhotographyRequestData(): List { - return listOf( - PhotographyRequest { - description = "Can u take photos uf us pls" - email = "Sindreerkul@kulesindre.kul" - isIntern = true - startTime = LocalDate.parse("2019-12-11") - endTime = LocalDate.parse("2019-12-11") - place = "Your mamas house" - phone = "91382405" - type = "Gruppebilde" - }, - PhotographyRequest { - description = "Kan dere ta bilder av oss mens vi skjærer ost?" - email = "email@email.no" - isIntern = false - startTime = LocalDate.parse("2019-12-11") - endTime = LocalDate.parse("2019-12-11") - place = "Odd Brochmanss Veg 62" - phone = "91382405" - type = "Stilbilde" - } - ) - } - - - - private fun generatePlaceData(): List { - return listOf( - PlaceData { - dateCreated = "2019-05-11" - title = "Edgar" - } - PlaceData { - dateCreated = "2018-04-12" - title = "Lyche" - } - PlaceData { - dateCreated = "2019-11-12" - title = "Daglighallen" - } - ) - - } - - - private fun generateGangData(): List { - return listOf( - Gang { - name = "Fotogjengen" - dateCreated = LocalDate.parse("1907-01-01") - }, - Gang { - name = "Diversegjengen" - dateCreated = LocalDate.parse("1937-01-01") - } - ) - } - - private fun generateEventOwnerData() { - return listOf( - EventOwner { - name = "Samfundet" - }, - EventOwner { - name = "Uka" - } - ) - } - - private fun generateArticleTagData(): List { - return listOf( - ArticleTag { - dateCreated = LocalDate.parse("2020-02-02") - name = "Morsom" - }, - ArticleTag { - dateCreated = LocalDate.parse("2019-04-08") - name = "Fotografi" - }, - ArticleTag { - dateCreated = LocalDate.parse("2018-12-01") - name = "Web" - } - ) - } - - - //To be finished (Making motive before) - private fun generatePhotoData(): List { - listOf( - Photo { - dateCreated = LocalDate.parse("2020-01-01") - largeUrl = "https://www.pngitem.com/pimgs/m/141-1412402_transparent-pepe-clipart-hd-png-download.png" - mediumUrl = "https://www.pngitem.com/pimgs/m/141-1412402_transparent-pepe-clipart-hd-png-download.png" - smallUrl = "https://www.pngitem.com/pimgs/m/141-1412402_transparent-pepe-clipart-hd-png-download.png" - - - } - ) - } - - -*/ fun seedMockData() { generateAlbumData() diff --git a/src/main/kotlin/no/fg/hilflingbackend/dto/SamfundetUserDto.kt b/src/main/kotlin/no/fg/hilflingbackend/dto/SamfundetUserDto.kt index ad3a23e0..529aa35a 100644 --- a/src/main/kotlin/no/fg/hilflingbackend/dto/SamfundetUserDto.kt +++ b/src/main/kotlin/no/fg/hilflingbackend/dto/SamfundetUserDto.kt @@ -38,6 +38,7 @@ fun SamfundetUserDto.toEntity(): SamfundetUser { email = dto.email.value firstName = dto.firstName lastName = dto.lastName + username = dto.username phoneNumber = dto.phoneNumber.value email = dto.email.value sex = dto.sex