Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Näytetään hakemuksen muokkaajan nimi hakemusnäkymässä (nyt näkyy vain aikaleima) #6083

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Näytetään hakemuksen muokkaajan nimi hakemusnäkymässä
kechpaja-at-gofore committed Dec 13, 2024
commit f368a22e44786d7947e3dc1e4a31a25f392626d6
Original file line number Diff line number Diff line change
@@ -24,8 +24,8 @@ export default React.memo(function BasicsSection({
}: BasicsSectionProps) {
const t = useTranslation()

const created = application.createdDate?.toLocalDate()
const modified = application.modifiedDate?.toLocalDate()
const created = application.createdAt?.toLocalDate()
const modified = application.modifiedAt?.toLocalDate()

return (
<div>
9 changes: 5 additions & 4 deletions frontend/src/e2e-test/dev-api/fixtures.ts
Original file line number Diff line number Diff line change
@@ -2950,11 +2950,12 @@ export const applicationFixture = (
status,
transferApplication,
allowOtherGuardianAccess: true,
createdDate: null,
createdAt: HelsinkiDateTime.now(),
createdBy: systemInternalUser.id,
modifiedAt: HelsinkiDateTime.now(),
modifiedBy: systemInternalUser.id,
dueDate: null,
modifiedDate: null,
sentDate: null,
formModified: HelsinkiDateTime.now()
sentDate: null
})

const feeThresholds = {
12 changes: 6 additions & 6 deletions frontend/src/e2e-test/generated/api-types.ts
Original file line number Diff line number Diff line change
@@ -199,14 +199,15 @@ export interface DevApplicationWithForm {
checkedByAdmin: boolean
childId: PersonId
confidential: boolean | null
createdDate: HelsinkiDateTime | null
createdAt: HelsinkiDateTime
createdBy: EvakaUserId
dueDate: LocalDate | null
form: ApplicationForm
formModified: HelsinkiDateTime
guardianId: PersonId
hideFromGuardian: boolean
id: ApplicationId
modifiedDate: HelsinkiDateTime | null
modifiedAt: HelsinkiDateTime
modifiedBy: EvakaUserId
origin: ApplicationOrigin
otherGuardians: PersonId[]
sentDate: LocalDate | null
@@ -1180,11 +1181,10 @@ export function deserializeJsonDevAbsence(json: JsonOf<DevAbsence>): DevAbsence
export function deserializeJsonDevApplicationWithForm(json: JsonOf<DevApplicationWithForm>): DevApplicationWithForm {
return {
...json,
createdDate: (json.createdDate != null) ? HelsinkiDateTime.parseIso(json.createdDate) : null,
createdAt: HelsinkiDateTime.parseIso(json.createdAt),
dueDate: (json.dueDate != null) ? LocalDate.parseIso(json.dueDate) : null,
form: deserializeJsonApplicationForm(json.form),
formModified: HelsinkiDateTime.parseIso(json.formModified),
modifiedDate: (json.modifiedDate != null) ? HelsinkiDateTime.parseIso(json.modifiedDate) : null,
modifiedAt: HelsinkiDateTime.parseIso(json.modifiedAt),
sentDate: (json.sentDate != null) ? LocalDate.parseIso(json.sentDate) : null
}
}
Original file line number Diff line number Diff line change
@@ -48,7 +48,12 @@ export default React.memo(function ApplicationStatusSection({

<Label>{i18n.application.state.modified}</Label>
<span data-qa="application-modified-date">
{application.modifiedDate?.format() ?? ''}
{application.modifiedAt?.format() ?? ''}
</span>

<Label>{i18n.application.state.modifiedBy}</Label>
<span data-qa="application-modified-by-name">
{application.modifiedBy?.name ?? ''}
</span>

<Label inputRow={!!dueDateEditor}>{i18n.application.state.due}</Label>
10 changes: 6 additions & 4 deletions frontend/src/lib-common/generated/api-types/application.ts
Original file line number Diff line number Diff line change
@@ -122,7 +122,8 @@ export interface ApplicationDetails {
childId: PersonId
childRestricted: boolean
confidential: boolean | null
createdDate: HelsinkiDateTime | null
createdAt: HelsinkiDateTime | null
createdBy: EvakaUser | null
dueDate: LocalDate | null
dueDateSetManuallyAt: HelsinkiDateTime | null
form: ApplicationForm
@@ -132,7 +133,8 @@ export interface ApplicationDetails {
hasOtherGuardian: boolean
hideFromGuardian: boolean
id: ApplicationId
modifiedDate: HelsinkiDateTime | null
modifiedAt: HelsinkiDateTime | null
modifiedBy: EvakaUser | null
origin: ApplicationOrigin
otherGuardianLivesInSameAddress: boolean | null
sentDate: LocalDate | null
@@ -831,12 +833,12 @@ export function deserializeJsonApplicationDetails(json: JsonOf<ApplicationDetail
return {
...json,
attachments: json.attachments.map(e => deserializeJsonApplicationAttachment(e)),
createdDate: (json.createdDate != null) ? HelsinkiDateTime.parseIso(json.createdDate) : null,
createdAt: (json.createdAt != null) ? HelsinkiDateTime.parseIso(json.createdAt) : null,
dueDate: (json.dueDate != null) ? LocalDate.parseIso(json.dueDate) : null,
dueDateSetManuallyAt: (json.dueDateSetManuallyAt != null) ? HelsinkiDateTime.parseIso(json.dueDateSetManuallyAt) : null,
form: deserializeJsonApplicationForm(json.form),
guardianDateOfDeath: (json.guardianDateOfDeath != null) ? LocalDate.parseIso(json.guardianDateOfDeath) : null,
modifiedDate: (json.modifiedDate != null) ? HelsinkiDateTime.parseIso(json.modifiedDate) : null,
modifiedAt: (json.modifiedAt != null) ? HelsinkiDateTime.parseIso(json.modifiedAt) : null,
sentDate: (json.sentDate != null) ? LocalDate.parseIso(json.sentDate) : null
}
}
Original file line number Diff line number Diff line change
@@ -579,6 +579,7 @@ export const fi = {
origin: 'Hakemuksen lähetysmuoto',
sent: 'Saapunut',
modified: 'Muokattu viimeksi',
modifiedBy: 'Muokkaaja',
due: 'Käsiteltävä viimeistään'
},
date: {
Original file line number Diff line number Diff line change
@@ -672,8 +672,10 @@ fun Database.Transaction.insertApplication(
guardianId = guardian.id,
guardianRestricted = false,
guardianDateOfDeath = null,
createdDate = HelsinkiDateTime.now(),
modifiedDate = HelsinkiDateTime.now(),
createdAt = HelsinkiDateTime.now(),
createdBy = testDecisionMaker_1.toEvakaUser(),
modifiedAt = HelsinkiDateTime.now(),
modifiedBy = testDecisionMaker_1.toEvakaUser(),
sentDate = null,
dueDate = null,
dueDateSetManuallyAt = null,
Original file line number Diff line number Diff line change
@@ -229,7 +229,7 @@ class GetApplicationIntegrationTests : FullApplicationTest(resetDbBeforeEach = t
db.transaction { tx ->
tx.execute {
sql(
"UPDATE application SET created = '2020-01-01T00:00:00Z' WHERE id = ${bind(old)}"
"UPDATE application SET created_at = '2020-01-01T00:00:00Z' WHERE id = ${bind(old)}"
)
}
}
Original file line number Diff line number Diff line change
@@ -29,7 +29,6 @@ class SchemaConventionsTest : PureJdbiTest(resetDbBeforeEach = false) {
fun `creation timestamp should be called 'created_at' instead of 'created'`() {
val permittedViolations =
setOf(
"application",
"application_form",
"application_note",
"application_other_guardian",
@@ -125,7 +124,6 @@ class SchemaConventionsTest : PureJdbiTest(resetDbBeforeEach = false) {
fun `update timestamp should be called 'updated_at' instead of 'updated'`() {
val permittedViolations =
setOf(
"application",
"application_form",
"application_note",
"application_other_guardian",
@@ -395,7 +393,6 @@ class SchemaConventionsTest : PureJdbiTest(resetDbBeforeEach = false) {
fun `'created_by' column should be 'uuid' and NOT NULL`() {
val permittedViolations =
setOf(
Column(ColumnRef("application", "created_by"), "uuid", nullable = true),
Column(
ColumnRef("assistance_need_decision", "created_by"),
"uuid",
Original file line number Diff line number Diff line change
@@ -121,7 +121,7 @@ class ScheduledJobsTest : FullApplicationTest(resetDbBeforeEach = true) {
) =
tx.execute {
sql(
"UPDATE application SET created = ${bind(created)} WHERE id = ${bind(applicationId)}"
"UPDATE application SET created_at = ${bind(created)} WHERE id = ${bind(applicationId)}"
)
}

20 changes: 14 additions & 6 deletions service/src/integrationTest/kotlin/fi/espoo/evaka/test/TestData.kt
Original file line number Diff line number Diff line change
@@ -23,6 +23,8 @@ import fi.espoo.evaka.shared.domain.HelsinkiDateTime
import fi.espoo.evaka.testAdult_1
import fi.espoo.evaka.testChild_1
import fi.espoo.evaka.testDaycare
import fi.espoo.evaka.testDecisionMaker_1
import fi.espoo.evaka.toEvakaUser
import java.time.LocalDate
import java.time.LocalTime
import java.util.UUID
@@ -50,8 +52,10 @@ private fun applicationDetails(vararg preferredUnits: PreferredUnit, shiftCare:
guardianDateOfDeath = null,
checkedByAdmin = true,
confidential = false,
createdDate = HelsinkiDateTime.of(LocalDate.of(2021, 8, 15), LocalTime.of(12, 0)),
modifiedDate = HelsinkiDateTime.of(LocalDate.of(2021, 8, 15), LocalTime.of(12, 0)),
createdAt = HelsinkiDateTime.of(LocalDate.of(2021, 8, 15), LocalTime.of(12, 0)),
createdBy = testDecisionMaker_1.toEvakaUser(),
modifiedAt = HelsinkiDateTime.of(LocalDate.of(2021, 8, 15), LocalTime.of(12, 0)),
modifiedBy = testDecisionMaker_1.toEvakaUser(),
sentDate = LocalDate.of(2021, 1, 15),
dueDate = null,
dueDateSetManuallyAt = null,
@@ -144,8 +148,10 @@ val validPreschoolApplication =
guardianDateOfDeath = null,
checkedByAdmin = true,
confidential = false,
createdDate = HelsinkiDateTime.of(LocalDate.of(2021, 8, 15), LocalTime.of(12, 0)),
modifiedDate = HelsinkiDateTime.of(LocalDate.of(2021, 8, 15), LocalTime.of(12, 0)),
createdAt = HelsinkiDateTime.of(LocalDate.of(2021, 8, 15), LocalTime.of(12, 0)),
createdBy = testDecisionMaker_1.toEvakaUser(),
modifiedAt = HelsinkiDateTime.of(LocalDate.of(2021, 8, 15), LocalTime.of(12, 0)),
modifiedBy = testDecisionMaker_1.toEvakaUser(),
sentDate = LocalDate.of(2021, 1, 15),
dueDate = null,
dueDateSetManuallyAt = null,
@@ -239,8 +245,10 @@ fun validClubApplication(preferredUnit: DevDaycare, preferredStartDate: LocalDat
guardianDateOfDeath = null,
checkedByAdmin = true,
confidential = false,
createdDate = HelsinkiDateTime.of(LocalDate.of(2021, 8, 15), LocalTime.of(12, 0)),
modifiedDate = HelsinkiDateTime.of(LocalDate.of(2021, 8, 15), LocalTime.of(12, 0)),
createdAt = HelsinkiDateTime.of(LocalDate.of(2021, 8, 15), LocalTime.of(12, 0)),
createdBy = testDecisionMaker_1.toEvakaUser(),
modifiedAt = HelsinkiDateTime.of(LocalDate.of(2021, 8, 15), LocalTime.of(12, 0)),
modifiedBy = testDecisionMaker_1.toEvakaUser(),
sentDate = LocalDate.of(2021, 1, 15),
dueDate = null,
dueDateSetManuallyAt = null,
Original file line number Diff line number Diff line change
@@ -112,8 +112,10 @@ data class ApplicationDetails(
val guardianDateOfDeath: LocalDate?,
val checkedByAdmin: Boolean,
val confidential: Boolean?,
val createdDate: HelsinkiDateTime?,
val modifiedDate: HelsinkiDateTime?,
val createdAt: HelsinkiDateTime?,
val createdBy: EvakaUser?,
val modifiedAt: HelsinkiDateTime?,
val modifiedBy: EvakaUser?,
val sentDate: LocalDate?,
val dueDate: LocalDate?,
val dueDateSetManuallyAt: HelsinkiDateTime?,
Loading