Skip to content

Commit

Permalink
Merge pull request #7397 from opengovsg/release_v6.126.0
Browse files Browse the repository at this point in the history
build: release v6.126.0
  • Loading branch information
KenLSM authored Jun 18, 2024
2 parents 76a530e + a8b0d5d commit bd8902d
Show file tree
Hide file tree
Showing 16 changed files with 169 additions and 49 deletions.
39 changes: 36 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,27 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v6.125.0](https://github.com/opengovsg/FormSG/compare/v6.124.0...v6.125.0)
#### [v6.126.0](https://github.com/opengovsg/FormSG/compare/v6.126.0...v6.126.0)

- revert: "chore(deps-dev): bump braces from 3.0.2 to 3.0.3 in /serverless/virus-scanner" [`#7398`](https://github.com/opengovsg/FormSG/pull/7398)

#### [v6.126.0](https://github.com/opengovsg/FormSG/compare/v6.125.0...v6.126.0)

> 18 June 2024

- build: merge release v6.125.0 to develop [`#7396`](https://github.com/opengovsg/FormSG/pull/7396)
- chore(deps-dev): bump stripe-event-types from 2.3.0 to 3.1.0 [`#7330`](https://github.com/opengovsg/FormSG/pull/7330)
- fix: fix 4xx submission after stripe disconnect [`#7391`](https://github.com/opengovsg/FormSG/pull/7391)
- chore: remove mention of data collation tool on landing and email settings results page [`#7390`](https://github.com/opengovsg/FormSG/pull/7390)
- chore(deps-dev): bump braces from 3.0.2 to 3.0.3 in /serverless/virus-scanner [`#7394`](https://github.com/opengovsg/FormSG/pull/7394)
- fix(deps): bump type-fest from 4.20.0 to 4.20.1 in /shared [`#7393`](https://github.com/opengovsg/FormSG/pull/7393)
- feat: conditionally render sex based on timezone [`#7376`](https://github.com/opengovsg/FormSG/pull/7376)
- build: release v6.125.0 [`#7389`](https://github.com/opengovsg/FormSG/pull/7389)
- chore: bump version to v6.126.0 [`3d1a2f8`](https://github.com/opengovsg/FormSG/commit/3d1a2f899cb441905b5264b05f36b9fd8e5cf27a)

#### [v6.125.0](https://github.com/opengovsg/FormSG/compare/v6.124.1...v6.125.0)

> 13 June 2024

- test(mrf): add cases for sendMRFWorkflowStepEmail [`#7386`](https://github.com/opengovsg/FormSG/pull/7386)
- feat(mrf): add response id to email title [`#7380`](https://github.com/opengovsg/FormSG/pull/7380)
Expand All @@ -18,6 +38,12 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- build: merge release 6.124.1 into develop [`#7371`](https://github.com/opengovsg/FormSG/pull/7371)
- fix: check for truthiness of fieldname in receiver [`#7370`](https://github.com/opengovsg/FormSG/pull/7370)
- build: merge release v6.124.0 into develop [`#7369`](https://github.com/opengovsg/FormSG/pull/7369)
- chore: bump version to v6.125.0 [`756fb88`](https://github.com/opengovsg/FormSG/commit/756fb88671cf5ba22fb28475eea44a06f3c6f79d)

#### [v6.124.1](https://github.com/opengovsg/FormSG/compare/v6.124.0...v6.124.1)

> 7 June 2024

- build: release v6.124.0 [`#7368`](https://github.com/opengovsg/FormSG/pull/7368)
- chore: bump version to v6.124.1 [`08eba07`](https://github.com/opengovsg/FormSG/commit/08eba07169a64e1ba5f42589c05345d32ad91a98)
- check for truthiness of fieldname in receiver [`429e1e9`](https://github.com/opengovsg/FormSG/commit/429e1e9a073da23cc7f329fae11ac4e0f1b7c66c)
Expand Down Expand Up @@ -168,7 +194,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- chore: reverting package-lock changes [`040b962`](https://github.com/opengovsg/FormSG/commit/040b96284ea317de22d9de6cf872fd4116f24c51)
- chore: bump version to v6.117.0 [`6eb4aca`](https://github.com/opengovsg/FormSG/commit/6eb4aca28514e3286c23c0834f9962de291a7fbc)

#### [v6.116.0](https://github.com/opengovsg/FormSG/compare/v6.115.0...v6.116.0)
#### [v6.116.0](https://github.com/opengovsg/FormSG/compare/v6.115.1...v6.116.0)

> 8 April 2024

Expand All @@ -179,10 +205,17 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- fix(mrf): webhook be validation [`#7247`](https://github.com/opengovsg/FormSG/pull/7247)
- chore: move react-dev-inspector to frontend/package.json [`#7245`](https://github.com/opengovsg/FormSG/pull/7245)
- refactor: add exhaustive checks, use answerArray for arrays [`#7244`](https://github.com/opengovsg/FormSG/pull/7244)
- * chore(deps-dev): bump @types/express from 4.17.17 to 4.17.21 (#7233) [`#7241`](https://github.com/opengovsg/FormSG/pull/7241)
- fix(deps): bump type-fest from 4.14.0 to 4.15.0 in /shared [`#7243`](https://github.com/opengovsg/FormSG/pull/7243)
- chore: bump version to v6.116.0 [`31e1a33`](https://github.com/opengovsg/FormSG/commit/31e1a33c96d76b69c492f5212bc48a3dabe054af)

#### [v6.115.1](https://github.com/opengovsg/FormSG/compare/v6.115.0...v6.115.1)

> 5 April 2024

- * chore(deps-dev): bump @types/express from 4.17.17 to 4.17.21 (#7233) [`#7241`](https://github.com/opengovsg/FormSG/pull/7241)
- fix: add check to block webhooks updates on mrf [`71ab0c5`](https://github.com/opengovsg/FormSG/commit/71ab0c592c15de5fddbffc9970a424af7a31d4ab)
- chore: bump version to 6.115.1 [`7d127b2`](https://github.com/opengovsg/FormSG/commit/7d127b2e8353a8a282acabe1c309cefb1e750f9c)

#### [v6.115.0](https://github.com/opengovsg/FormSG/compare/v6.114.1...v6.115.0)

> 3 April 2024
Expand Down
4 changes: 2 additions & 2 deletions frontend/package-lock.json

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

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "form-frontend",
"version": "6.125.0",
"version": "6.126.0",
"homepage": ".",
"private": true,
"dependencies": {
Expand Down
1 change: 0 additions & 1 deletion frontend/src/constants/links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ export const LANDING_PAGE_EXAMPLE_FORMS = [

export const OGP_ALL_PRODUCTS = 'https://www.open.gov.sg/products/overview'
export const OGP_POSTMAN = 'https://postman.gov.sg'
export const OGP_FORMSG_COLLATE = 'https://collate.form.gov.sg'
export const OGP_SGID = 'https://go.gov.sg/sgid-formsg'

export const OGP_FORMSG_REPO = 'https://github.com/opengovsg/formsg'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { BiCheck, BiData, BiX } from 'react-icons/bi'
import { HStack, Icon, Text, VStack } from '@chakra-ui/react'
import { Box, HStack, Icon, Text, VStack } from '@chakra-ui/react'

import { MyInfoField } from '~shared/types'

import { SINGPASS_FAQ } from '~constants/links'
import InlineMessage from '~components/InlineMessage'
import Link from '~components/Link'

import {
Expand Down Expand Up @@ -44,9 +45,34 @@ export const EditMyInfo = ({ field }: EditMyInfoProps): JSX.Element => {
},
})

function conditionallyDisplayInfoBox() {
const currentDate = new Date().toLocaleString('en-US', {
timeZone: 'Asia/Singapore',
})
const targetDate = new Date('2024-06-28T00:00:00').toLocaleString('en-US', {
timeZone: 'Asia/Singapore',
})

if (new Date(currentDate) <= new Date(targetDate)) {
return (
<>
<Box pb="1.5rem">
<InlineMessage variant="warning">
To align with MyInfo terminology, the “Gender” field will be
renamed to “Sex” from 1 Jul 2024.
</InlineMessage>
</Box>{' '}
</>
)
} else {
return null
}
}

return (
<CreatePageDrawerContentContainer>
<VStack align="flex-start">
{conditionallyDisplayInfoBox()}
<Text textStyle="subhead-1">Data source</Text>
{extendedField.dataSource.map((dataSource, idx) => (
<HStack key={idx} align="flex-start">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { MyInfoChildAttributes } from '~shared/types'

import { SINGPASS_FAQ } from '~constants/links'
import { MultiSelect } from '~components/Dropdown'
import InlineMessage from '~components/InlineMessage'
import Link from '~components/Link'
import { Toggle } from '~components/Toggle/Toggle'

Expand Down Expand Up @@ -60,9 +61,34 @@ export const EditMyInfoChildren = ({
},
})

function conditionallyDisplayInfoBox() {
const currentDate = new Date().toLocaleString('en-US', {
timeZone: 'Asia/Singapore',
})
const targetDate = new Date('2024-06-28T00:00:00').toLocaleString('en-US', {
timeZone: 'Asia/Singapore',
})

if (new Date(currentDate) <= new Date(targetDate)) {
return (
<>
<Box pb="1.5rem">
<InlineMessage variant="warning">
To align with MyInfo terminology, the “Gender” field will be
renamed to “Sex” from 1 Jul 2024.
</InlineMessage>
</Box>{' '}
</>
)
} else {
return null
}
}

return (
<CreatePageDrawerContentContainer>
<VStack align="flex-start">
{conditionallyDisplayInfoBox()}
<Text textStyle="subhead-1">Data source</Text>
{extendedField.dataSource.map((dataSource, idx) => (
<HStack key={idx} align="flex-start">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
AdminStorageFormDto,
PaymentsUpdateDto,
} from '~shared/types/form'
import { PAYMENT_DELETE_DEFAULT } from '~shared/utils/payments'

import { useToast } from '~hooks/useToast'

Expand Down Expand Up @@ -36,12 +37,6 @@ export const useDeleteFormField = () => {
const { formId } = useParams()
if (!formId) throw new Error('No formId provided')

const paymentDeleteDefault: PaymentsUpdateDto = {
enabled: false,
payment_type: PaymentType.Products,
products: [],
}

const { stateData, setToInactive } = useFieldBuilderStore(
useCallback(
(state) => ({
Expand Down Expand Up @@ -114,7 +109,7 @@ export const useDeleteFormField = () => {
)

const deletePaymentFieldMutation = useMutation(
() => updateFormPayments(formId, paymentDeleteDefault),
() => updateFormPayments(formId, PAYMENT_DELETE_DEFAULT),
{
onSuccess: (newData) => {
toast.closeAll()
Expand Down
21 changes: 21 additions & 0 deletions frontend/src/features/admin-form/create/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,3 +361,24 @@ export const MYINFO_FIELD_TO_DRAWER_META: {
isSubmitted: true,
},
}
// TODO: remove after 28 Jun 2024 as this would have fully taken effect
function updateLabelsBasedOnDate() {
const currentDate = new Date().toLocaleString('en-US', {
timeZone: 'Asia/Singapore',
})
const targetDate = new Date('2024-06-28T00:00:00').toLocaleString('en-US', {
timeZone: 'Asia/Singapore',
})
if (new Date(currentDate) >= new Date(targetDate)) {
const sexAttribute = MYINFO_FIELD_TO_DRAWER_META[MyInfoAttribute.Sex]
if (sexAttribute) {
sexAttribute.label = 'Sex'
}
const childGenderAttribute =
MYINFO_FIELD_TO_DRAWER_META[MyInfoAttribute.ChildGender]
if (childGenderAttribute) {
childGenderAttribute.label = 'Sex'
}
}
}
updateLabelsBasedOnDate()
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { Container, Skeleton, Stack, Text } from '@chakra-ui/react'
import simplur from 'simplur'

import { OGP_FORMSG_COLLATE } from '~constants/links'
import Link from '~components/Link'

import { useFormResponsesCount } from '../../queries'
import { EmptyResponses } from '../common/EmptyResponses'

Expand All @@ -30,12 +27,7 @@ export const EmailResponsesTab = (): JSX.Element => {
</Text>
</Skeleton>
<Text textStyle="body-1">
FormSG does not store responses in Email mode. To collate the
responses in your Outlook Inbox, use the{' '}
<Link isExternal href={OGP_FORMSG_COLLATE}>
Data Collation Tool
</Link>
.
FormSG does not store responses in Email mode.
</Text>
</Stack>
</Container>
Expand Down
7 changes: 6 additions & 1 deletion frontend/src/features/admin-form/settings/mutations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ import {
StorageFormSettings,
} from '~shared/types/form/form'
import { TwilioCredentials } from '~shared/types/twilio'
import { PAYMENT_DELETE_DEFAULT } from '~shared/utils/payments'

import { ApiError } from '~typings/core'

import { GUIDE_PREVENT_EMAIL_BOUNCE } from '~constants/links'
import { useToast } from '~hooks/useToast'
import { formatOrdinal } from '~utils/stringFormat'

import { updateFormPayments } from '../common/AdminFormPageService'
import { adminFormKeys } from '../common/queries'

import { adminFormSettingsKeys } from './queries'
Expand Down Expand Up @@ -424,7 +426,10 @@ export const useMutateStripeAccount = () => {
)

const unlinkStripeAccountMutation = useMutation(
() => unlinkStripeAccount(formId),
() => {
updateFormPayments(formId, PAYMENT_DELETE_DEFAULT)
return unlinkStripeAccount(formId)
},
{
onSuccess: () => {
queryClient.invalidateQueries(adminFormKeys.id(formId))
Expand Down
14 changes: 1 addition & 13 deletions frontend/src/pages/Landing/Home/LandingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,9 @@ import {
GUIDE_TRANSFER_OWNERSHIP,
LANDING_PAGE_EXAMPLE_FORMS,
OGP_ALL_PRODUCTS,
OGP_FORMSG_COLLATE,
OGP_FORMSG_REPO,
} from '~constants/links'
import {
LANDING_PAYMENTS_ROUTE,
LOGIN_ROUTE,
TOU_ROUTE,
} from '~constants/routes'
import { LOGIN_ROUTE, TOU_ROUTE } from '~constants/routes'
import { useIsMobile } from '~hooks/useIsMobile'
import { useMdComponents } from '~hooks/useMdComponents'
import Button from '~components/Button'
Expand Down Expand Up @@ -496,13 +491,6 @@ export const LandingPage = (): JSX.Element => {
<OrderedListIcon index={4} />
Collect responses at your email address
</ListItem>
<ListItem textStyle="body-2">
<OrderedListIcon index={5} />
Collate responses with our{' '}
<Link isExternal href={OGP_FORMSG_COLLATE}>
data collation tool
</Link>
</ListItem>
</OrderedList>
</TabPanel>
</TabPanels>
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "FormSG",
"description": "Form Manager for Government",
"version": "6.125.0",
"version": "6.126.0",
"homepage": "https://form.gov.sg",
"authors": [
"FormSG <[email protected]>"
Expand Down Expand Up @@ -235,7 +235,7 @@
"prettier": "^3.2.5",
"regenerator": "^0.14.10",
"rimraf": "^5.0.5",
"stripe-event-types": "^2.3.0",
"stripe-event-types": "^3.1.0",
"supertest": "^6.3.3",
"supertest-session": "^4.1.0",
"ts-jest": "^29.1.2",
Expand Down
Loading

0 comments on commit bd8902d

Please sign in to comment.