Skip to content

Commit

Permalink
Revert "[Release] Version 0.0.7"
Browse files Browse the repository at this point in the history
This reverts commit 3f2d160.
  • Loading branch information
leogjhuang committed Apr 29, 2023
1 parent 3f2d160 commit 5047a6c
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 189 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

strategy:
matrix:
os: [ubuntu-20.04]
os: [ubuntu-latest]
node: [14.17.0]

steps:
Expand Down
91 changes: 0 additions & 91 deletions CONTRIBUTING.md

This file was deleted.

34 changes: 0 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,40 +52,6 @@ applicant-facing application portal and an internal user/APP management portal.

## Run locally

1. Start database

```bash
docker-compose up --build
```

2. Run the application

```bash
yarn install
npx prisma generate
yarn dev
```

3. Deploy prisma schema

```bash
npx prisma db push
```

4. Seed database

```bash
npx prisma db seed --preview-feature
```

5. Verify database

```bash
docker exec -it rcd_db /bin/bash -c "psql -U postgres -d rcd"
```

## Run locally (Heroku)

Duplicate `.env.sample` to `.env` and configure environment variables.

To deploy your database schema, run:
Expand Down
4 changes: 2 additions & 2 deletions components/admin/requests/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import ShopifyBadge from '@components/admin/ShopifyBadge';
import PermitTypeBadge from '@components/admin/PermitTypeBadge';
import { ApplicationStatus, ApplicationType, PermitType } from '@lib/graphql/types';
import { titlecase } from '@tools/string';
import { formatDateYYYYMMDD, formatDateYYYYMMDDLocal } from '@lib/utils/date';
import { formatDateYYYYMMDD } from '@lib/utils/date';
import { getPermanentPermitExpiryDate } from '@lib/utils/permit-expiry';

