From 862f669689d3320ca5c582a48b1e232b7d16987d Mon Sep 17 00:00:00 2001
From: Borghild Selle <104756130+BorghildSelle@users.noreply.github.com>
Date: Fri, 22 Nov 2024 13:19:20 +0100
Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20=20Add=20Onboarding=20option=20to?=
=?UTF-8?q?=20career=20contact=20form=20#2660=20(#2688)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* :art: change category and add as ci with mandatory following input
* :art: correct validate
* :art: try change validation mode
* :art: rewrite issue was elsewhere
* :art: fix selects and labels
* :art: update ci
* :art: update ci this time
---
.vscode/settings.json | 7 +-
sanityv3/schemas/textSnippets.ts | 16 ++++-
.../topicPages/Form/CareerFairForm.tsx | 27 ++++----
.../topicPages/Form/ContactEquinorForm.tsx | 11 +--
.../topicPages/Form/PensionForm.tsx | 7 +-
.../topicPages/Form/SubscribeForm.tsx | 1 +
.../careersContactForm/CareersContactForm.tsx | 69 +++++++++++++++----
.../Form/careersContactForm/getRequestType.ts | 5 ++
.../api/forms/service-now-careers-contact.ts | 2 +
web/types/types.ts | 8 ++-
10 files changed, 112 insertions(+), 41 deletions(-)
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 6b95b3110..40b625ca3 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,12 +1,11 @@
{
- "cssvar.files": [
- "./web/styles/settings.ts"
- ],
+ "cssvar.files": ["./web/styles/settings.ts"],
"azureFunctions.deploySubpath": ".",
"azureFunctions.postDeployTask": "npm install (functions)",
"azureFunctions.projectLanguage": "TypeScript",
"azureFunctions.projectRuntime": "~4",
"debug.internalConsoleOptions": "neverOpen",
"azureFunctions.preDeployTask": "npm prune (functions)",
- "typescript.tsdk": "node_modules/typescript/lib"
+ "typescript.tsdk": "node_modules/typescript/lib",
+ "compile-hero.disable-compile-files-on-did-save-code": false
}
diff --git a/sanityv3/schemas/textSnippets.ts b/sanityv3/schemas/textSnippets.ts
index 8c7f0338a..03737479b 100644
--- a/sanityv3/schemas/textSnippets.ts
+++ b/sanityv3/schemas/textSnippets.ts
@@ -493,9 +493,9 @@ const snippets: textSnippet = {
defaultValue: 'Location',
group: groups.careerContactForm,
},
- careers_contact_form_thesis_writing: {
- title: 'Thesis writing',
- defaultValue: 'Thesis writing',
+ careers_contact_form_onboarding: {
+ title: 'Onboarding',
+ defaultValue: 'Onboarding',
group: groups.careerContactForm,
},
careers_contact_form_questions_related_to_position: {
@@ -523,6 +523,11 @@ const snippets: textSnippet = {
defaultValue: 'Please enter your phone number',
group: groups.careerContactForm,
},
+ careers_contact_form_positionId_validation: {
+ title: 'Position ID validation',
+ defaultValue: 'Please enter a position ID or name',
+ group: groups.careerContactForm,
+ },
careers_contact_form_phone_placeholder: {
title: 'Phone Number placeholder',
defaultValue: 'Country code and phone number',
@@ -594,6 +599,11 @@ const snippets: textSnippet = {
defaultValue: 'Sending...',
group: groups.form,
},
+ form_please_select_an_option: {
+ title: 'Please select an option',
+ defaultValue: 'Please select an option',
+ group: groups.form,
+ },
form_failure_title: {
title: 'Failure title',
defaultValue: 'Sorry, something went wrong!',
diff --git a/web/pageComponents/topicPages/Form/CareerFairForm.tsx b/web/pageComponents/topicPages/Form/CareerFairForm.tsx
index 140833009..20a2371d2 100644
--- a/web/pageComponents/topicPages/Form/CareerFairForm.tsx
+++ b/web/pageComponents/topicPages/Form/CareerFairForm.tsx
@@ -41,10 +41,7 @@ const CareerFairForm = () => {
email: '',
contactPerson: '',
phone: '',
- event: intl.formatMessage({
- id: 'career_fair_form_invite_career_fair',
- defaultMessage: 'Invite Equinor to a career fair or student event',
- }),
+ event: '',
eventDescription: '',
website: '',
supportingDocuments: '',
@@ -112,10 +109,10 @@ const CareerFairForm = () => {
: undefined}
@@ -137,10 +134,10 @@ const CareerFairForm = () => {
: undefined}
@@ -169,10 +166,10 @@ const CareerFairForm = () => {
{
aria-describedby="select-helper-text-${id}"
label={intl.formatMessage({ id: 'career_fair_form_event', defaultMessage: 'Event' })}
>
+
diff --git a/web/pageComponents/topicPages/Form/PensionForm.tsx b/web/pageComponents/topicPages/Form/PensionForm.tsx
index d9919044c..4cbdd38ca 100644
--- a/web/pageComponents/topicPages/Form/PensionForm.tsx
+++ b/web/pageComponents/topicPages/Form/PensionForm.tsx
@@ -79,7 +79,7 @@ const PensionForm = () => {
name: '',
email: '',
phone: '',
- pensionCategory: intl.formatMessage({ id: 'pension_form_select_topic', defaultMessage: 'Select topic' }),
+ pensionCategory: '',
requests: '',
},
})
@@ -185,7 +185,10 @@ const PensionForm = () => {
})}
>