Skip to content

Commit

Permalink
Remove pending field dependency for TEC (#575)
Browse files Browse the repository at this point in the history
* Remove pending field dependency for TEC

* Remove script

* Remove pending field
  • Loading branch information
patriciaahuang authored Feb 12, 2024
1 parent 2e9ce35 commit 3258405
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion backend/src/API/teamEventsAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export const requestTeamEventCredit = async (
`User with email ${user.email} cannot request team event credit for another member, ${request.member.email}.`
);
}
const updatedteamEvent = { ...request, pending: true, status: 'pending' as Status };
const updatedteamEvent = { ...request, status: 'pending' as Status };
const teamEventAttendance = await teamEventAttendanceDao.createTeamEventAttendance(
updatedteamEvent
);
Expand Down
1 change: 0 additions & 1 deletion backend/src/dao/TeamEventAttendanceDao.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export default class TeamEventAttendanceDao extends BaseDao<
): Promise<TeamEventAttendance> {
const teamEventAttendanceWithUUID = {
...teamEventAttendance,
pending: true,
status: 'pending' as Status,
uuid: teamEventAttendance.uuid ? teamEventAttendance.uuid : uuidv4()
};
Expand Down
1 change: 0 additions & 1 deletion backend/src/types/DataTypes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export type DBTeamEventAttendance = {
hoursAttended?: number;
image: string;
eventUuid: string;
pending: boolean;
status: Status;
reason: string;
uuid: string;
Expand Down
1 change: 0 additions & 1 deletion common-types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ interface TeamEventAttendance {
hoursAttended?: number;
image: string;
readonly eventUuid: string;
readonly pending: boolean;
readonly status: Status;
readonly reason: string;
readonly uuid: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const TeamEventCreditReview = (props: {
const approveCreditRequest = (teamEventAttendance: TeamEventAttendance) => {
const updatedTeamEventAttendance = {
...teamEventAttendance,
pending: false,
status: 'approved' as Status,
reason
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ const TeamEventCreditForm: React.FC = () => {
hoursAttended: teamEvent.hasHours ? Number(hours) : undefined,
image: `eventProofs/${getNetIDFromEmail(userInfo.email)}/${new Date().toISOString()}`,
eventUuid: teamEvent.uuid,
pending: true,
status: 'pending' as Status,
reason: '',
uuid: ''
Expand Down

0 comments on commit 3258405

Please sign in to comment.