Skip to content

Commit 7bfafb9

Browse files
Merge pull request #30 from ecatch-kyst/develop
🔖 release/1.0.0.beta5
2 parents e6b7c8e + 2118c1a commit 7bfafb9

File tree

5 files changed

+86
-8
lines changed

5 files changed

+86
-8
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file.
33

44
## [Unreleased]
55

6+
## [1.0.0-beta5] - 2019-04-08
7+
### Added
8+
- possible to save favorite choices in dropdown
9+
10+
### Removed
11+
- GS validation [#29](https://github.com/ecatch-kyst/backend/issues/29)
12+
613
## [1.0.0-beta4] - 2019-03-25
714
### Added
815
- POR message created and being sent to Dualog mock
@@ -35,4 +42,4 @@ All notable changes to this project will be documented in this file.
3542
- moved backend logic from [balazsorban44/ecatch-it2901](https://github.com/balazsorban44/ecatch-it2901)
3643

3744

38-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
45+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ecatch-backend",
3-
"version": "1.0.0-beta4",
3+
"version": "1.0.0-beta5",
44
"license": "GPL",
55
"private": true,
66
"scripts": {

rules/firestore.indexes.json

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,47 @@
11
{
2-
"indexes": [],
2+
"indexes": [
3+
{
4+
"collectionGroup": "messages",
5+
"queryScope": "COLLECTION",
6+
"fields": [
7+
{
8+
"fieldPath": "TM",
9+
"order": "ASCENDING"
10+
},
11+
{
12+
"fieldPath": "timestamp",
13+
"order": "ASCENDING"
14+
}
15+
]
16+
},
17+
{
18+
"collectionGroup": "messages",
19+
"queryScope": "COLLECTION",
20+
"fields": [
21+
{
22+
"fieldPath": "TM",
23+
"order": "ASCENDING"
24+
},
25+
{
26+
"fieldPath": "timestamp.seconds",
27+
"order": "ASCENDING"
28+
}
29+
]
30+
},
31+
{
32+
"collectionGroup": "messages",
33+
"queryScope": "COLLECTION",
34+
"fields": [
35+
{
36+
"fieldPath": "TM",
37+
"order": "ASCENDING"
38+
},
39+
{
40+
"fieldPath": "departure",
41+
"order": "DESCENDING"
42+
}
43+
]
44+
}
45+
],
346
"fieldOverrides": []
447
}

rules/firestore.rules

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,27 @@ service cloud.firestore {
99
match /fishingSpots/{fishingSpot}{
1010
allow read,create,update, delete: if isRightUser(userId)
1111
allow create, update: if isValidSpot(request.resource.data)
12-
}
12+
}
13+
match /ports/{ports}{
14+
allow read,create,update, delete: if isRightUser(userId)
15+
allow create, update: if isValidPort(request.resource.data)
16+
}
17+
match /fishingGear/{fishingGear}{
18+
allow read,create,update, delete: if isRightUser(userId)
19+
allow create, update: if isFishingTool(request.resource.data)
20+
}
21+
match /activity/{activity}{
22+
allow read,create,update, delete: if isRightUser(userId)
23+
}
24+
match /species/{species}{
25+
allow read,create,update, delete: if isRightUser(userId)
26+
}
27+
match /fishingPermit/{fishingPermit}{
28+
allow read,create,update, delete: if isRightUser(userId)
29+
}
30+
match /ZO/{ZO}{
31+
allow read,create,update, delete: if isRightUser(userId)
32+
}
1333
}
1434
match /boats/{boatId}{
1535
// can only read boat if boat.userId == logged in user
@@ -30,6 +50,14 @@ function isValidSpot(m){
3050
(m.name != "")
3151
}
3252

53+
function isValidPort(m){
54+
return
55+
isLatLng(m.latitude) &&
56+
isLatLng(m.longitude) &&
57+
isPort(m.value) &&
58+
(m.label != "")
59+
}
60+
3361
function isValidMessage(m) {
3462
return
3563
(m.TM == "DEP" && isValidDEP(m)) ||
@@ -212,11 +240,11 @@ function isFishingTool(t){
212240
"FPO",// Teiner Traps - pots
213241
"GEN",// Garn Gillnets and entangling nets
214242
"DRB",// Skrape, mekanisert Harvesting machines (not specified)
215-
"LL ",// Liner Longlines (not specified)
243+
"LLS",// Liner Longlines (not specified)
216244
"OTB",// Bunntrål, otter Bottom trawls - otter trawls
217245
"TBS",// Bunntrål, reker Bottom trawls - prawns
218246
"PS1",// Snurpenot/ringnot Surrounding nets-purse seines
219247
"SSC",// Snurrevad Scottish seines - scottish
220248
"OTM"// Flytetrål Midwater otter trawl
221249
]
222-
}
250+
}

src/lib/constants.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ export const fields = {
22
common: ["TM", "RN", "RC", "MA", "DA", "TI"],
33
DEP: ["PO", "ZD", "ZT", "OB", "PD", "PT", "LA", "LO", "AC", "DS"],
44
// NOTE: what is TS?
5-
DCA: [/*"MV",*/ "AD", "NA", "XR", "QI", "AC", /*"TS",*/ "BD","BT", "ZO", "LT", "LG", "GE", "GP", "XT", "XG", "DU", "CA", /*"ME" This is dependent on GE,*/ "GS"],
5+
DCA: [/*"MV",*/ "AD", "NA", "XR", "QI", "AC", /*"TS",*/ "BD","BT", "ZO", "LT", "LG", "GE", "GP", "XT", "XG", "DU", "CA", /*"ME", "GS" These are dependent on GE,*/],
66
POR: ["AD", "NA", "XR", "PO", "PD", "PT", "OB", "LS", "KG"]
77
}
88

9-
export const VALIDTM = ["DEP", "DCA", "POR"]
9+
export const VALIDTM = ["DEP", "DCA", "POR"]

0 commit comments

Comments
 (0)