Skip to content

Commit

Permalink
Merge pull request #28 from AAP9002/changes-after-merging-check-in-link
Browse files Browse the repository at this point in the history
Changes after merging check in link
  • Loading branch information
AAP9002 authored Nov 18, 2023
2 parents f187827 + 3fd4f24 commit 0ac6f1a
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 30 deletions.
Binary file removed .DS_Store
Binary file not shown.
8 changes: 5 additions & 3 deletions client/.gitignore → .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
*/node_modules
*/.pnp
.pnp.js

# testing
/coverage

# production
/build
*/build

# misc
.DS_Store
Expand All @@ -21,3 +21,5 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

*.env
17 changes: 4 additions & 13 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"@testing-library/user-event": "^13.5.0",
"add-to-calendar-button-react": "^2.4.3",
"bootstrap": "^5.3.2",
"esm": "^3.2.25",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "^5.0.1",
Expand Down
Binary file removed server/.DS_Store
Binary file not shown.
2 changes: 0 additions & 2 deletions server/.gitignore

This file was deleted.

4 changes: 2 additions & 2 deletions server/features/addcheckinLinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/

function insertCheckInLink(cal) {
console.log("test")
//console.log("test")

/*
const eventDescriptionPattern = /(DESCRIPTION:Event type:.*?\\n)(Location:.*?\\n)/gs;
Expand All @@ -26,7 +26,7 @@ function insertCheckInLink(cal) {
if (cal.match(descriptionPattern)) {
//return cal.replace(eventDescriptionPattern, `$1\n${checkInLink}$2`);
cal = cal.replace(descriptionPattern, `${checkInLink}`);
console.log(cal);
//console.log(cal);
} else {
console.warn("No event description match found!");
}
Expand Down
13 changes: 4 additions & 9 deletions server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,12 @@ function performModifications(cal, stepsString) {
case "01": // replace course code with course code and course name
cal = replaceTitle.replaceCourseCodesWithCodeAndNames(cal, courses);
break;
case "02": // add a checkin link in description
cal = addcheckinLinks.insertCheckInLink(cal);
break;
case "03": // force restyling of calender every 24 hours
case "02": // force restyling of calender every 24 hours
cal = syncForcedBreakpoint.run(cal);
break;
// Add a new feature here.
// I just submit first. Actually I am not sure if this featured is better used directly with other features or seperated with other features
//case "03": // add a checkin link in description
// cal = addcheckinLinks.insertCheckInLink(cal);
// break;
case "03": // add a checkin link in description
cal = addcheckinLinks.insertCheckInLink(cal);
break;
default:
console.log("step "+ step + " called but not defined in performModifications switch")
}
Expand Down

0 comments on commit 0ac6f1a

Please sign in to comment.