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

chore: migrate geo diary #94

Merged
merged 195 commits into from
Jan 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
195 commits
Select commit Hold shift + click to select a range
0666d15
Initial commit from Create React App
huygn Aug 25, 2019
d4e3a81
add a bunch of customization via react-app-rewire
huygn Aug 25, 2019
47b76e3
Add tslint.json
duong-se Aug 26, 2019
eeb766e
Set up test
duong-se Aug 26, 2019
565ef47
Add Redux to project
duong-se Aug 26, 2019
fedb34d
Fix as comment on PR
duong-se Aug 26, 2019
b0394bc
Merge pull request #1 from reapit/feature/structure-app
vinhnhq Aug 26, 2019
7af9ba1
Fix as comment on PR
duong-se Aug 26, 2019
107d111
Merge pull request #2 from reapit/feature/structure-app
duong-se Aug 26, 2019
a05c7bf
use react-app-scaffold instead
huygn Aug 26, 2019
a7830cb
Fetch models
duong-se Aug 28, 2019
33d0cc0
Merge pull request #4 from reapit/feature/fetch-models
duong-se Aug 28, 2019
67b6284
feature/CLD-193-get-current-locatin-button
ngswip Aug 28, 2019
90d246a
update
ngswip Aug 28, 2019
f7963ab
update
ngswip Aug 28, 2019
537d431
Remove unuse code
ngswip Aug 28, 2019
d005dd1
Merge pull request #3 from reapit/feature/CLD-193-get-current-locatio…
Aug 28, 2019
533ffd3
CLD-177 offline support (#5)
huygn Aug 29, 2019
20ddd12
[CLD-100] appointment list (#6)
zlatanpham Aug 30, 2019
6ae8e6b
[CLD-102] click to show appointment detail on modal
duong-se Aug 29, 2019
eb57274
Merge pull request #7 from reapit/feature/CLD-102-click-show-appooint…
duong-se Aug 30, 2019
3979fc0
[CLD-102] Integrate appointment modal to redux
duong-se Sep 2, 2019
b558840
Merge pull request #8 from reapit/feature/CLD-102-integrate-appointme…
duong-se Sep 2, 2019
52d63e4
CLD-227 listen for online/offline state in redux (#9)
huygn Sep 3, 2019
00739aa
[CLD-176] login and auth feature (#10)
vinhnhq Sep 3, 2019
b9f06e2
[CLD-101] Remove user in attendees list if user is current logged in …
duong-se Sep 3, 2019
c0ce3bd
Merge pull request #11 from reapit/feature/CLD-101-remove-attendees-i…
duong-se Sep 3, 2019
85aa20c
[CLD-102] filter user in attendee list by userCode
duong-se Sep 4, 2019
13beba8
Merge pull request #13 from reapit/feature/cld-102-filter-user-in-att…
duong-se Sep 4, 2019
d0c928b
[CLD-105]Place appointments into the map
ngswip Sep 4, 2019
7d851e7
[CLD-105]Place appointments into the map
Sep 5, 2019
8993d98
centred vetically and hightlight current appointment
Sep 4, 2019
883288d
Change style menu
Sep 4, 2019
1809d5b
remove hardcode date
Sep 4, 2019
7964167
Fix review
Sep 4, 2019
e289dd4
Feture/cld 114 offline appointments (#16)
huygn Sep 5, 2019
7e9a62f
import datetime from elements
Sep 5, 2019
576c6ee
[CLD-192]Click marker show appointment detail (#15)
Sep 5, 2019
b327ce2
Merge branch 'master' into feature/cld-194-centred-vetically-current-…
dannd4 Sep 5, 2019
68f4a4e
Merge pull request #14 from reapit/feature/cld-194-centred-vetically-…
dannd4 Sep 5, 2019
8d4e303
[CLD-113] ETA button (#17)
zlatanpham Sep 6, 2019
aa7f706
[CLD-228] prevent user in offline mode and update unit test
vinhnhq Sep 6, 2019
697ef69
[CLD-103] choose travel mode
Sep 6, 2019
b9d0961
Fix convention
Sep 6, 2019
fc0ff30
Merge pull request #19 from reapit/feature/cld-103-choose-travel-mode
dannd4 Sep 6, 2019
27afc30
Merge pull request #18 from reapit/feature/CLD-228-prevent-user-in-of…
willmcvay Sep 6, 2019
d19498c
Feature/cld 101 view direction (#20)
duong-se Sep 9, 2019
39c8cc2
[CLD-180] click start journey check device and open default app
Sep 9, 2019
a0b1a95
Merge pull request #22 from reapit/feature/cld-180-start-journey-open…
willmcvay Sep 9, 2019
81f3418
update online property naming (#21)
vinhnhq Sep 9, 2019
f807f22
Add purgecss whitelist (#23)
huygn Sep 9, 2019
afd2270
update deployment branchs
huygn Sep 9, 2019
0b37b3f
update deployment docs
huygn Sep 9, 2019
1df1697
[CLD-245] Core CSS as I would like it
willmcvay Sep 10, 2019
17ee554
[CLD-245] Fixes type updates
willmcvay Sep 10, 2019
60700ae
[CLD-245] Fixes tests, final tweaks for now
willmcvay Sep 10, 2019
7c4a5ad
Merge pull request #24 from reapit/feature/CLD-245-ui-fixes
willmcvay Sep 11, 2019
fd25737
Add Map API key to Azure
willmcvay Sep 11, 2019
c9c6bda
[CLD-253] [CLD-270] Fixed blank login issue and redux persistance
willmcvay Sep 16, 2019
1d06431
[CLD-270] Some tidy up
willmcvay Sep 17, 2019
f2777b6
[CLD-270] Update snaps
willmcvay Sep 17, 2019
70e9d73
Merge pull request #25 from reapit/hotfix/CLD-270-271-integration-log…
willmcvay Sep 17, 2019
212db4b
[CLD-270] no longer storing auth in persist
willmcvay Sep 17, 2019
22c9364
Merge pull request #26 from reapit/hotfix/CLD-270-271-integration-log…
willmcvay Sep 18, 2019
a8b40a7
[CLD-263] add start location
Sep 18, 2019
0ebcbe5
[CLD-271] Adds cookie drop to login
willmcvay Sep 18, 2019
4fd1d77
Merge pull request #28 from reapit/hotfix/CLD-270-271-integration-log…
willmcvay Sep 18, 2019
7133b17
'[CLD-268]Flush reapit logo to the top of the page when in mobile mode'
ngswip Sep 19, 2019
6e9e340
Merge pull request #27 from reapit/task/CLD-263-add-start-location
willmcvay Sep 19, 2019
1e98191
FIX: remove incorrect appointment when show on map (#29)
duong-se Sep 19, 2019
445b107
[CLD-256] FIX: view appointment detail on map and remove markers when…
duong-se Sep 19, 2019
e3d7ce6
[CLD-257] keep selectedAppointment remain after switch map tab (#31)
zlatanpham Sep 20, 2019
5b4db40
[CLD-276] Fix map marker info bug (#32)
duong-se Sep 20, 2019
b5821b5
[CLD-269] Hide direction button when no lat lng property (#33)
duong-se Sep 23, 2019
034bd61
[CLD-274] Fixes desktop whitespace issue
willmcvay Sep 23, 2019
5888c07
[CLD-274] Fixes tests
willmcvay Sep 23, 2019
b02736d
Merge pull request #34 from reapit/hotfix/CLD-274-blank-negative-space
willmcvay Sep 23, 2019
93be6ab
[CLD-274] One more small tweak to desktop CSS
willmcvay Sep 23, 2019
5fbd435
Merge pull request #35 from reapit/hotfix/CLD-274-blank-negative-space
willmcvay Sep 23, 2019
c87e2da
[CLD-273] show all direction for desktop mode (#36)
duong-se Sep 25, 2019
792bdb7
[CLD-271] Updates to new auth flow
willmcvay Sep 25, 2019
fd6314a
Merge pull request #37 from reapit/hotfix/CLD-271-share-cookies
willmcvay Sep 26, 2019
94aa66f
[CLD-264] UI changes, maps appointment types
willmcvay Sep 27, 2019
6dd81d4
Merge pull request #38 from reapit/feature/CLD-264-appointments-ui
willmcvay Sep 27, 2019
3b12702
[CLD-265] restyling detail modal (#39)
zlatanpham Oct 1, 2019
3ed4c33
[CLD-281] Implement new nav in Geo Diary
willmcvay Oct 4, 2019
29ad2b4
Merge pull request #40 from reapit/feature/CLD-281-new-nav
willmcvay Oct 4, 2019
982963a
[CLD-275] Tool tip address when view direction (#41)
duong-se Oct 7, 2019
35aee92
[CLD-296] FIX tag meta viewport
duong-se Oct 7, 2019
d8738fa
[CLD-278]Start location should be blank if location service are disabled
phmngocnghia Oct 7, 2019
6cd674a
Merge pull request #42 from reapit/fix/cld-296-change-meta-viewport-tag
willmcvay Oct 7, 2019
aba3195
Merge pull request #43 from reapit/feature/CLD-278-start-location-sho…
willmcvay Oct 8, 2019
917565a
CLD-262 dont exclude local images
huygn Oct 8, 2019
76f6a3f
[CLD-285] fix view arrangement not showing (#45)
zlatanpham Oct 9, 2019
09f483d
[CLD-288] show cancelled appointment on UI (#44)
zlatanpham Oct 9, 2019
969ce98
[CLD-258]sort appointments-by-start-time
phmngocnghia Oct 10, 2019
aabd4c7
[CLD-303] Fix app redirect to login page when in offline mode (#46)
duong-se Oct 10, 2019
1d32add
update yarn.lock due to package bugs
phmngocnghia Oct 10, 2019
f8fa799
Merge pull request #47 from reapit/feature/CLD-258-sort-appointments-…
willmcvay Oct 10, 2019
05ec2e1
[CLD-291] Re-styles Geo-Diary
willmcvay Oct 10, 2019
eae26c1
Merge pull request #48 from reapit/feature/CLD-291-re-style-app
willmcvay Oct 10, 2019
840f332
[CLD-291] A few width tweaks
willmcvay Oct 11, 2019
6a2bcba
[CLD-291] Fixes tests
willmcvay Oct 11, 2019
735210e
Merge pull request #49 from reapit/feature/CLD-291-style-tweaks
willmcvay Oct 11, 2019
adc70e3
Fix type email field
Oct 15, 2019
dc000c8
Merge pull request #51 from reapit/fix/cld-300-type-email-field
dannd4 Oct 15, 2019
3a3d242
[CLD-307] fix login alert incorrect show (#52)
zlatanpham Oct 15, 2019
4ac02ee
Fix/cld 304/tool tip in map view (#50)
duong-se Oct 15, 2019
e2a136f
[CLD-309] Applies menu fix to Geo Diary (#54)
willmcvay Oct 16, 2019
6bd65e0
[CLD-302]Change next week to week view (#53)
Oct 16, 2019
778ad32
Bump version reapit element (#55)
duong-se Oct 16, 2019
148851a
[CLD-306] FIX browser issue on IE and firefox (#57)
duong-se Oct 18, 2019
7d03e03
[CLD-313] fix ETA btn not showing (#56)
zlatanpham Oct 18, 2019
1ffd261
[CLD-312] Adds desktop launch link to Geo Diary:
willmcvay Oct 21, 2019
9f5ecd5
Merge pull request #60 from reapit/feature/CLD-312-add-desktop-link
willmcvay Oct 21, 2019
bf429bb
[CLD-313] update layout to have room for ETA btn (#59)
zlatanpham Oct 22, 2019
8dd2e3a
Implement filter additional and applicant attendees
phmngocnghia Oct 22, 2019
71a011b
Implement new layout for appointment-detail modal
phmngocnghia Oct 22, 2019
920711e
Render Additional Attendees
phmngocnghia Oct 22, 2019
d44e9b5
Render Applicant Attendees
phmngocnghia Oct 22, 2019
84526c1
Render address and arrangments
phmngocnghia Oct 22, 2019
5041818
Remove unsed code, Fix tests
phmngocnghia Oct 22, 2019
a861a5d
Fix tests, update snapshoot
phmngocnghia Oct 22, 2019
a185d26
Merge pull request #61 from reapit/feature/CLD-314-update-ui-details-…
willmcvay Oct 22, 2019
34f72b4
Revert "Feature/cld 314 update ui details modal in geo diary"
willmcvay Oct 22, 2019
c1f21cb
Fixes container issue in desktop mode
willmcvay Oct 22, 2019
7061154
Merge pull request #63 from reapit/hotfix/results-container
willmcvay Oct 23, 2019
1e55cc9
Merge pull request #62 from reapit/revert-61-feature/CLD-314-update-u…
willmcvay Oct 23, 2019
d75cf61
[CLD-347] fix ETA missing when another attendee present (#64)
zlatanpham Oct 24, 2019
ae738d2
[CLD-361] Update style map component (#67)
duong-se Oct 29, 2019
3ca6f57
[CLD-314]Update UI Details modal in geo diary (#65)
Oct 29, 2019
0f00920
CLD-360 store persist data for appointments by filters (#66)
vinhnhq Oct 30, 2019
bd8d9fe
[CLD-314]Update appointment detail modals (#68)
Oct 31, 2019
28fd571
[CLD] UI updates for launch
willmcvay Oct 31, 2019
7aa3ada
[CLD-324] Fixes tests
willmcvay Oct 31, 2019
60b4969
[CLD-324] Fixed broken import
willmcvay Oct 31, 2019
09d6fe4
Merge pull request #69 from reapit/feature/CLD-324-ui-fixes
willmcvay Oct 31, 2019
92c6ef7
[CLD-314]Remove attendee belonged to currentlogged user (#70)
Nov 1, 2019
69213a0
[CLD-375] Interim commit - upgrades elements
willmcvay Nov 1, 2019
b4dd0c1
Merge pull request #71 from reapit/feature/CLD-375-ui-launch-fixes
willmcvay Nov 1, 2019
f03abb6
[CLD-375] Fixes eta and modal links
willmcvay Nov 1, 2019
4e31873
[CLD-375] Fixes manifest
willmcvay Nov 1, 2019
5cab81a
Merge pull request #72 from reapit/feature/CLD-375-ui-launch-fixes
willmcvay Nov 1, 2019
bc217a0
[CLD-380] Add geo diary test coverage (#73)
duong-se Nov 11, 2019
7b0afcc
Fix/cld 306 remove ts optional chaining (#74)
duong-se Nov 11, 2019
6c8b978
[CLD-306] Add core js (#76)
duong-se Nov 12, 2019
0ccf6b3
add demo deployment
huygn Nov 13, 2019
13cdf79
[CLD-386] Update dependencies for geo-diary (#77)
duong-se Nov 13, 2019
c7c5153
[CLD-388] fix URL structure incorrect in desktop mode (#79)
zlatanpham Nov 13, 2019
1b29217
[CLD-387] Cancel appointment feature (#81)
duong-se Nov 15, 2019
a4a19a2
Add polyfill to support IE (#78)
duong-se Nov 15, 2019
299bf55
[CLD-398] show direction when click on appointment (#82)
zlatanpham Nov 15, 2019
84477c9
Merge branch 'master' into feature/cld-392-demo-deploy
willmcvay Nov 15, 2019
d41ec6e
Merge pull request #80 from reapit/feature/cld-392-demo-deploy
willmcvay Nov 15, 2019
1a44869
[CLD-433] refresh page after cancel appointment (#83)
zlatanpham Nov 20, 2019
bfac23c
[CLD-439] fix heading icon have no spacing (#84)
zlatanpham Nov 20, 2019
4248dbb
[CLD-460]update endpoints (#86)
Nov 28, 2019
3f1c8a0
Migrate to new credentials
duong-se Dec 2, 2019
76c9a63
Merge pull request #87 from reapit/feature/migrate-to-new-credentials
willmcvay Dec 4, 2019
11614c1
[CLD-515][CLD-525] Fixes breaking changes, updates cognito (#88)
willmcvay Dec 6, 2019
530ad4d
[CLD-441] Display recurring appointment (#89)
trankhacvy Dec 9, 2019
00e8bfa
[CLD-395] update formik (#90)
zlatanpham Dec 10, 2019
962a17b
[CLD-525] Replace more methods
vuhuucuong Dec 11, 2019
6780186
Merge pull request #91 from reapit/task/CLD-525-continue-fix-breaking…
vuhuucuong Dec 11, 2019
797957e
[CLD-473] Config works, need to apply to repos
willmcvay Dec 12, 2019
495ba5d
[CLD-473] Fetch config before install and test
willmcvay Dec 16, 2019
69f8095
[CLD-473] Adds set env command
willmcvay Dec 16, 2019
d5f1d54
[CLD-473] Reinstates NPM_TOKEN var
willmcvay Dec 16, 2019
70c340f
[CLD-473] Adds AWS creds
willmcvay Dec 16, 2019
9ef58c9
Adds a bash script to set REAPIT variable
willmcvay Dec 16, 2019
befead0
[CLD-473] Syntax error
willmcvay Dec 16, 2019
50231a4
[CLD-473] Another attempt to fix syntax
willmcvay Dec 16, 2019
87c6382
[CLD-473] Redundant key
willmcvay Dec 16, 2019
78c1b25
[CLD-473] Removes a redundant script
willmcvay Dec 16, 2019
ae1cc6b
Merge pull request #93 from reapit/feature/CLD-473-add-config-manager
willmcvay Dec 17, 2019
8d11f93
[CLD-473] Tries a tweak to config
willmcvay Dec 17, 2019
c25f391
[CLD-473] Another attempt at improving script
willmcvay Dec 17, 2019
81578c2
[CLD-473] Stops script from throwing an error
willmcvay Dec 17, 2019
1b3d5f0
Merge pull request #94 from reapit/feature/CLD-473-add-config-manager
willmcvay Dec 17, 2019
9dff039
[CLD-421]replace fetch definition with foundations ts definitions (#95)
Dec 18, 2019
a84a6ae
[CLD-552] Upgrade webpack due to security issue (#96)
duong-se Dec 19, 2019
e2a29f5
[CLD-625] fix appointment time not show (#97)
zlatanpham Dec 19, 2019
7e75e6b
[CLD-626] Fix GEO Diary showing appointments for other negotiators (#98)
trankhacvy Dec 24, 2019
0abbd77
[CLD-624] hide icon if address field empty (#99)
zlatanpham Dec 26, 2019
81f5d13
fix: cld-665 backend change schema (#100)
duong-se Jan 13, 2020
16f5bcd
[CLD-581] Apply logging to geo diary
Jan 20, 2020
b121f69
Fix pipeline install failed
Jan 20, 2020
a282e84
Fix pipeline install failed
Jan 20, 2020
4b0eb32
Merge pull request #101 from reapit/feature/cld-581-apply-logging-to-…
dannd4 Jan 20, 2020
1db3997
fix: cld-704 add utc parse for query params of appointments (#102)
duong-se Jan 21, 2020
95fed64
[CLD-732]Fetch negotiators, offices, property from specialize endpoin…
Jan 22, 2020
c0e9032
chore: Migrate Geo Diary
willmcvay Jan 23, 2020
086493a
chore: migrate geo diary
willmcvay Jan 23, 2020
9b872cd
chore: Linted project
willmcvay Jan 23, 2020
c6a134e
chore: #90 fixes geo diary build
willmcvay Jan 24, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ marketplace:

foundations-ts-definitons:
- packages/foundations-ts-definitons/**

geo-diary:
- packages/geo-diary/**
12 changes: 12 additions & 0 deletions packages/geo-diary/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Geo Diary

Interactive maps for the negotiator on the go. Initial scaffold from [React App Boilerplate](https://github.com/reapit/react-app)

## Read on:

- [Getting Started](./src/docs/GETTING_STARTED.md)
- [Api Platform](./src/docs/API_PLATFORM.md)
- [Code Style](./src/docs/CODE_STYLE.md)
- [Version Control](./VERSION_CONTROL.md)
- [Definition of Done](./src/docs/DEFINITION_OF_DONE.md)
- [Deployment](./src/docs/DEPLOYMENT.md)
153 changes: 153 additions & 0 deletions packages/geo-diary/azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
# Node.js with React
# Build a Node.js project that uses React.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript

# Node.js with React
# Build a Node.js project that uses React.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript

trigger:
branches:
include:
- '*'
tags:
include:
- '*'

jobs:
- job: buildWebApp
displayName: Test and build web app
pool:
vmImage: 'ubuntu-latest'
variables:
- group: aws
- name: REAPIT_ENV
value: 'DEV'
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- script: yarn install
displayName: Install deps
env:
NPM_TOKEN: $(NPM_TOKEN)

- script: yarn test:ci
displayName: Unit tests
env:
NPM_TOKEN: $(NPM_TOKEN)

- task: PublishTestResults@2
inputs:
testResultsFormat: 'JUnit' # Options: JUnit, NUnit, VSTest, xUnit, cTest
testResultsFiles: '*.xml'
searchFolder: '$(System.DefaultWorkingDirectory)/.jest-junit-reports' # Optional
mergeTestResults: false # Optional
failTaskOnFailedTests: true # Optional
publishRunAttachments: true # Optional

- bash: |
branch=$(Build.SourceBranch)
if [[ branch == *"refs/tags/GD-"* ]]; then
echo "##vso[task.setvariable variable=REAPIT_ENV]PROD";
fi
if [[ branch == *"refs/heads/demo"* ]]; then
echo "##vso[task.setvariable variable=REAPIT_ENV]DEMO";
fi
displayName: Set Reapit Env

- script: yarn build
displayName: Build static assets
env:
REAPIT_ENV: $(REAPIT_ENV)
NPM_TOKEN: $(NPM_TOKEN)
AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID)
AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)

- task: PublishPipelineArtifact@1
inputs:
path: $(System.DefaultWorkingDirectory)/public/dist
artifact: AppBundle

- deployment: S3DeployWebDev
displayName: 'Dev | S3 Deployment'
dependsOn: buildWebApp
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
pool:
vmImage: 'ubuntu-latest'
environment: 'reapit-geo-diary-dev'
strategy:
runOnce:
deploy:
steps:
- task: S3Upload@1
displayName: Deploy assets to S3
inputs:
awsCredentials: 'df-duong'
regionName: 'eu-west-2'
bucketName: 'reapit-geo-diary-dev'
sourceFolder: '$(Pipeline.Workspace)/AppBundle'
globExpressions: '**'
filesAcl: 'public-read'
createBucket: true

- deployment: S3DeployWebProd
displayName: 'Prod | S3 Deployment'
dependsOn: buildWebApp
condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'refs/tags/GD-'))
pool:
vmImage: 'ubuntu-latest'
environment: 'reapit-geo-diary-prod'
strategy:
runOnce:
deploy:
steps:
- task: S3Upload@1
displayName: Deploy assets to S3
inputs:
awsCredentials: 'df-duong'
regionName: 'eu-west-2'
bucketName: 'reapit-geo-diary-prod'
sourceFolder: '$(Pipeline.Workspace)/AppBundle'
globExpressions: '**'
filesAcl: 'public-read'
createBucket: true

- deployment: S3DeployWebDemo
displayName: 'Demo | S3 Deployment'
dependsOn: buildWebApp
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/demo'))
pool:
vmImage: 'ubuntu-latest'
environment: 'reapit-geo-diary-demo'
strategy:
runOnce:
deploy:
steps:
- task: S3Upload@1
displayName: Deploy assets to S3
inputs:
awsCredentials: 'df-duong'
regionName: 'eu-west-2'
bucketName: 'reapit-demo-geodiary'
sourceFolder: '$(Pipeline.Workspace)/AppStoreBundle'
globExpressions: '**'
filesAcl: 'public-read'
createBucket: true
# no benefits as we only have 1 parallel jobs
# - job: e2e
# displayName: E2E Test
# steps:
# - task: NodeTool@0
# inputs:
# versionSpec: '10.x'
# displayName: 'Install Node.js'
# - script: yarn install
# displayName: Install deps
# failOnStderr: true
# - script: yarn test-e2e:ci
# displayName: E2E Tests
# continueOnError: true
32 changes: 32 additions & 0 deletions packages/geo-diary/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
const { pathsToModuleNameMapper } = require('ts-jest/utils')
const { compilerOptions } = require('./tsconfig')

module.exports = {
preset: 'ts-jest',
testPathIgnorePatterns: ['<rootDir>/src/tests/'],
setupFiles: ['<rootDir>/src/scripts/jest-setup.js'],
collectCoverageFrom: ['<rootDir>/src/**/*.ts', '<rootDir>/src/**/*.tsx'],
coverageDirectory: './src/tests/coverage',
coveragePathIgnorePatterns: [
'<rootDir>[/\\\\](node_modules|src/types|src/tests|src/scripts)[/\\\\]',
'<rootDir>/src/sagas/api.ts',
'service-worker.ts'
],
modulePathIgnorePatterns: ['<rootDir>[/\\\\](node_modules)[/\\\\]'],
moduleNameMapper: {
'^.+.(?=.*scss|sass|css|jpg).*': '<rootDir>/src/scripts/css-stub.js',
...pathsToModuleNameMapper(compilerOptions.paths, {
prefix: '<rootDir>/'
})
},
globalSetup: './src/scripts/jest-global.js',
snapshotSerializers: ['enzyme-to-json/serializer'],
coverageThreshold: {
global: {
branches: 66,
functions: 80,
lines: 91,
statements: 90
}
}
}
71 changes: 71 additions & 0 deletions packages/geo-diary/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"name": "geo-diary",
"version": "0.0.1",
"private": true,
"description": "Geo Diary App",
"repository": {
"type": "git",
"url": "[email protected]:reapit/geo-diary.git"
},
"license": "MIT",
"author": "Author",
"main": "./src/index.ts",
"scripts": {
"build": "yarn fetch-config && webpack --color --mode production --config ./src/scripts/webpack-prod.js",
"dev": "yarn fetch-config && REAPIT_ENV=LOCAL webpack-dev-server --hot --progress --color --mode development --config ./src/scripts/webpack-dev.js",
"fetch-config": "yarn config-manager getSecret reapit-marketplace-app-config",
"start": "node ./public/index.js geo-diary",
"serve": "serve public/dist -s -l 8080",
"test": "cross-env TZ=UTC jest --coverage --silent",
"test:ci": "cross-env TZ=UTC jest --ci",
"test-dev": "cross-env TZ=UTC jest --watch --verbose"
},
"dependencies": {
"hardtack": "^4.1.0",
"localforage": "^1.7.3",
"react-icons": "^3.7.0",
"redux": "^4.0.4",
"redux-persist": "^5.10.0",
"redux-saga": "^1.1.3"
},
"devDependencies": {
"@babel/core": "^7.7.2",
"@babel/polyfill": "^7.7.0",
"@babel/preset-env": "^7.7.1",
"@reapit/foundations-ts-definitions": "^0.0.18",
"@redux-saga/testing-utils": "^1.0.5",
"@types/googlemaps": "^3.37.5",
"babel-loader": "^8.0.6",
"babel-polyfill": "^6.26.0",
"chromedriver": "^2.43.1",
"concurrently": "^4.1.1",
"core-js": "^3.4.1",
"css-loader": "^3.0.0",
"favicons-webpack-plugin": "^0.0.9",
"file-loader": "^3.0.1",
"fork-ts-checker-notifier-webpack-plugin": "^1.0.0",
"fork-ts-checker-webpack-plugin": "^1.3.4",
"html-webpack-plugin": "^3.2.0",
"loader-utils": "^1.2.3",
"mini-css-extract-plugin": "^0.7.0",
"mockdate": "^2.0.5",
"node-sass": "^4.12.0",
"prettier-plugin-packagejson": "^2.0.1",
"purgecss": "^1.3.0",
"purgecss-whitelister": "^2.4.0",
"sass-loader": "^7.1.0",
"serve": "^11.1.0",
"source-map-loader": "^0.2.4",
"style-loader": "^0.23.1",
"ts-node": "^8.3.0",
"ts-paths-to-webpack-alias": "^0.3.1",
"tslint": "^5.20.1",
"tslint-config-prettier": "^1.18.0",
"tslint-config-standard": "^9.0.0",
"tslint-plugin-prettier": "^2.0.1",
"webpack-bundle-analyzer": "^3.4.1",
"webpack-cli": "^3.3.2",
"webpack-dev-server": "^3.4.1",
"workbox-webpack-plugin": "^4.3.1"
}
}
13 changes: 13 additions & 0 deletions packages/geo-diary/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<base href="/" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<title>Geo Diary</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
</html>
38 changes: 38 additions & 0 deletions packages/geo-diary/public/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
const http = require('http')
const url = require('url')
const fs = require('fs')
const path = require('path')
const port = 8080

http
.createServer((request, response) => {
try {
const requestUrl = url.parse(request.url)
const fsPath = `${__dirname}/dist${path.normalize(requestUrl.pathname)}` // need to use path.normalize so people can't access directories underneath baseDirectory
const fileStream = /\.(js|css|woff|gif|jpg|jpeg|tiff|png)$/i.test(fsPath)
? fs.createReadStream(fsPath)
: fs.createReadStream(`${__dirname}/dist/index.html`)

fileStream.pipe(response)
fileStream.on('open', () => {
response.writeHead(200)
})
fileStream.on('error', e => {
response.writeHead(404) // assume the file doesn't exist
response.end()
})
} catch (e) {
response.writeHead(500)
response.end() // end the response so browsers don't hang
console.log(e.stack)
}
})
.listen(port)

process.title = process.argv[2]
process.on('SIGINT', () => {
console.log(`Gracefully shutting down ${process.title}`)
process.exit()
})

console.log(`Listening on port ${port}`)
Binary file added packages/geo-diary/public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 59 additions & 0 deletions packages/geo-diary/src/actions/__tests__/appointment-detail.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import {
appointmentDetailRequestData,
appointmentDetailRequestDataFailure,
appointmentDetailLoading,
appointmentDetailReceiveData,
appointmentDetailShowModal,
appointmentDetailHideModal,
showHideConfirmModal,
cancelAppointment,
showConfirmModalSubmitting,
} from '../appointment-detail'
import ActionTypes from '../../constants/action-types'
import { appointmentDataStub } from '../../sagas/__stubs__/appointment'

describe('appointment-detail actions', () => {
it('should create a appointmentDetailRequestData action', () => {
expect(appointmentDetailRequestData.type).toEqual(ActionTypes.APPOINTMENT_DETAIL_REQUEST_DATA)
expect(appointmentDetailRequestData({ id: '1' }).data).toEqual({ id: '1' })
})
it('should create a appointmentDetailRequestDataFailure action', () => {
expect(appointmentDetailRequestDataFailure.type).toEqual(ActionTypes.APPOINTMENT_DETAIL_REQUEST_FAILURE)
expect(appointmentDetailRequestDataFailure().data).toEqual(undefined)
})

it('should create a appointmentDetailLoading action', () => {
expect(appointmentDetailLoading.type).toEqual(ActionTypes.APPOINTMENT_DETAIL_LOADING)
expect(appointmentDetailLoading(true).data).toEqual(true)
})

it('should create a appointmentDetailReceiveData action', () => {
expect(appointmentDetailReceiveData.type).toEqual(ActionTypes.APPOINTMENT_DETAIL_RECEIVE_DATA)
expect(appointmentDetailReceiveData(appointmentDataStub).data).toEqual(appointmentDataStub)
})

it('should create a appointmentDetailShowModal action', () => {
expect(appointmentDetailShowModal.type).toEqual(ActionTypes.APPOINTMENT_DETAIL_SHOW_MODAL)
expect(appointmentDetailShowModal().data).toEqual(undefined)
})

it('should create a appointmentDetailHideModal action', () => {
expect(appointmentDetailHideModal.type).toEqual(ActionTypes.APPOINTMENT_DETAIL_HIDE_MODAL)
expect(appointmentDetailHideModal().data).toEqual(undefined)
})

it('should create a showHideConfirmModal action', () => {
expect(showHideConfirmModal.type).toEqual(ActionTypes.SHOW_HIDE_CONFIRM_MODAL)
expect(showHideConfirmModal(true).data).toEqual(true)
})

it('should create a confirmCancel action', () => {
expect(cancelAppointment.type).toEqual(ActionTypes.CANCEL_APPOINTMENT)
expect(cancelAppointment().data).toEqual(undefined)
})

it('should create a showConfirmModalSubmitting action', () => {
expect(showConfirmModalSubmitting.type).toEqual(ActionTypes.SHOW_CONFIRM_MODAL_SUBMITTING)
expect(showConfirmModalSubmitting(true).data).toEqual(true)
})
})
Loading