@bongos/core 1.25.23 → 1.25.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.bongos-core.json +20 -20
- package/docs/copy-inventory.md +35 -24
- package/docs/copy-registry.json +145 -36
- package/docs/module-api-changelog.md +2 -0
- package/docs/page-readings.json +1 -1
- package/modules/hall-ui/public/genesis-home.js +98 -16
- package/modules/onboarding/genesis-home.js +64 -4
- package/modules/onboarding/genesis-work.js +65 -10
- package/modules/onboarding/routes/genesis-work.js +2 -1
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/release-notes.json +6 -0
- package/src/module-api.js +1 -1
- package/tests/genesis_home.mjs +115 -2
- package/tests/genesis_work.mjs +38 -0
- package/tests/genesis_work_routes.mjs +21 -0
package/docs/copy-registry.json
CHANGED
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
"generator": "scripts/bongos/copy-inventory.js",
|
|
4
4
|
"goal": 1000074,
|
|
5
5
|
"counts": {
|
|
6
|
-
"strings":
|
|
7
|
-
"unique_ids":
|
|
8
|
-
"certain":
|
|
6
|
+
"strings": 3220,
|
|
7
|
+
"unique_ids": 2547,
|
|
8
|
+
"certain": 3220,
|
|
9
9
|
"heuristic": 0,
|
|
10
|
-
"duplicate_ids":
|
|
10
|
+
"duplicate_ids": 271
|
|
11
11
|
},
|
|
12
12
|
"surfaces": {
|
|
13
13
|
"builders-hall": {
|
|
14
14
|
"at": "modules/hall-ui/public",
|
|
15
15
|
"files": 181,
|
|
16
|
-
"strings":
|
|
16
|
+
"strings": 2080
|
|
17
17
|
},
|
|
18
18
|
"status-dashboard": {
|
|
19
19
|
"at": "modules/status-ui/public",
|
|
@@ -943,9 +943,9 @@
|
|
|
943
943
|
"text": "Open the Board Room",
|
|
944
944
|
"occurrences": 3,
|
|
945
945
|
"at": [
|
|
946
|
-
"modules/hall-ui/public/genesis-home.js:
|
|
947
|
-
"modules/hall-ui/public/genesis-home.js:
|
|
948
|
-
"modules/hall-ui/public/genesis-home.js:
|
|
946
|
+
"modules/hall-ui/public/genesis-home.js:368",
|
|
947
|
+
"modules/hall-ui/public/genesis-home.js:373",
|
|
948
|
+
"modules/hall-ui/public/genesis-home.js:411"
|
|
949
949
|
]
|
|
950
950
|
},
|
|
951
951
|
{
|
|
@@ -1990,6 +1990,16 @@
|
|
|
1990
1990
|
"modules/public-landing/public/projects.html:1694"
|
|
1991
1991
|
]
|
|
1992
1992
|
},
|
|
1993
|
+
{
|
|
1994
|
+
"id": "27a93fec8981",
|
|
1995
|
+
"surface": "builders-hall",
|
|
1996
|
+
"text": "Nothing changed.",
|
|
1997
|
+
"occurrences": 2,
|
|
1998
|
+
"at": [
|
|
1999
|
+
"modules/hall-ui/public/genesis-home.js:521",
|
|
2000
|
+
"modules/hall-ui/public/genesis-home.js:536"
|
|
2001
|
+
]
|
|
2002
|
+
},
|
|
1993
2003
|
{
|
|
1994
2004
|
"id": "81d9906d5c67",
|
|
1995
2005
|
"surface": "landing",
|
|
@@ -4906,6 +4916,15 @@
|
|
|
4906
4916
|
"origin": "js-notice",
|
|
4907
4917
|
"confidence": "certain"
|
|
4908
4918
|
},
|
|
4919
|
+
{
|
|
4920
|
+
"id": "1b56790abbe7",
|
|
4921
|
+
"surface": "builders-hall",
|
|
4922
|
+
"text": "Change any of your answers. Due dates follow the new lengths; a new government goes to the board like any charter change.",
|
|
4923
|
+
"file": "modules/hall-ui/public/genesis-home.js",
|
|
4924
|
+
"line": 123,
|
|
4925
|
+
"origin": "js-markup",
|
|
4926
|
+
"confidence": "certain"
|
|
4927
|
+
},
|
|
4909
4928
|
{
|
|
4910
4929
|
"id": "f5a83e058206",
|
|
4911
4930
|
"surface": "builders-hall",
|
|
@@ -4915,6 +4934,24 @@
|
|
|
4915
4934
|
"origin": "js-markup",
|
|
4916
4935
|
"confidence": "certain"
|
|
4917
4936
|
},
|
|
4937
|
+
{
|
|
4938
|
+
"id": "c23f932399d4",
|
|
4939
|
+
"surface": "builders-hall",
|
|
4940
|
+
"text": "Change its answers",
|
|
4941
|
+
"file": "modules/hall-ui/public/genesis-home.js",
|
|
4942
|
+
"line": 266,
|
|
4943
|
+
"origin": "js-markup",
|
|
4944
|
+
"confidence": "certain"
|
|
4945
|
+
},
|
|
4946
|
+
{
|
|
4947
|
+
"id": "402a653b44cc",
|
|
4948
|
+
"surface": "builders-hall",
|
|
4949
|
+
"text": "Change the plan",
|
|
4950
|
+
"file": "modules/hall-ui/public/genesis-home.js",
|
|
4951
|
+
"line": 271,
|
|
4952
|
+
"origin": "js-markup",
|
|
4953
|
+
"confidence": "certain"
|
|
4954
|
+
},
|
|
4918
4955
|
{
|
|
4919
4956
|
"id": "3886409b8996",
|
|
4920
4957
|
"surface": "builders-hall",
|
|
@@ -4960,6 +4997,15 @@
|
|
|
4960
4997
|
"origin": "js-text-assign",
|
|
4961
4998
|
"confidence": "certain"
|
|
4962
4999
|
},
|
|
5000
|
+
{
|
|
5001
|
+
"id": "6c15878817d6",
|
|
5002
|
+
"surface": "builders-hall",
|
|
5003
|
+
"text": "Changing them does not reopen the stage.",
|
|
5004
|
+
"file": "modules/hall-ui/public/genesis-home.js",
|
|
5005
|
+
"line": 187,
|
|
5006
|
+
"origin": "js-markup",
|
|
5007
|
+
"confidence": "certain"
|
|
5008
|
+
},
|
|
4963
5009
|
{
|
|
4964
5010
|
"id": "44f783393438",
|
|
4965
5011
|
"surface": "builders-hall",
|
|
@@ -5289,7 +5335,7 @@
|
|
|
5289
5335
|
"surface": "builders-hall",
|
|
5290
5336
|
"text": "Close this stage",
|
|
5291
5337
|
"file": "modules/hall-ui/public/genesis-home.js",
|
|
5292
|
-
"line":
|
|
5338
|
+
"line": 376,
|
|
5293
5339
|
"origin": "js-markup",
|
|
5294
5340
|
"confidence": "certain"
|
|
5295
5341
|
},
|
|
@@ -5424,7 +5470,7 @@
|
|
|
5424
5470
|
"surface": "builders-hall",
|
|
5425
5471
|
"text": "Confirm this stage",
|
|
5426
5472
|
"file": "modules/hall-ui/public/genesis-home.js",
|
|
5427
|
-
"line":
|
|
5473
|
+
"line": 367,
|
|
5428
5474
|
"origin": "js-markup",
|
|
5429
5475
|
"confidence": "certain"
|
|
5430
5476
|
},
|
|
@@ -6855,7 +6901,7 @@
|
|
|
6855
6901
|
"surface": "builders-hall",
|
|
6856
6902
|
"text": "Enter the builders’ hall",
|
|
6857
6903
|
"file": "modules/hall-ui/public/genesis-home.js",
|
|
6858
|
-
"line":
|
|
6904
|
+
"line": 421,
|
|
6859
6905
|
"origin": "js-markup",
|
|
6860
6906
|
"confidence": "certain"
|
|
6861
6907
|
},
|
|
@@ -6945,7 +6991,7 @@
|
|
|
6945
6991
|
"surface": "builders-hall",
|
|
6946
6992
|
"text": "Every room in the hall is open now. The founding builders keep their mark for good.",
|
|
6947
6993
|
"file": "modules/hall-ui/public/genesis-home.js",
|
|
6948
|
-
"line":
|
|
6994
|
+
"line": 420,
|
|
6949
6995
|
"origin": "js-markup",
|
|
6950
6996
|
"confidence": "certain"
|
|
6951
6997
|
},
|
|
@@ -7179,7 +7225,7 @@
|
|
|
7179
7225
|
"surface": "builders-hall",
|
|
7180
7226
|
"text": "Finish every task above and this stage moves on by itself.",
|
|
7181
7227
|
"file": "modules/hall-ui/public/genesis-home.js",
|
|
7182
|
-
"line":
|
|
7228
|
+
"line": 379,
|
|
7183
7229
|
"origin": "js-markup",
|
|
7184
7230
|
"confidence": "certain"
|
|
7185
7231
|
},
|
|
@@ -7188,7 +7234,7 @@
|
|
|
7188
7234
|
"surface": "builders-hall",
|
|
7189
7235
|
"text": "Finish every task above, then put this stage to the board.",
|
|
7190
7236
|
"file": "modules/hall-ui/public/genesis-home.js",
|
|
7191
|
-
"line":
|
|
7237
|
+
"line": 380,
|
|
7192
7238
|
"origin": "js-markup",
|
|
7193
7239
|
"confidence": "certain"
|
|
7194
7240
|
},
|
|
@@ -7458,7 +7504,7 @@
|
|
|
7458
7504
|
"surface": "builders-hall",
|
|
7459
7505
|
"text": "Genesis stages",
|
|
7460
7506
|
"file": "modules/hall-ui/public/genesis-home.js",
|
|
7461
|
-
"line":
|
|
7507
|
+
"line": 85,
|
|
7462
7508
|
"origin": "js-markup",
|
|
7463
7509
|
"confidence": "certain"
|
|
7464
7510
|
},
|
|
@@ -7863,7 +7909,7 @@
|
|
|
7863
7909
|
"surface": "builders-hall",
|
|
7864
7910
|
"text": "How many passes",
|
|
7865
7911
|
"file": "modules/hall-ui/public/genesis-home.js",
|
|
7866
|
-
"line":
|
|
7912
|
+
"line": 129,
|
|
7867
7913
|
"origin": "js-markup",
|
|
7868
7914
|
"confidence": "certain"
|
|
7869
7915
|
},
|
|
@@ -8218,6 +8264,15 @@
|
|
|
8218
8264
|
"origin": "html-text",
|
|
8219
8265
|
"confidence": "certain"
|
|
8220
8266
|
},
|
|
8267
|
+
{
|
|
8268
|
+
"id": "4b2994ac0e6d",
|
|
8269
|
+
"surface": "builders-hall",
|
|
8270
|
+
"text": "In your own words",
|
|
8271
|
+
"file": "modules/hall-ui/public/genesis-home.js",
|
|
8272
|
+
"line": 188,
|
|
8273
|
+
"origin": "js-markup",
|
|
8274
|
+
"confidence": "certain"
|
|
8275
|
+
},
|
|
8221
8276
|
{
|
|
8222
8277
|
"id": "dad3388b49c9",
|
|
8223
8278
|
"surface": "builders-hall",
|
|
@@ -8286,7 +8341,7 @@
|
|
|
8286
8341
|
"surface": "builders-hall",
|
|
8287
8342
|
"text": "It already exists, so gather what it has first",
|
|
8288
8343
|
"file": "modules/hall-ui/public/genesis-home.js",
|
|
8289
|
-
"line":
|
|
8344
|
+
"line": 137,
|
|
8290
8345
|
"origin": "js-markup",
|
|
8291
8346
|
"confidence": "certain"
|
|
8292
8347
|
},
|
|
@@ -8560,6 +8615,15 @@
|
|
|
8560
8615
|
"origin": "js-markup",
|
|
8561
8616
|
"confidence": "certain"
|
|
8562
8617
|
},
|
|
8618
|
+
{
|
|
8619
|
+
"id": "a8b5cad4da17",
|
|
8620
|
+
"surface": "builders-hall",
|
|
8621
|
+
"text": "Keep it as it was",
|
|
8622
|
+
"file": "modules/hall-ui/public/genesis-home.js",
|
|
8623
|
+
"line": 140,
|
|
8624
|
+
"origin": "js-markup",
|
|
8625
|
+
"confidence": "certain"
|
|
8626
|
+
},
|
|
8563
8627
|
{
|
|
8564
8628
|
"id": "e3bbba45305c",
|
|
8565
8629
|
"surface": "builders-hall",
|
|
@@ -8731,6 +8795,15 @@
|
|
|
8731
8795
|
"origin": "js-markup",
|
|
8732
8796
|
"confidence": "certain"
|
|
8733
8797
|
},
|
|
8798
|
+
{
|
|
8799
|
+
"id": "3ab09211648e",
|
|
8800
|
+
"surface": "builders-hall",
|
|
8801
|
+
"text": "Leave it as it was",
|
|
8802
|
+
"file": "modules/hall-ui/public/genesis-home.js",
|
|
8803
|
+
"line": 190,
|
|
8804
|
+
"origin": "js-markup",
|
|
8805
|
+
"confidence": "certain"
|
|
8806
|
+
},
|
|
8734
8807
|
{
|
|
8735
8808
|
"id": "6137d2679912",
|
|
8736
8809
|
"surface": "builders-hall",
|
|
@@ -10257,7 +10330,7 @@
|
|
|
10257
10330
|
"surface": "builders-hall",
|
|
10258
10331
|
"text": "No tasks for this stage yet.",
|
|
10259
10332
|
"file": "modules/hall-ui/public/genesis-home.js",
|
|
10260
|
-
"line":
|
|
10333
|
+
"line": 325,
|
|
10261
10334
|
"origin": "js-markup",
|
|
10262
10335
|
"confidence": "certain"
|
|
10263
10336
|
},
|
|
@@ -10414,6 +10487,15 @@
|
|
|
10414
10487
|
"origin": "js-markup",
|
|
10415
10488
|
"confidence": "certain"
|
|
10416
10489
|
},
|
|
10490
|
+
{
|
|
10491
|
+
"id": "6e2719a97e46",
|
|
10492
|
+
"surface": "builders-hall",
|
|
10493
|
+
"text": "Not answered",
|
|
10494
|
+
"file": "modules/hall-ui/public/genesis-home.js",
|
|
10495
|
+
"line": 180,
|
|
10496
|
+
"origin": "js-markup",
|
|
10497
|
+
"confidence": "certain"
|
|
10498
|
+
},
|
|
10417
10499
|
{
|
|
10418
10500
|
"id": "fdfceec7ff97",
|
|
10419
10501
|
"surface": "builders-hall",
|
|
@@ -10702,6 +10784,24 @@
|
|
|
10702
10784
|
"origin": "html-text",
|
|
10703
10785
|
"confidence": "certain"
|
|
10704
10786
|
},
|
|
10787
|
+
{
|
|
10788
|
+
"id": "27a93fec8981",
|
|
10789
|
+
"surface": "builders-hall",
|
|
10790
|
+
"text": "Nothing changed.",
|
|
10791
|
+
"file": "modules/hall-ui/public/genesis-home.js",
|
|
10792
|
+
"line": 521,
|
|
10793
|
+
"origin": "js-notice",
|
|
10794
|
+
"confidence": "certain"
|
|
10795
|
+
},
|
|
10796
|
+
{
|
|
10797
|
+
"id": "27a93fec8981",
|
|
10798
|
+
"surface": "builders-hall",
|
|
10799
|
+
"text": "Nothing changed.",
|
|
10800
|
+
"file": "modules/hall-ui/public/genesis-home.js",
|
|
10801
|
+
"line": 536,
|
|
10802
|
+
"origin": "js-notice",
|
|
10803
|
+
"confidence": "certain"
|
|
10804
|
+
},
|
|
10705
10805
|
{
|
|
10706
10806
|
"id": "cd652d04d616",
|
|
10707
10807
|
"surface": "builders-hall",
|
|
@@ -11229,7 +11329,7 @@
|
|
|
11229
11329
|
"surface": "builders-hall",
|
|
11230
11330
|
"text": "Open the Board Room",
|
|
11231
11331
|
"file": "modules/hall-ui/public/genesis-home.js",
|
|
11232
|
-
"line":
|
|
11332
|
+
"line": 368,
|
|
11233
11333
|
"origin": "js-markup",
|
|
11234
11334
|
"confidence": "certain"
|
|
11235
11335
|
},
|
|
@@ -11238,7 +11338,7 @@
|
|
|
11238
11338
|
"surface": "builders-hall",
|
|
11239
11339
|
"text": "Open the Board Room",
|
|
11240
11340
|
"file": "modules/hall-ui/public/genesis-home.js",
|
|
11241
|
-
"line":
|
|
11341
|
+
"line": 373,
|
|
11242
11342
|
"origin": "js-markup",
|
|
11243
11343
|
"confidence": "certain"
|
|
11244
11344
|
},
|
|
@@ -11247,7 +11347,7 @@
|
|
|
11247
11347
|
"surface": "builders-hall",
|
|
11248
11348
|
"text": "Open the Board Room",
|
|
11249
11349
|
"file": "modules/hall-ui/public/genesis-home.js",
|
|
11250
|
-
"line":
|
|
11350
|
+
"line": 411,
|
|
11251
11351
|
"origin": "js-markup",
|
|
11252
11352
|
"confidence": "certain"
|
|
11253
11353
|
},
|
|
@@ -12057,7 +12157,7 @@
|
|
|
12057
12157
|
"surface": "builders-hall",
|
|
12058
12158
|
"text": "Put it to the board again",
|
|
12059
12159
|
"file": "modules/hall-ui/public/genesis-home.js",
|
|
12060
|
-
"line":
|
|
12160
|
+
"line": 372,
|
|
12061
12161
|
"origin": "js-markup",
|
|
12062
12162
|
"confidence": "certain"
|
|
12063
12163
|
},
|
|
@@ -12075,7 +12175,7 @@
|
|
|
12075
12175
|
"surface": "builders-hall",
|
|
12076
12176
|
"text": "Put to the board",
|
|
12077
12177
|
"file": "modules/hall-ui/public/genesis-home.js",
|
|
12078
|
-
"line":
|
|
12178
|
+
"line": 262,
|
|
12079
12179
|
"origin": "js-markup",
|
|
12080
12180
|
"confidence": "certain"
|
|
12081
12181
|
},
|
|
@@ -12844,6 +12944,15 @@
|
|
|
12844
12944
|
"origin": "html-text",
|
|
12845
12945
|
"confidence": "certain"
|
|
12846
12946
|
},
|
|
12947
|
+
{
|
|
12948
|
+
"id": "454c50ce68ee",
|
|
12949
|
+
"surface": "builders-hall",
|
|
12950
|
+
"text": "Save changes",
|
|
12951
|
+
"file": "modules/hall-ui/public/genesis-home.js",
|
|
12952
|
+
"line": 189,
|
|
12953
|
+
"origin": "js-markup",
|
|
12954
|
+
"confidence": "certain"
|
|
12955
|
+
},
|
|
12847
12956
|
{
|
|
12848
12957
|
"id": "819cdcaac499",
|
|
12849
12958
|
"surface": "builders-hall",
|
|
@@ -12943,6 +13052,15 @@
|
|
|
12943
13052
|
"origin": "js-notice",
|
|
12944
13053
|
"confidence": "certain"
|
|
12945
13054
|
},
|
|
13055
|
+
{
|
|
13056
|
+
"id": "894b58c799d3",
|
|
13057
|
+
"surface": "builders-hall",
|
|
13058
|
+
"text": "Saved.",
|
|
13059
|
+
"file": "modules/hall-ui/public/genesis-home.js",
|
|
13060
|
+
"line": 523,
|
|
13061
|
+
"origin": "js-notice",
|
|
13062
|
+
"confidence": "certain"
|
|
13063
|
+
},
|
|
12946
13064
|
{
|
|
12947
13065
|
"id": "05ac4161592b",
|
|
12948
13066
|
"surface": "builders-hall",
|
|
@@ -14019,7 +14137,7 @@
|
|
|
14019
14137
|
"surface": "builders-hall",
|
|
14020
14138
|
"text": "Starting government",
|
|
14021
14139
|
"file": "modules/hall-ui/public/genesis-home.js",
|
|
14022
|
-
"line":
|
|
14140
|
+
"line": 158,
|
|
14023
14141
|
"origin": "js-markup",
|
|
14024
14142
|
"confidence": "certain"
|
|
14025
14143
|
},
|
|
@@ -14559,7 +14677,7 @@
|
|
|
14559
14677
|
"surface": "builders-hall",
|
|
14560
14678
|
"text": "The board sent this stage back. Read why in the Board Room, then put it up again.",
|
|
14561
14679
|
"file": "modules/hall-ui/public/genesis-home.js",
|
|
14562
|
-
"line":
|
|
14680
|
+
"line": 371,
|
|
14563
14681
|
"origin": "js-markup",
|
|
14564
14682
|
"confidence": "certain"
|
|
14565
14683
|
},
|
|
@@ -15090,7 +15208,7 @@
|
|
|
15090
15208
|
"surface": "builders-hall",
|
|
15091
15209
|
"text": "The project’s life so far",
|
|
15092
15210
|
"file": "modules/hall-ui/public/genesis-home.js",
|
|
15093
|
-
"line":
|
|
15211
|
+
"line": 216,
|
|
15094
15212
|
"origin": "js-markup",
|
|
15095
15213
|
"confidence": "certain"
|
|
15096
15214
|
},
|
|
@@ -16255,15 +16373,6 @@
|
|
|
16255
16373
|
"origin": "js-markup",
|
|
16256
16374
|
"confidence": "certain"
|
|
16257
16375
|
},
|
|
16258
|
-
{
|
|
16259
|
-
"id": "fe0f438b2ff9",
|
|
16260
|
-
"surface": "builders-hall",
|
|
16261
|
-
"text": "Use this plan",
|
|
16262
|
-
"file": "modules/hall-ui/public/genesis-home.js",
|
|
16263
|
-
"line": 128,
|
|
16264
|
-
"origin": "js-markup",
|
|
16265
|
-
"confidence": "certain"
|
|
16266
|
-
},
|
|
16267
16376
|
{
|
|
16268
16377
|
"id": "e1ecd543a2ca",
|
|
16269
16378
|
"surface": "builders-hall",
|
|
@@ -16890,7 +16999,7 @@
|
|
|
16890
16999
|
"surface": "builders-hall",
|
|
16891
17000
|
"text": "What your stages left behind. Edit any of them at any time; it does not reopen the stage.",
|
|
16892
17001
|
"file": "modules/hall-ui/public/genesis-home.js",
|
|
16893
|
-
"line":
|
|
17002
|
+
"line": 349,
|
|
16894
17003
|
"origin": "js-markup",
|
|
16895
17004
|
"confidence": "certain"
|
|
16896
17005
|
},
|
|
@@ -3484,5 +3484,7 @@ is load-bearing: the script throws rather than guess if it is missing, and
|
|
|
3484
3484
|
landed since 1.25.21 with no explicit bump. run 43533357293. (task 1002620)
|
|
3485
3485
|
1.25.23 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
|
|
3486
3486
|
landed since 1.25.22 with no explicit bump. run 43534547421. (task 1002620)
|
|
3487
|
+
1.25.24 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
|
|
3488
|
+
landed since 1.25.23 with no explicit bump. run 43535990130. (task 1002620)
|
|
3487
3489
|
---------------------------------------------------------------------------
|
|
3488
3490
|
```
|
package/docs/page-readings.json
CHANGED
|
@@ -954,7 +954,7 @@
|
|
|
954
954
|
"surface": "builders",
|
|
955
955
|
"title": "Builders' Hall",
|
|
956
956
|
"states_read": ["home","out","founding","genesis","decide","demo","votes"],
|
|
957
|
-
"files_hash": "
|
|
957
|
+
"files_hash": "d43337a7032689aa",
|
|
958
958
|
"reading_hash": "c5f4986bd90e2a2a",
|
|
959
959
|
"counts": {"lines":29,"placed":8,"shared":8,"unplaced":13},
|
|
960
960
|
"omitted": {"data":4},
|
|
@@ -30,7 +30,8 @@
|
|
|
30
30
|
stage_tasks_unfinished: 'This stage still has unfinished tasks.',
|
|
31
31
|
not_current_stage: 'That stage is already behind you.',
|
|
32
32
|
legislation_not_passed: 'Legislation has to pass the Board Room first.',
|
|
33
|
-
|
|
33
|
+
stage_closed: 'The Board Room has passed that stage, so its answers are fixed.',
|
|
34
|
+
stage_lock_unknown: 'The Board Room could not be read, so nothing was changed. Try again in a moment.',
|
|
34
35
|
};
|
|
35
36
|
|
|
36
37
|
// What saving the plan did to the government, when it was not settled in the same
|
|
@@ -99,9 +100,17 @@
|
|
|
99
100
|
|
|
100
101
|
// ── decide ────────────────────────────────────────────────────────────────
|
|
101
102
|
|
|
103
|
+
// Task 1005107: the same form REVISES a saved plan — it opens with the founder's own
|
|
104
|
+
// answers, and saving the same plan again changes nothing on the server.
|
|
102
105
|
function decideHtml(g, gov) {
|
|
106
|
+
var p = g.plan || null;
|
|
107
|
+
if (p && p.government && gov) gov = Object.assign({}, gov, { recommended: { key: p.government } });
|
|
108
|
+
if (p && p.expected_builders && gov) gov = Object.assign({}, gov, { headcount: p.expected_builders });
|
|
103
109
|
var rows = g.stages.map(function (s) {
|
|
104
|
-
|
|
110
|
+
// A saved length that is not one of the presets is kept as its own choice, so
|
|
111
|
+
// reopening the plan never quietly changes it (task 1005107).
|
|
112
|
+
var choices = DAY_CHOICES.indexOf(s.days) < 0 ? DAY_CHOICES.concat([s.days]).sort(function (x, y) { return x - y; }) : DAY_CHOICES;
|
|
113
|
+
var opts = choices.map(function (d) {
|
|
105
114
|
return '<option value="' + d + '"' + (d === s.days ? ' selected' : '') + '>' + d + (d === 1 ? ' day' : ' days') + '</option>';
|
|
106
115
|
}).join('');
|
|
107
116
|
return '<li class="genesis__plan-row">'
|
|
@@ -110,22 +119,25 @@
|
|
|
110
119
|
+ '<label class="genesis__plan-len"><span class="sr-only">Length of ' + esc(s.label) + '</span>'
|
|
111
120
|
+ '<select data-days="' + esc(s.key) + '">' + opts + '</select></label></li>';
|
|
112
121
|
}).join('');
|
|
113
|
-
return
|
|
114
|
-
|
|
122
|
+
return (p
|
|
123
|
+
? '<p class="scroll__lede">Change any of your answers. Due dates follow the new lengths; a new government goes to the board like any charter change.</p>'
|
|
124
|
+
: '<p class="scroll__lede">Settle the plan and each stage becomes real tasks. '
|
|
125
|
+
+ 'Everything is preset to our recommendation, so one click is enough.</p>')
|
|
115
126
|
+ '<ol class="genesis__plan">' + rows + '</ol>'
|
|
116
127
|
+ '<div class="genesis__picks">'
|
|
117
128
|
+ governmentHtml(gov)
|
|
118
129
|
+ '<fieldset class="genesis__pick"><legend>How many passes</legend>'
|
|
119
|
-
+ radio('passes', '1', 'One', 'Each stage is decided once.',
|
|
120
|
-
+ radio('passes', '2', 'Two', 'Once now, and again when your next builders join.',
|
|
130
|
+
+ radio('passes', '1', 'One', 'Each stage is decided once.', !p || p.passes !== 2)
|
|
131
|
+
+ radio('passes', '2', 'Two', 'Once now, and again when your next builders join.', !!p && p.passes === 2)
|
|
121
132
|
+ '</fieldset>'
|
|
122
133
|
+ '<fieldset class="genesis__pick"><legend>Advisors</legend>'
|
|
123
|
-
+ radio('advisors', 'none', 'None for now', 'You can add advisors at any stage.',
|
|
124
|
-
+ radio('advisors', 'cbaas', 'Cloud Bongos advisors', 'Our consultants review each stage.',
|
|
134
|
+
+ radio('advisors', 'none', 'None for now', 'You can add advisors at any stage.', !p || p.advisors !== 'cbaas')
|
|
135
|
+
+ radio('advisors', 'cbaas', 'Cloud Bongos advisors', 'Our consultants review each stage.', !!p && p.advisors === 'cbaas')
|
|
125
136
|
+ '</fieldset>'
|
|
126
|
-
+ '<label class="genesis__check"><input type="checkbox" data-existing> It already exists, so gather what it has first</label>'
|
|
137
|
+
+ '<label class="genesis__check"><input type="checkbox" data-existing' + (p && p.existing ? ' checked' : '') + '> It already exists, so gather what it has first</label>'
|
|
127
138
|
+ '</div>'
|
|
128
|
-
+ '<div class="genesis__doors"><button type="button" class="btn-accent" data-genesis-plan>Use this plan</button
|
|
139
|
+
+ '<div class="genesis__doors"><button type="button" class="btn-accent" data-genesis-plan>' + (p ? 'Save the plan' : 'Use this plan') + '</button>'
|
|
140
|
+
+ (p ? '<button type="button" class="btn-ghost" data-genesis-plan-cancel>Keep it as it was</button>' : '') + '</div>';
|
|
129
141
|
}
|
|
130
142
|
|
|
131
143
|
function radio(name, value, label, hint, checked) {
|
|
@@ -157,6 +169,47 @@
|
|
|
157
169
|
+ '</fieldset>';
|
|
158
170
|
}
|
|
159
171
|
|
|
172
|
+
// ── changing a finished stage's answers (task 1005107) ─────────────────────
|
|
173
|
+
// The stage's own record (GET /founding/work/:stage), opened in place with the answers
|
|
174
|
+
// already given. Save sends only what changed; nothing changed sends nothing.
|
|
175
|
+
function stageEditorHtml(w) {
|
|
176
|
+
if (!w) return '';
|
|
177
|
+
var rows = (w.questions || []).map(function (q) {
|
|
178
|
+
var cur = q.answer && q.answer.state === 'answered' ? (q.answer.text || '') : '';
|
|
179
|
+
var field = q.choices
|
|
180
|
+
? '<select data-answer="' + esc(q.id) + '"><option value=""' + (cur ? '' : ' selected') + '>Not answered</option>'
|
|
181
|
+
+ q.choices.map(function (c) { return '<option value="' + esc(c.key) + '"' + (c.key === cur ? ' selected' : '') + '>' + esc(c.label) + '</option>'; }).join('') + '</select>'
|
|
182
|
+
: '<textarea rows="3" data-answer="' + esc(q.id) + '">' + esc(cur) + '</textarea>';
|
|
183
|
+
return '<label class="genesis__edit-q"><b>' + esc(q.ask) + '</b>' + field + '</label>';
|
|
184
|
+
}).join('');
|
|
185
|
+
return '<section class="genesis__edit" aria-label="Change the ' + esc(w.stage) + ' answers">'
|
|
186
|
+
+ '<h3 class="genesis__now-h">Change the ' + esc(w.stage) + ' answers</h3>'
|
|
187
|
+
+ '<p class="genesis__note">Changing them does not reopen the stage.</p>' + rows
|
|
188
|
+
+ '<label class="genesis__edit-q"><b>In your own words</b><textarea rows="5" data-page>' + esc(w.page || '') + '</textarea></label>'
|
|
189
|
+
+ '<div class="genesis__doors"><button type="button" class="btn-accent" data-genesis-stage-save>Save changes</button>'
|
|
190
|
+
+ '<button type="button" class="btn-ghost" data-genesis-stage-cancel>Leave it as it was</button></div></section>';
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// stageChanges(w, host) → the writes the edited form needs, only for what changed.
|
|
194
|
+
function stageChanges(w, host) {
|
|
195
|
+
var out = [];
|
|
196
|
+
(w.questions || []).forEach(function (q) {
|
|
197
|
+
var el = host.querySelector('[data-answer="' + q.id + '"]');
|
|
198
|
+
if (!el) return;
|
|
199
|
+
var was = q.answer && q.answer.state === 'answered' ? (q.answer.text || '') : '';
|
|
200
|
+
var now = String(el.value || '').trim();
|
|
201
|
+
if (now === was.trim()) return;
|
|
202
|
+
var path = '/founding/work/' + encodeURIComponent(w.stage) + '/answers/' + encodeURIComponent(q.id);
|
|
203
|
+
if (now) out.push(['PUT', path, { state: 'answered', text: now }]);
|
|
204
|
+
else if (q.answer) out.push(['DELETE', path, null]);
|
|
205
|
+
});
|
|
206
|
+
var page = host.querySelector('[data-page]');
|
|
207
|
+
if (page && String(page.value || '').trim() !== String(w.page || '').trim()) {
|
|
208
|
+
out.push(['PUT', '/founding/work/' + encodeURIComponent(w.stage) + '/page', { page: String(page.value || '') }]);
|
|
209
|
+
}
|
|
210
|
+
return out;
|
|
211
|
+
}
|
|
212
|
+
|
|
160
213
|
// ── the stages ────────────────────────────────────────────────────────────
|
|
161
214
|
|
|
162
215
|
function lifeHtml(g) {
|
|
@@ -207,9 +260,15 @@
|
|
|
207
260
|
// buildings it raises, and for a stage that wakes no room, what it earns.
|
|
208
261
|
+ '<span>' + esc(gainsText(s)) + esc(due) + '</span>'
|
|
209
262
|
+ (s.state === 'later' && s.can_close ? '<span><button type="button" class="btn-ghost" data-genesis-close="' + esc(s.key) + '">Put to the board</button></span>' : '')
|
|
263
|
+
// Task 1005107: a finished stage stays editable unless the Board Room passed it.
|
|
264
|
+
+ (s.state === 'done' ? (s.locked
|
|
265
|
+
? '<span class="genesis__stage-fixed">' + esc('Fixed: ' + s.locked.reason) + '</span>'
|
|
266
|
+
: '<span><button type="button" class="btn-ghost" data-genesis-stage-edit="' + esc(s.key) + '">Change its answers</button></span>') : '')
|
|
210
267
|
+ '</span>'
|
|
211
268
|
+ '<span class="genesis__stage-st">' + esc(stateText(s)) + '</span></li>';
|
|
212
|
-
}).join('') + '</ol>'
|
|
269
|
+
}).join('') + '</ol>'
|
|
270
|
+
// Task 1005107: the plan is never a trap — reopen it with the answers already given.
|
|
271
|
+
+ (g.plan_editable && !g.demo ? '<div class="genesis__doors"><button type="button" class="btn-ghost" data-genesis-plan-edit>Change the plan</button></div>' : '');
|
|
213
272
|
}
|
|
214
273
|
|
|
215
274
|
// task 1005109: Copy prompt on each task still to do, so the founder pastes it into
|
|
@@ -382,9 +441,10 @@
|
|
|
382
441
|
function render(host, state) {
|
|
383
442
|
var g = state.genesis;
|
|
384
443
|
if (!g) { host.hidden = true; return; }
|
|
385
|
-
host.innerHTML = headHtml(g) + (g.deciding
|
|
386
|
-
? decideHtml(g, state.gov)
|
|
387
|
-
: demoHtml(g) + lifeHtml(g) + votesHtml(g, state.viewer) + '<div class="genesis__grid">' + stagesHtml(g) + nowHtml(g, state.viewer) + '</div>'
|
|
444
|
+
host.innerHTML = headHtml(g) + (g.deciding || state.editingPlan
|
|
445
|
+
? decideHtml(g.deciding ? Object.assign({}, g, { plan: null }) : g, state.gov)
|
|
446
|
+
: demoHtml(g) + lifeHtml(g) + votesHtml(g, state.viewer) + '<div class="genesis__grid">' + stagesHtml(g) + nowHtml(g, state.viewer) + '</div>'
|
|
447
|
+
+ stageEditorHtml(state.stageWork));
|
|
388
448
|
host.hidden = false;
|
|
389
449
|
}
|
|
390
450
|
|
|
@@ -449,22 +509,44 @@
|
|
|
449
509
|
if (!t || !host.contains(t)) return;
|
|
450
510
|
if (t.hasAttribute('data-genesis-copy')) {
|
|
451
511
|
copyPrompt(t, state);
|
|
512
|
+
} else if (t.hasAttribute('data-genesis-stage-edit')) {
|
|
513
|
+
act(send('GET', '/founding/work/' + encodeURIComponent(t.getAttribute('data-genesis-stage-edit'))).then(function (d) {
|
|
514
|
+
state.stageWork = d && d.work; render(host, state);
|
|
515
|
+
}));
|
|
516
|
+
} else if (t.hasAttribute('data-genesis-stage-cancel')) {
|
|
517
|
+
state.stageWork = null;
|
|
518
|
+
render(host, state);
|
|
519
|
+
} else if (t.hasAttribute('data-genesis-stage-save')) {
|
|
520
|
+
var writes = stageChanges(state.stageWork, host);
|
|
521
|
+
if (!writes.length) { state.stageWork = null; render(host, state); toast('Nothing changed.'); return; }
|
|
522
|
+
act(writes.reduce(function (p, w) { return p.then(function () { return send(w[0], w[1], w[2]); }); }, Promise.resolve())
|
|
523
|
+
.then(function () { state.stageWork = null; render(host, state); toast('Saved.'); }));
|
|
524
|
+
} else if (t.hasAttribute('data-genesis-plan-edit')) {
|
|
525
|
+
var exp = state.genesis && state.genesis.plan && state.genesis.plan.expected_builders;
|
|
526
|
+
act(loadGov(exp || null).then(function (gov) { state.gov = gov; state.editingPlan = true; render(host, state); }));
|
|
527
|
+
} else if (t.hasAttribute('data-genesis-plan-cancel')) {
|
|
528
|
+
state.editingPlan = false;
|
|
529
|
+
render(host, state);
|
|
452
530
|
} else if (t.hasAttribute('data-genesis-plan')) {
|
|
453
531
|
// The government picked here is filed as a charter amendment with the plan
|
|
454
532
|
// (task 1004656). When the founder's one yes decides it, saving the plan is
|
|
455
533
|
// that yes too, the same one-click fast-track the stage closes take.
|
|
456
534
|
act(send('POST', '/founding/plan', planBody(host)).then(function (out) {
|
|
535
|
+
// A revision (task 1005107): say if nothing changed, and every change it could not carry.
|
|
536
|
+
if (out && out.revised === false) { state.editingPlan = false; render(host, state); toast('Nothing changed.'); return 'stay'; }
|
|
537
|
+
var held = !!(out && out.could_not && out.could_not.length);
|
|
538
|
+
if (held) toast(out.could_not.join(' '));
|
|
457
539
|
var c = out && out.charter;
|
|
458
540
|
if (c && c.state === 'sitting' && c.one_vote_decides && c.item_id) {
|
|
459
541
|
return send('POST', '/government/board/items/' + encodeURIComponent(c.item_id) + '/votes', { direction: 'yes' })
|
|
460
542
|
.catch(function () { return null; });
|
|
461
543
|
}
|
|
462
544
|
var said = charterNote(c);
|
|
463
|
-
if (!said) return null;
|
|
545
|
+
if (!said) return held ? window.OTB.sleep(3500) : null;
|
|
464
546
|
toast(said);
|
|
465
547
|
// Give the sentence time to be read before the reload takes it away.
|
|
466
548
|
return window.OTB.sleep(3500);
|
|
467
|
-
}).then(function () { window.location.reload(); }));
|
|
549
|
+
}).then(function (r) { if (r !== 'stay') window.location.reload(); }));
|
|
468
550
|
} else if (t.hasAttribute('data-genesis-close')) {
|
|
469
551
|
// One call (task 1005121): where the founder's one yes decides, the server
|
|
470
552
|
// closes the stage with it; otherwise it answers 202 with what the sitting
|