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

feat(abp2a): add webform ABP 2a #416

Merged
merged 46 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
c7ef311
push up new api endpoint
jdinh8124 Feb 22, 2024
ff7787a
add logs
jdinh8124 Feb 22, 2024
9a8131a
Update getForm.ts
jdinh8124 Feb 22, 2024
09f896a
capitalize letter
jdinh8124 Feb 22, 2024
ce2111a
lowercase
jdinh8124 Feb 23, 2024
373a5f8
Update getForm.ts
jdinh8124 Feb 23, 2024
07594ef
Update getForm.ts
jdinh8124 Feb 23, 2024
825f0ba
adjust letter
jdinh8124 Feb 23, 2024
9941291
Update v202401.ts
jdinh8124 Feb 23, 2024
46c95ff
Update v202401.ts
jdinh8124 Feb 26, 2024
bafda99
Update v202401.ts
jdinh8124 Feb 26, 2024
809a4cc
adjust
jdinh8124 Feb 26, 2024
75f33de
run
jdinh8124 Feb 26, 2024
437d7a7
add back
jdinh8124 Feb 26, 2024
7914733
Update v202401.ts
jdinh8124 Feb 26, 2024
0e98997
Update v202401.ts
jdinh8124 Feb 29, 2024
e6c05aa
add required logic
jdinh8124 Feb 29, 2024
9298312
cleanup
jdinh8124 Feb 29, 2024
773f5e0
additional clean up
jdinh8124 Feb 29, 2024
f1e5895
Merge branch 'master' into zebra
jdinh8124 Feb 29, 2024
224e11c
Merge branch 'master' into zebra
jdinh8124 Mar 14, 2024
a699590
add linebreak logic
jdinh8124 Mar 14, 2024
f601569
Update Slot.tsx
jdinh8124 Mar 14, 2024
c90de51
Merge branch 'master' into zebra
jdinh8124 Mar 15, 2024
424c24b
push up name changes
jdinh8124 Mar 21, 2024
cf60646
clean up
jdinh8124 Mar 25, 2024
4ea7dac
cleanup
jdinh8124 Mar 25, 2024
bba3bc6
clean up
jdinh8124 Mar 25, 2024
5070caa
Create index.ts
jdinh8124 Mar 25, 2024
18cabe9
Merge branch 'master' into zebra
jdinh8124 Mar 26, 2024
b81f112
commit
jdinh8124 Mar 26, 2024
f64c5ac
update
jdinh8124 Mar 26, 2024
aa1d637
Merge branch 'zebra' of https://github.com/Enterprise-CMCS/macpro-mak…
jdinh8124 Mar 26, 2024
af4acec
Update index.ts
jdinh8124 Mar 26, 2024
99245ca
editing
jdinh8124 Mar 26, 2024
c479c98
adjust logic
jdinh8124 Mar 26, 2024
a78689f
Update WebformsList.tsx
jdinh8124 Mar 26, 2024
db939f7
regex
jdinh8124 Mar 26, 2024
22ed0e1
unsure of styling
jdinh8124 Mar 26, 2024
f61f4e2
Update v202401.ts
jdinh8124 Mar 27, 2024
50cc04c
change spacing
jdinh8124 Mar 27, 2024
f4d2513
Merge branch 'master' into zebra
jdinh8124 Mar 27, 2024
0515125
Merge branch 'master' into zebra
jdinh8124 Mar 27, 2024
d32ec50
Merge branch 'master' into zebra
jdinh8124 Mar 28, 2024
fbd39a8
Update v202401.ts
jdinh8124 Apr 2, 2024
1716338
Merge branch 'master' into zebra
jdinh8124 Apr 4, 2024
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
9 changes: 8 additions & 1 deletion src/packages/shared-types/forms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,14 @@ export type RHFTextListItem = {
link?: string;
};

type RHFTextItemType = "br" | "brWrap" | "link" | "bold" | "italic" | "list";
type RHFTextItemType =
| "br"
| "brWrap"
| "link"
| "bold"
| "italic"
| "list"
| "default";

export type RHFOption = {
label: string;
Expand Down
2 changes: 1 addition & 1 deletion src/services/api/handlers/getForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const getForm = async (event: APIGatewayEvent) => {
}

if (id && version) {
const formObj = await webformVersions[id][version];
const formObj = webformVersions[id][version];
const cleanedForm = convertRegexToString(formObj);
return response({
statusCode: 200,
Expand Down
1 change: 1 addition & 0 deletions src/services/api/webforms/ABP2A/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./v202401";
363 changes: 363 additions & 0 deletions src/services/api/webforms/ABP2A/v202401.ts

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/services/api/webforms/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as ABP1 from "./ABP1";
import * as ABP2A from "./ABP2A";
import * as ABP10 from "./ABP10";
import * as ABP11 from "./ABP11";
import * as ABP3 from "./ABP3";
Expand All @@ -10,6 +11,9 @@ export const webformVersions: Record<string, Record<string, FormSchema>> = {
v202401: ABP1.v202401,
v202402: ABP1.v202402,
},
ABP2A: {
v202401: ABP2A.v202401,
},
ABP3: {
v202401: ABP3.v202401,
},
Expand Down
1 change: 1 addition & 0 deletions src/services/ui/e2e/tests/a11y/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const webformRoutes = [
"/webform/abp10/202401",
"/webform/abp3_1/202401",
"/webform/abp3/202401",
"/webform/abp2a/202401",
"/webform/abp1/202401",
"/webform/abp1/202402",
];
Expand Down
4 changes: 2 additions & 2 deletions src/services/ui/src/components/Inputs/checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ const Checkbox = React.forwardRef<
</CheckboxPrimitive.Indicator>
</CheckboxPrimitive.Root>
<div className="grid gap-1.5 leading-none">
{!!props.label && (
{!!(props.label || props.styledLabel) && (
<label
htmlFor={props.label}
htmlFor={props.label ?? props.styledLabel}
className="text-md font-medium leading-normal peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
>
{props.styledLabel ?? props.label}
Expand Down
9 changes: 7 additions & 2 deletions src/services/ui/src/features/webforms/WebformsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ export const WebformsList = () => {
Object.entries(data).map(([key, versions]) =>
versions.map((version) => (
<tr key={`${key}-${version}`}>
<td>{key}</td>
<td>
{key.slice(0, -1) +
(key.slice(-1).match(/[a-zA-Z]/)
? key.slice(-1).toLowerCase()
: key.slice(-1))}
</td>{" "}
<td>{version}</td>
<td>
<Link
Expand All @@ -42,7 +47,7 @@ export const WebformsList = () => {
</Link>
</td>
</tr>
))
)),
)}
</tbody>
</table>
Expand Down
Loading