Skip to content

Commit

Permalink
Merge pull request #325 from dfpc-coe/accessibility
Browse files Browse the repository at this point in the history
Text Accessibility
  • Loading branch information
ingalls authored Sep 5, 2024
2 parents 94d98f8 + eb6080b commit 4b9ebc6
Show file tree
Hide file tree
Showing 14 changed files with 2,254 additions and 84 deletions.
6 changes: 6 additions & 0 deletions api/lib/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ export enum Layer_Priority {
OFF = 'off'
}

export enum Profile_Text {
Small = 'Small',
Medium = 'Medium',
Large = 'Large'
}

export enum Profile_Stale {
Immediate = 'Immediate',
TenMinutes = '10 Minutes',
Expand Down
3 changes: 2 additions & 1 deletion api/lib/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { geometry, GeometryType } from '@openaddresses/batch-generic';
import { ConnectionAuth } from './connection-config.js';
import { TAKGroup, TAKRole } from './api/types.js';
import { Layer_Config } from './models/Layer.js';
import { Layer_Priority, Profile_Stale, Profile_Speed, Profile_Elevation, Profile_Distance } from './enums.js';
import { Layer_Priority, Profile_Stale, Profile_Speed, Profile_Elevation, Profile_Distance, Profile_Text } from './enums.js';
import { json, boolean, numeric, integer, timestamp, pgTable, serial, varchar, text, unique, index } from 'drizzle-orm/pg-core';

/** Internal Tables for Postgis for use with drizzle-kit push:pg */
Expand Down Expand Up @@ -36,6 +36,7 @@ export const Profile = pgTable('profile', {
display_distance: text('display_distance').$type<Profile_Distance>().notNull().default(Profile_Distance.MILE),
display_elevation: text('display_elevation').$type<Profile_Elevation>().notNull().default(Profile_Elevation.FEET),
display_speed: text('display_speed').$type<Profile_Speed>().notNull().default(Profile_Speed.MPH),
display_text: text('display_text').$type<Profile_Text>().notNull().default(Profile_Text.Medium),
system_admin: boolean('system_admin').notNull().default(false),
agency_admin: json('agency_admin').notNull().$type<Array<number>>().default([])
});
Expand Down
1 change: 1 addition & 0 deletions api/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export const ProfileResponse = Type.Object({
tak_role: Type.Enum(TAKRole),
tak_loc: Type.Any(),
display_stale: Type.String(),
display_text: Type.String(),
display_distance: Type.String(),
display_elevation: Type.String(),
display_speed: Type.String()
Expand Down
1 change: 1 addition & 0 deletions api/migrations/0059_gorgeous_vector.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "profile" ADD COLUMN "display_text" text DEFAULT 'Medium' NOT NULL;
Loading

0 comments on commit 4b9ebc6

Please sign in to comment.