type RequestHeaderProps = {
Expand Down Expand Up @@ -85,7 +85,7 @@ export default function RequestHeader({
</Flex>
<HStack spacing={3} marginTop={3}>
<Text textStyle="caption" as="p">
Received on {formatDateYYYYMMDDLocal(createdAt)} at{' '}
Received on {formatDateYYYYMMDD(createdAt)} at{' '}
{createdAt.toLocaleTimeString('en-CA')}
</Text>
</HStack>
Expand Down
4 changes: 2 additions & 2 deletions components/admin/requests/reason-for-replacement/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Box, Text, SimpleGrid, Button } from '@chakra-ui/react'; // Chakra UI
import PermitHolderInfoCard from '@components/admin/LayoutCard'; // Custom Card Component
import EditReasonForReplacementModal from '@components/admin/requests/reason-for-replacement/EditModal'; // Edit modal
import { reasonForReplacementFormSchema } from '@lib/applications/validation';
import { formatDateYYYYMMDDLocal } from '@lib/utils/date';
import { formatDateYYYYMMDD } from '@lib/utils/date';
import {
GetReasonForReplacementRequest,
GetReasonForReplacementResponse,
Expand Down Expand Up @@ -97,7 +97,7 @@ export default function ReasonForReplacementCard(props: ReplacementProps) {
<InfoSection title={`Cause`}>{titlecase(reason)}</InfoSection>
{lostTimestamp && (
<InfoSection title={`Event Timestamp`}>
{formatDateYYYYMMDDLocal(new Date(lostTimestamp), true)}
{formatDateYYYYMMDD(new Date(lostTimestamp), true)}
</InfoSection>
)}
{lostLocation && <InfoSection title={`Location Lost`}>{lostLocation}</InfoSection>}
Expand Down
20 changes: 0 additions & 20 deletions docker-compose.yml

This file was deleted.

8 changes: 2 additions & 6 deletions lib/reports/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ import {
} from '@lib/graphql/types';
import { SortOrder } from '@tools/types';
import { formatFullName, formatPhoneNumber, formatPostalCode } from '@lib/utils/format'; // Formatting utils
import {
formatDateTimeYYYYMMDDHHMMSS,
formatDateYYYYMMDD,
formatDateYYYYMMDDLocal,
} from '@lib/utils/date'; // Formatting utils
import { formatDateTimeYYYYMMDDHHMMSS, formatDateYYYYMMDD } from '@lib/utils/date'; // Formatting utils
import { APPLICATIONS_COLUMNS, PERMIT_HOLDERS_COLUMNS } from '@tools/admin/reports';
import { Prisma } from '@prisma/client';
import { getSignedUrlForS3, serverUploadToS3 } from '@lib/utils/s3-utils';
Expand Down Expand Up @@ -268,7 +264,7 @@ export const generateApplicationsReport: Resolver<
...application,
id: applicant?.id,
dateOfBirth: dateOfBirth && formatDateYYYYMMDD(dateOfBirth),
applicationDate: createdAt ? formatDateYYYYMMDDLocal(createdAt, true) : null,
applicationDate: createdAt ? formatDateYYYYMMDD(createdAt, true) : null,
applicantName: formatFullName(firstName, middleName, lastName),
processingFee: `$${processingFee}`,
donationAmount: `$${donationAmount}`,
Expand Down
11 changes: 0 additions & 11 deletions lib/utils/date.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,6 @@ export const formatDateYYYYMMDD = (d: Date, withTime = false): string => {
return moment.utc(d).format(formatString);
};

/**
* Format date to be in YYYY-MM-DD format and in local time zone
* @param {Date} date date to be formatted
* @param {boolean} withTime whether to include time in formatted date
* @returns {string} formatted date
*/
export const formatDateYYYYMMDDLocal = (d: Date, withTime = false): string => {
const formatString = withTime ? 'YYYY-MM-DD, hh:mm a' : 'YYYY-MM-DD';
return moment(d).format(formatString);
};

/**
* Format date to be in written in the following format: Sep 11 2021, 03:07 pm not converting to the local timezone
* @param {Date} date date to be formatted
Expand Down
4 changes: 2 additions & 2 deletions pages/admin/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import { ApplicationStatus, ApplicationType, PermitType } from '@lib/graphql/typ
import useDebounce from '@tools/hooks/useDebounce'; // Debounce hook
import { Column } from 'react-table';
import { formatFullName } from '@lib/utils/format'; // String formatter util
import { formatDateYYYYMMDDLocal } from '@lib/utils/date'; // Date Formatter Util
import { formatDateYYYYMMDD } from '@lib/utils/date'; // Date Formatter Util
import GenerateReportModal from '@components/admin/requests/reports/GenerateModal'; // Generate report modal
import EmptyMessage from '@components/EmptyMessage';

Expand Down Expand Up @@ -82,7 +82,7 @@ const COLUMNS: Column<ApplicationRow>[] = [
width: 240,
sortDescFirst: true,
Cell: ({ value }) => {
return <Text>{formatDateYYYYMMDDLocal(value, true)}</Text>;
return <Text>{formatDateYYYYMMDD(value, true)}</Text>;
},
},
{
Expand Down
20 changes: 0 additions & 20 deletions prisma/dev-seed-utils/employees.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,26 +59,6 @@ const employees = [
lastName: 'Tsai',
email: 'carelynntsai+employee@uwblueprint.org',
},
{
firstName: 'Leo',
lastName: 'Huang',
email: 'leohuang+employee@uwblueprint.org',
},
{
firstName: 'Sherry',
lastName: 'Li',
email: 'sherryli+employee@uwblueprint.org',
},
{
firstName: 'Chinemerem',
lastName: 'Chigbo',
email: 'chinemeremchigbo+employee@uwblueprint.org',
},
{
firstName: 'Adil',
lastName: 'Kapadia',
email: 'adilkapadia+employee@uwblueprint.org',
},
];

/**
Expand Down

0 comments on commit 5047a6c

Please sign in to comment.