From e1b1a941c73e255c439ff95372b652fd7ac57f00 Mon Sep 17 00:00:00 2001 From: Goodness Chris-Ugari Date: Tue, 27 Feb 2024 10:12:46 +0100 Subject: [PATCH] Added skipLogic to tables --- app/config/tables/SkipLogic/definition.csv | 12 + .../SkipLogic/forms/SkipLogic/SkipLogic.xlsx | Bin 0 -> 10418 bytes .../SkipLogic/forms/SkipLogic/formDef.json | 1713 +++++++++++++++++ .../SkipLogic/html/SkipLogic_detail.html | 42 + .../tables/SkipLogic/html/SkipLogic_list.html | 45 + .../tables/SkipLogic/js/SkipLogic_detail.js | 42 + .../tables/SkipLogic/js/SkipLogic_list.js | 46 + app/config/tables/SkipLogic/properties.csv | 11 + .../SkipLogic/tableSpecificDefinitions.js | 3 + 9 files changed, 1914 insertions(+) create mode 100644 app/config/tables/SkipLogic/definition.csv create mode 100644 app/config/tables/SkipLogic/forms/SkipLogic/SkipLogic.xlsx create mode 100644 app/config/tables/SkipLogic/forms/SkipLogic/formDef.json create mode 100644 app/config/tables/SkipLogic/html/SkipLogic_detail.html create mode 100644 app/config/tables/SkipLogic/html/SkipLogic_list.html create mode 100644 app/config/tables/SkipLogic/js/SkipLogic_detail.js create mode 100644 app/config/tables/SkipLogic/js/SkipLogic_list.js create mode 100644 app/config/tables/SkipLogic/properties.csv create mode 100644 app/config/tables/SkipLogic/tableSpecificDefinitions.js diff --git a/app/config/tables/SkipLogic/definition.csv b/app/config/tables/SkipLogic/definition.csv new file mode 100644 index 000000000..6a22d74b8 --- /dev/null +++ b/app/config/tables/SkipLogic/definition.csv @@ -0,0 +1,12 @@ +_element_key,_element_name,_element_type,_list_child_element_keys +box,box,string,[] +flavor,flavor,string,[] +location,location,geopoint,"[""location_accuracy"",""location_altitude"",""location_latitude"",""location_longitude""]" +location_accuracy,accuracy,number,[] +location_altitude,altitude,number,[] +location_latitude,latitude,number,[] +location_longitude,longitude,number,[] +menu,menu,string,[] +name,name,string,[] +size,size,string,[] +state,state,string,[] diff --git a/app/config/tables/SkipLogic/forms/SkipLogic/SkipLogic.xlsx b/app/config/tables/SkipLogic/forms/SkipLogic/SkipLogic.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..33717917a6518ec6ff2a5f2daeccf9d23981d3ab GIT binary patch literal 10418 zcmbVyWk6iZvM%oK?(UW_1Si4WgS!TI$>2Ufa0u=a+}+)S1a}Aof&?9$2YcUlcTV0p z=f|rx1GAc`Z_(A=Uv*cNk}Na~4g>-M0)#9jmMX+=g8cm1z{$+UnVs$BXL($=LN5nO z$cc9Z6ZqAt2trO_tDICTB@bB_jU91)cwS%N+0{F2ER?94-e^Z3-$&zuH90$$H4Zvi z{cv@yaHw`V6JSx_=%b@2`|I&sp8-sOq>BApCZ|t|G8bc;q9ggVk<0s7 z1ZcxTH48!VTr&eUkFK92pb?^QNXcU+Q|=xQ;mtHgQ$8e&?x&<+w>0lMIT&BSjkjS1 zaag!`%ToiTX)ihzMrV4?03&DjSvdq$=>xbefIWHu1Q;L z-Pcc(|8hA%?Q3SDK{bcH-l&C$+o-1(NF|>m-yfT4ezd#nFmw1s!L2!$UA5o8h zeJ)JU!tf3bIm4D&X(50hhJ?{uCt|5)u?_<(b16VTe?H4o+=^b;d@QTI@Zp;W=B7H4;3Tgn+6Od36>(je-R~rnB=8Tl!{iu5!*M+^RhR;Z3(M=byZaa?b(rkh zl*y%ImW(DL=H3w!;kiSP1zNA(37*Yn28UYYIJJKwtpDNRxZe7+cBncZ4$V97QOgb9 zSkHJ&ViRCYc6O0N$z&erw}NEE(n5h2tV+wD?J*8QI%8*Y66DXybPAdaS$f+%1MpDr z$x?OUWtKX~sG>?tsQ-+hl5!_tt;CMWLNT47cPpuR?`?nIXbwM!e6ogn^0>aHRbmy# z76`6vLMNfMAS*T?M2!*QFwOc=PKDMRq6XbhpMl+%UJTebDEfJ!@ApoD#XXP$fmj!? zAqhGbI0~3`@vTKy$%k7)br|hxE63!#JM|$zji2H;cz0ekkJ!5`y7#tH_y>!9vaB_* zMrvR*tBwH8Rm@;|*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9=`^V^+AhD~15Jj%fJ_{jS%4lTJzp5o|Gp|S z>xYB#laop?sMELvi&t+(${pk54d$r)encMS5L7q|@We_Q03&x_pD-bBgC-ocsO z#NNs5Wg`hxkym`C!uE6KFDtb)8E~p~u2=^2F)<8Kj-x8IuuD8L0t1hN(v3-#;b}+U zvqOCEhHJ}%L(-2N3m2KYTVl`>9p2V%8_O`VG$esbX_D3+uoQ6&e+3f=71;Qx5z?ZLZGf;{z#behL? zfyF>{du=+Vj{tS9iXFU}h0Q7i`7&-KHkinskPr~Z|FysXp;CU<5(hf}v8-p;PQ zD(=C--N@HmIwHDQ>`0VV>!V4>8sNA5ibVV_uP;w!K z8Nr9QWf+T?*3In9j1a7-X!NZ14+Q|}?%@qXvY_nma4fBE^SacqVZ)Fh7K#siML5<4 z3lkft$$Tbk)Z+FknT{$v(GxwN54RxW->7|4UJS;*q58;ob9(UVK^Dz){p5Php3>Vk z&&OgJ|D|7>a}a*X&;Rx5^ZUQ|OXsbB;{ECa zWE7`)AUyjg87iT)rA*tz%eV%Ld+%lW@NPa@mJ!w3%=6XM^jen|JoP##ljb-r0kK{H zlr-*k&Cu51jja==B7LAs$CM%UIkSZ8+;wrqF=o*7k+e$MlEzPv$7XlY`_@`K;lPR~wP*t?h~f7RPMlWWwAsI-S+1 zhxS|4?jrO{*#3@f-ZYI7nYSCW7;YTU4VAC;w2S(>&rruTPemhscJA$W z^E9-9e;G1JC>)4?YN>uNA9|^!`d9g_vg%L8-%CPXs*C;+`sYXeQET+4^6z=(m#UF} zB=XrqJS+cGL-MEU?+K=tG}1rf^4z`udG7y{mi`mv_ek`=qBJ~P;oqSAm74k!<@XTD zzoN`Mo8;f1{1wCg6Xo~A!oQ;UJ-f<(gYs8!Order Summary for {{data.name}}" + } + }, + "_row_num": 24 + }, + { + "type": "note", + "display": { + "prompt": { + "text": "
    1. {{data.menu}}, {{data.size}} {{data.flavor}} {{data.box}}
" + } + }, + "_row_num": 25 + }, + { + "clause": "end screen", + "_row_num": 26 + } + ], + "choices": [ + { + "choice_list_name": "order_list", + "data_value": "cupcake", + "display": { + "title": { + "text": "Cupcakes" + } + }, + "_row_num": 2 + }, + { + "choice_list_name": "order_list", + "data_value": "cinnamon roll", + "display": { + "title": { + "text": "Cinnamon Rolls" + } + }, + "_row_num": 3 + }, + { + "choice_list_name": "order_list", + "data_value": "croissant", + "display": { + "title": { + "text": "Croissants" + } + }, + "_row_num": 4 + }, + { + "choice_list_name": "order_list", + "data_value": "cake", + "display": { + "title": { + "text": "Cake" + } + }, + "_row_num": 5 + }, + { + "choice_list_name": "order_list", + "data_value": "doughnut", + "display": { + "title": { + "text": "Doughnuts" + } + }, + "_row_num": 6 + }, + { + "choice_list_name": "order_list", + "data_value": "bread roll", + "display": { + "title": { + "text": "Bread Rolls" + } + }, + "_row_num": 7 + }, + { + "choice_list_name": "box_list", + "data_value": "box of 4", + "display": { + "title": { + "text": "A box of 4" + } + }, + "_row_num": 8 + }, + { + "choice_list_name": "box_list", + "data_value": "box of 6", + "display": { + "title": { + "text": "A box of 6" + } + }, + "_row_num": 9 + }, + { + "choice_list_name": "box_list", + "data_value": "box of 8", + "display": { + "title": { + "text": "A box of 8" + } + }, + "_row_num": 10 + }, + { + "choice_list_name": "box_list", + "data_value": "box of 10", + "display": { + "title": { + "text": "A box of 10" + } + }, + "_row_num": 11 + }, + { + "choice_list_name": "size_list", + "data_value": "6\"", + "display": { + "title": { + "text": "6 inches" + } + }, + "_row_num": 12 + }, + { + "choice_list_name": "size_list", + "data_value": "8\"", + "display": { + "title": { + "text": "8 inches" + } + }, + "_row_num": 13 + }, + { + "choice_list_name": "size_list", + "data_value": "10\"", + "display": { + "title": { + "text": "10 inches" + } + }, + "_row_num": 14 + }, + { + "choice_list_name": "size_list", + "data_value": "12\"", + "display": { + "title": { + "text": "12 inches" + } + }, + "_row_num": 15 + }, + { + "choice_list_name": "flavor_list", + "data_value": "choc fudge", + "display": { + "title": { + "text": "Chocolate Fudge" + } + }, + "_row_num": 16 + }, + { + "choice_list_name": "flavor_list", + "data_value": "red velvet", + "display": { + "title": { + "text": "Red Velvet" + } + }, + "_row_num": 17 + }, + { + "choice_list_name": "flavor_list", + "data_value": "cheese", + "display": { + "title": { + "text": "Cheese Cake" + } + }, + "_row_num": 18 + }, + { + "choice_list_name": "flavor_list", + "data_value": "cookies and cream", + "display": { + "title": { + "text": "Cookies and Cream" + } + }, + "_row_num": 19 + }, + { + "choice_list_name": "flavor_list", + "data_value": "white choc", + "display": { + "title": { + "text": "White Chocolate" + } + }, + "_row_num": 20 + } + ] + }, + "specification": { + "column_types": { + "_screen_block": "function", + "condition": "formula", + "constraint": "formula", + "required": "formula", + "calculation": "formula", + "newRowInitialElementKeyToValueMap": "formula", + "openRowInitialElementKeyToValueMap": "formula", + "selectionArgs": "formula", + "url": "formula", + "uri": "formula", + "callback": "formula(context)", + "choice_filter": "formula(choice_item)", + "templatePath": "requirejs_path", + "hideInContents": "formula" + }, + "settings": { + "form_id": { + "setting_name": "form_id", + "value": "SkipLogic", + "_row_num": 2 + }, + "form_version": { + "setting_name": "form_version", + "value": 20210726, + "_row_num": 3 + }, + "table_id": { + "setting_name": "table_id", + "value": "SkipLogic", + "_row_num": 4 + }, + "survey": { + "setting_name": "survey", + "display": { + "title": { + "text": "Skip Logic Example Form" + } + }, + "_row_num": 5 + }, + "_locales": { + "setting_name": "_locales", + "_row_num": 5, + "value": [ + { + "display": { + "locale": { + "text": "default" + } + }, + "name": "default" + } + ] + }, + "_default_locale": { + "setting_name": "_default_locale", + "_row_num": 5, + "value": "default" + }, + "initial": { + "setting_name": "survey", + "display": { + "title": { + "text": "Skip Logic Example Form" + } + }, + "_row_num": 5 + } + }, + "choices": { + "order_list": [ + { + "choice_list_name": "order_list", + "data_value": "cupcake", + "display": { + "title": { + "text": "Cupcakes" + } + }, + "_row_num": 2 + }, + { + "choice_list_name": "order_list", + "data_value": "cinnamon roll", + "display": { + "title": { + "text": "Cinnamon Rolls" + } + }, + "_row_num": 3 + }, + { + "choice_list_name": "order_list", + "data_value": "croissant", + "display": { + "title": { + "text": "Croissants" + } + }, + "_row_num": 4 + }, + { + "choice_list_name": "order_list", + "data_value": "cake", + "display": { + "title": { + "text": "Cake" + } + }, + "_row_num": 5 + }, + { + "choice_list_name": "order_list", + "data_value": "doughnut", + "display": { + "title": { + "text": "Doughnuts" + } + }, + "_row_num": 6 + }, + { + "choice_list_name": "order_list", + "data_value": "bread roll", + "display": { + "title": { + "text": "Bread Rolls" + } + }, + "_row_num": 7 + } + ], + "box_list": [ + { + "choice_list_name": "box_list", + "data_value": "box of 4", + "display": { + "title": { + "text": "A box of 4" + } + }, + "_row_num": 8 + }, + { + "choice_list_name": "box_list", + "data_value": "box of 6", + "display": { + "title": { + "text": "A box of 6" + } + }, + "_row_num": 9 + }, + { + "choice_list_name": "box_list", + "data_value": "box of 8", + "display": { + "title": { + "text": "A box of 8" + } + }, + "_row_num": 10 + }, + { + "choice_list_name": "box_list", + "data_value": "box of 10", + "display": { + "title": { + "text": "A box of 10" + } + }, + "_row_num": 11 + } + ], + "size_list": [ + { + "choice_list_name": "size_list", + "data_value": "6\"", + "display": { + "title": { + "text": "6 inches" + } + }, + "_row_num": 12 + }, + { + "choice_list_name": "size_list", + "data_value": "8\"", + "display": { + "title": { + "text": "8 inches" + } + }, + "_row_num": 13 + }, + { + "choice_list_name": "size_list", + "data_value": "10\"", + "display": { + "title": { + "text": "10 inches" + } + }, + "_row_num": 14 + }, + { + "choice_list_name": "size_list", + "data_value": "12\"", + "display": { + "title": { + "text": "12 inches" + } + }, + "_row_num": 15 + } + ], + "flavor_list": [ + { + "choice_list_name": "flavor_list", + "data_value": "choc fudge", + "display": { + "title": { + "text": "Chocolate Fudge" + } + }, + "_row_num": 16 + }, + { + "choice_list_name": "flavor_list", + "data_value": "red velvet", + "display": { + "title": { + "text": "Red Velvet" + } + }, + "_row_num": 17 + }, + { + "choice_list_name": "flavor_list", + "data_value": "cheese", + "display": { + "title": { + "text": "Cheese Cake" + } + }, + "_row_num": 18 + }, + { + "choice_list_name": "flavor_list", + "data_value": "cookies and cream", + "display": { + "title": { + "text": "Cookies and Cream" + } + }, + "_row_num": 19 + }, + { + "choice_list_name": "flavor_list", + "data_value": "white choc", + "display": { + "title": { + "text": "White Chocolate" + } + }, + "_row_num": 20 + } + ] + }, + "table_specific_definitions": { + "_tokens": {} + }, + "queries": {}, + "calculates": {}, + "model": { + "name": { + "_defn": [ + { + "_row_num": 3, + "section_name": "survey" + } + ], + "type": "string", + "elementKey": "name" + }, + "state": { + "_defn": [ + { + "_row_num": 4, + "section_name": "survey" + } + ], + "type": "string", + "elementKey": "state" + }, + "location": { + "_defn": [ + { + "_row_num": 5, + "section_name": "survey" + } + ], + "type": "object", + "elementType": "geopoint", + "properties": { + "latitude": { + "type": "number", + "elementKey": "location_latitude" + }, + "longitude": { + "type": "number", + "elementKey": "location_longitude" + }, + "altitude": { + "type": "number", + "elementKey": "location_altitude" + }, + "accuracy": { + "type": "number", + "elementKey": "location_accuracy" + } + }, + "elementKey": "location" + }, + "menu": { + "_defn": [ + { + "_row_num": 7, + "section_name": "survey" + } + ], + "type": "string", + "valuesList": "order_list", + "elementKey": "menu" + }, + "box": { + "type": "string", + "valuesList": "box_list", + "_defn": [ + { + "_row_num": 9, + "section_name": "survey" + }, + { + "_row_num": 19, + "section_name": "survey" + } + ], + "elementKey": "box" + }, + "size": { + "_defn": [ + { + "_row_num": 13, + "section_name": "survey" + } + ], + "type": "string", + "valuesList": "size_list", + "elementKey": "size" + }, + "flavor": { + "type": "string", + "valuesList": "flavor_list", + "_defn": [ + { + "_row_num": 14, + "section_name": "survey" + }, + { + "_row_num": 20, + "section_name": "survey" + } + ], + "elementKey": "flavor" + } + }, + "section_names": [ + "initial", + "survey" + ], + "sections": { + "survey": { + "section_name": "survey", + "nested_sections": {}, + "reachable_sections": {}, + "prompts": [ + { + "type": "text", + "name": "name", + "display": { + "prompt": { + "text": "What is your name?" + }, + "hint": { + "text": "Please enter your first and last name." + } + }, + "_row_num": 3, + "__rowNum__": 2, + "_token_type": "prompt", + "_type": "text", + "_branch_label_enclosing_screen": "survey/_screen2", + "promptIdx": 0 + }, + { + "type": "text", + "name": "state", + "display": { + "prompt": { + "text": "What state are you in?" + } + }, + "_row_num": 4, + "__rowNum__": 3, + "_token_type": "prompt", + "_type": "text", + "_branch_label_enclosing_screen": "survey/_screen2", + "promptIdx": 1 + }, + { + "type": "geopoint", + "name": "location", + "display": { + "prompt": { + "text": "Where is your location?" + } + }, + "_row_num": 5, + "__rowNum__": 4, + "_token_type": "prompt", + "_type": "geopoint", + "_branch_label_enclosing_screen": "survey/_screen2", + "promptIdx": 2 + }, + { + "type": "select_one", + "values_list": "order_list", + "name": "menu", + "display": { + "prompt": { + "text": "What would you like to get?" + } + }, + "_row_num": 7, + "__rowNum__": 6, + "_token_type": "prompt", + "_type": "select_one", + "_branch_label_enclosing_screen": "survey/_screen7", + "promptIdx": 3 + }, + { + "type": "select_one", + "values_list": "box_list", + "name": "box", + "display": { + "prompt": { + "text": "What would you like?" + } + }, + "_row_num": 9, + "__rowNum__": 8, + "_token_type": "prompt", + "_type": "select_one", + "_branch_label_enclosing_screen": "survey/_screen9", + "promptIdx": 4 + }, + { + "type": "select_one", + "values_list": "size_list", + "name": "size", + "display": { + "prompt": { + "text": "What size of cake would you like?" + } + }, + "_row_num": 13, + "__rowNum__": 12, + "_token_type": "prompt", + "_type": "select_one", + "_branch_label_enclosing_screen": "survey/_screen12", + "promptIdx": 5 + }, + { + "type": "select_one", + "values_list": "flavor_list", + "name": "flavor", + "display": { + "prompt": { + "text": "What cake flavor would you like?" + } + }, + "_row_num": 14, + "__rowNum__": 13, + "_token_type": "prompt", + "_type": "select_one", + "_branch_label_enclosing_screen": "survey/_screen12", + "promptIdx": 6 + }, + { + "type": "select_one", + "values_list": "box_list", + "name": "box", + "display": { + "prompt": { + "text": "What would you like?" + } + }, + "_row_num": 19, + "__rowNum__": 18, + "_token_type": "prompt", + "_type": "select_one", + "_branch_label_enclosing_screen": "survey/_screen18", + "promptIdx": 7 + }, + { + "type": "select_one", + "values_list": "flavor_list", + "name": "flavor", + "display": { + "prompt": { + "text": "What cake flavor would you like?" + } + }, + "_row_num": 20, + "__rowNum__": 19, + "_token_type": "prompt", + "_type": "select_one", + "_branch_label_enclosing_screen": "survey/_screen18", + "promptIdx": 8 + }, + { + "type": "note", + "display": { + "prompt": { + "text": "

Order Summary for {{data.name}}

" + } + }, + "_row_num": 24, + "__rowNum__": 23, + "_token_type": "prompt", + "_type": "note", + "_branch_label_enclosing_screen": "survey/_screen23", + "promptIdx": 9 + }, + { + "type": "note", + "display": { + "prompt": { + "text": "
    1. {{data.menu}}, {{data.size}} {{data.flavor}} {{data.box}}
" + } + }, + "_row_num": 25, + "__rowNum__": 24, + "_token_type": "prompt", + "_type": "note", + "_branch_label_enclosing_screen": "survey/_screen23", + "promptIdx": 10 + }, + { + "_token_type": "prompt", + "type": "contents", + "_type": "contents", + "_row_num": 27, + "_branch_label_enclosing_screen": "survey/_screen27", + "promptIdx": 11 + } + ], + "validation_tag_map": { + "finalize": [] + }, + "operations": [ + { + "clause": "begin screen", + "_row_num": 2, + "__rowNum__": 1, + "_token_type": "begin_screen", + "_end_screen_clause": { + "clause": "end screen", + "_row_num": 6, + "__rowNum__": 5, + "_token_type": "end_screen" + }, + "_screen_block": "function() {var activePromptIndicies = [];\nactivePromptIndicies.push(0);\nactivePromptIndicies.push(1);\nactivePromptIndicies.push(2);\n\nreturn activePromptIndicies;\n}\n", + "operationIdx": 0 + }, + { + "_row_num": 7, + "_token_type": "begin_screen", + "_screen_block": "function() {var activePromptIndicies = [];\nactivePromptIndicies.push(3);\n\nreturn activePromptIndicies;\n}\n", + "operationIdx": 1 + }, + { + "clause": "if", + "condition": "selected(data('menu'), 'doughnut') || selected(data('menu'), 'bread roll') || selected(data('menu'), 'cinnamon roll') || selected(data('menu'), 'croissant')", + "_row_num": 8, + "__rowNum__": 7, + "_token_type": "goto_label", + "_branch_label": "_then8", + "operationIdx": 2 + }, + { + "clause": "end if", + "_token_type": "goto_label", + "_branch_label": "_else10", + "_row_num": 10, + "operationIdx": 3 + }, + { + "_row_num": 9, + "_token_type": "begin_screen", + "_screen_block": "function() {var activePromptIndicies = [];\nactivePromptIndicies.push(4);\n\nreturn activePromptIndicies;\n}\n", + "operationIdx": 4 + }, + { + "clause": "end if", + "_token_type": "goto_label", + "_branch_label": "_endif10", + "_row_num": 10, + "operationIdx": 5 + }, + { + "clause": "if", + "condition": "selected(data('menu'), 'cake')", + "_row_num": 11, + "__rowNum__": 10, + "_token_type": "goto_label", + "_branch_label": "_then11", + "operationIdx": 6 + }, + { + "clause": "end if", + "_token_type": "goto_label", + "_branch_label": "_else16", + "_row_num": 16, + "operationIdx": 7 + }, + { + "clause": "begin screen", + "_row_num": 12, + "__rowNum__": 11, + "_token_type": "begin_screen", + "_end_screen_clause": { + "clause": "end screen", + "_row_num": 15, + "__rowNum__": 14, + "_token_type": "end_screen" + }, + "_screen_block": "function() {var activePromptIndicies = [];\nactivePromptIndicies.push(5);\nactivePromptIndicies.push(6);\n\nreturn activePromptIndicies;\n}\n", + "operationIdx": 8 + }, + { + "clause": "end if", + "_token_type": "goto_label", + "_branch_label": "_endif16", + "_row_num": 16, + "operationIdx": 9 + }, + { + "clause": "if", + "condition": "selected(data('menu'), 'cupcake')", + "_row_num": 17, + "__rowNum__": 16, + "_token_type": "goto_label", + "_branch_label": "_then17", + "operationIdx": 10 + }, + { + "clause": "end if", + "_token_type": "goto_label", + "_branch_label": "_else22", + "_row_num": 22, + "operationIdx": 11 + }, + { + "clause": "begin screen", + "_row_num": 18, + "__rowNum__": 17, + "_token_type": "begin_screen", + "_end_screen_clause": { + "clause": "end screen", + "_row_num": 21, + "__rowNum__": 20, + "_token_type": "end_screen" + }, + "_screen_block": "function() {var activePromptIndicies = [];\nactivePromptIndicies.push(7);\nactivePromptIndicies.push(8);\n\nreturn activePromptIndicies;\n}\n", + "operationIdx": 12 + }, + { + "clause": "end if", + "_token_type": "goto_label", + "_branch_label": "_endif22", + "_row_num": 22, + "operationIdx": 13 + }, + { + "clause": "begin screen", + "_row_num": 23, + "__rowNum__": 22, + "_token_type": "begin_screen", + "_end_screen_clause": { + "clause": "end screen", + "_row_num": 26, + "__rowNum__": 25, + "_token_type": "end_screen" + }, + "_screen_block": "function() {var activePromptIndicies = [];\nactivePromptIndicies.push(9);\nactivePromptIndicies.push(10);\n\nreturn activePromptIndicies;\n}\n", + "operationIdx": 14 + }, + { + "_token_type": "exit_section", + "clause": "exit section", + "_row_num": 27, + "operationIdx": 15 + }, + { + "_row_num": 27, + "_token_type": "begin_screen", + "_screen_block": "function() {var activePromptIndicies = [];\nactivePromptIndicies.push(11);\n\nreturn activePromptIndicies;\n}\n", + "screen": { + "hideInBackHistory": true + }, + "operationIdx": 16 + }, + { + "_token_type": "resume", + "clause": "resume", + "_row_num": 27, + "operationIdx": 17 + } + ], + "branch_label_map": { + "_screen2": 0, + "_screen7": 1, + "_then8": 4, + "_screen9": 4, + "_else10": 6, + "_endif10": 6, + "_then11": 8, + "_screen12": 8, + "_else16": 10, + "_endif16": 10, + "_then17": 12, + "_screen18": 12, + "_else22": 14, + "_endif22": 14, + "_screen23": 14, + "_contents": 16, + "_screen27": 16 + } + }, + "initial": { + "section_name": "initial", + "nested_sections": { + "survey": true + }, + "reachable_sections": { + "survey": true + }, + "prompts": [ + { + "_row_num": 3, + "type": "opening", + "display": { + "text": "Edit form" + }, + "_token_type": "prompt", + "_type": "opening", + "_branch_label_enclosing_screen": "initial/_screen3", + "promptIdx": 0 + }, + { + "_row_num": 4, + "clause": "do section survey", + "_token_type": "prompt", + "_do_section_name": "survey", + "_type": "_section", + "promptIdx": 1, + "display": { + "title": { + "text": "Skip Logic Example Form" + } + }, + "_branch_label_enclosing_screen": "survey/0" + }, + { + "_row_num": 5, + "type": "finalize", + "display": { + "text": "Save form" + }, + "_token_type": "prompt", + "_type": "finalize", + "_branch_label_enclosing_screen": "initial/_screen5", + "promptIdx": 2 + }, + { + "_row_num": 7, + "type": "instances", + "display": { + "text": "Saved instances" + }, + "_token_type": "prompt", + "_type": "instances", + "_branch_label_enclosing_screen": "initial/_screen7", + "promptIdx": 3 + }, + { + "_token_type": "prompt", + "type": "contents", + "_type": "contents", + "_row_num": 9, + "_branch_label_enclosing_screen": "initial/_screen9", + "promptIdx": 4 + } + ], + "validation_tag_map": { + "finalize": [] + }, + "operations": [ + { + "_row_num": 2, + "clause": "if // start", + "condition": "(opendatakit.getCurrentInstanceId() != null)", + "_token_type": "goto_label", + "_tag_name": "start", + "_branch_label": "_then2", + "operationIdx": 0 + }, + { + "clause": "else // start", + "_token_type": "goto_label", + "_branch_label": "_else6", + "_row_num": 6, + "operationIdx": 1 + }, + { + "_row_num": 3, + "_token_type": "begin_screen", + "_screen_block": "function() {var activePromptIndicies = [];\nactivePromptIndicies.push(0);\n\nreturn activePromptIndicies;\n}\n", + "operationIdx": 2 + }, + { + "_row_num": 4, + "clause": "do section survey", + "_token_type": "do_section", + "_do_section_name": "survey", + "operationIdx": 3 + }, + { + "_row_num": 5, + "_token_type": "begin_screen", + "_screen_block": "function() {var activePromptIndicies = [];\nactivePromptIndicies.push(2);\n\nreturn activePromptIndicies;\n}\n", + "operationIdx": 4 + }, + { + "clause": "end if // start", + "_token_type": "goto_label", + "_branch_label": "_endif8", + "_row_num": 8, + "operationIdx": 5 + }, + { + "_row_num": 7, + "_token_type": "begin_screen", + "_screen_block": "function() {var activePromptIndicies = [];\nactivePromptIndicies.push(3);\n\nreturn activePromptIndicies;\n}\n", + "operationIdx": 6 + }, + { + "_token_type": "exit_section", + "clause": "exit section", + "_row_num": 9, + "operationIdx": 7 + }, + { + "_row_num": 9, + "_token_type": "begin_screen", + "_screen_block": "function() {var activePromptIndicies = [];\nactivePromptIndicies.push(4);\n\nreturn activePromptIndicies;\n}\n", + "screen": { + "hideInBackHistory": true + }, + "operationIdx": 8 + }, + { + "_token_type": "resume", + "clause": "resume", + "_row_num": 9, + "operationIdx": 9 + }, + { + "_token_type": "validate", + "clause": "validate finalize", + "_sweep_name": "finalize", + "_row_num": 9, + "screen": { + "hideInBackHistory": true + }, + "operationIdx": 10 + }, + { + "_token_type": "save_and_terminate", + "clause": "save and terminate", + "calculation": true, + "_row_num": 9, + "screen": { + "hideInBackHistory": true + }, + "operationIdx": 11 + }, + { + "_token_type": "resume", + "clause": "resume", + "_row_num": 9, + "operationIdx": 12 + } + ], + "branch_label_map": { + "_then2": 2, + "_screen3": 2, + "_screen5": 4, + "_else6": 6, + "_screen7": 6, + "_endif8": 7, + "_contents": 8, + "_screen9": 8, + "_finalize": 10 + } + } + }, + "dataTableModel": { + "name": { + "_defn": [ + { + "_row_num": 3, + "section_name": "survey" + } + ], + "type": "string", + "elementKey": "name", + "elementName": "name", + "elementSet": "data", + "elementPath": "name" + }, + "state": { + "_defn": [ + { + "_row_num": 4, + "section_name": "survey" + } + ], + "type": "string", + "elementKey": "state", + "elementName": "state", + "elementSet": "data", + "elementPath": "state" + }, + "location": { + "_defn": [ + { + "_row_num": 5, + "section_name": "survey" + } + ], + "type": "object", + "elementType": "geopoint", + "properties": { + "latitude": { + "type": "number", + "elementKey": "location_latitude", + "elementName": "latitude", + "elementSet": "data", + "elementPath": "location.latitude" + }, + "longitude": { + "type": "number", + "elementKey": "location_longitude", + "elementName": "longitude", + "elementSet": "data", + "elementPath": "location.longitude" + }, + "altitude": { + "type": "number", + "elementKey": "location_altitude", + "elementName": "altitude", + "elementSet": "data", + "elementPath": "location.altitude" + }, + "accuracy": { + "type": "number", + "elementKey": "location_accuracy", + "elementName": "accuracy", + "elementSet": "data", + "elementPath": "location.accuracy" + } + }, + "elementKey": "location", + "elementName": "location", + "elementSet": "data", + "elementPath": "location", + "listChildElementKeys": [ + "location_accuracy", + "location_altitude", + "location_latitude", + "location_longitude" + ], + "notUnitOfRetention": true + }, + "menu": { + "_defn": [ + { + "_row_num": 7, + "section_name": "survey" + } + ], + "type": "string", + "valuesList": "order_list", + "elementKey": "menu", + "elementName": "menu", + "elementSet": "data", + "elementPath": "menu" + }, + "box": { + "type": "string", + "valuesList": "box_list", + "_defn": [ + { + "_row_num": 9, + "section_name": "survey" + }, + { + "_row_num": 19, + "section_name": "survey" + } + ], + "elementKey": "box", + "elementName": "box", + "elementSet": "data", + "elementPath": "box" + }, + "size": { + "_defn": [ + { + "_row_num": 13, + "section_name": "survey" + } + ], + "type": "string", + "valuesList": "size_list", + "elementKey": "size", + "elementName": "size", + "elementSet": "data", + "elementPath": "size" + }, + "flavor": { + "type": "string", + "valuesList": "flavor_list", + "_defn": [ + { + "_row_num": 14, + "section_name": "survey" + }, + { + "_row_num": 20, + "section_name": "survey" + } + ], + "elementKey": "flavor", + "elementName": "flavor", + "elementSet": "data", + "elementPath": "flavor" + }, + "location_latitude": { + "type": "number", + "elementKey": "location_latitude", + "elementName": "latitude", + "elementSet": "data", + "elementPath": "location.latitude" + }, + "location_longitude": { + "type": "number", + "elementKey": "location_longitude", + "elementName": "longitude", + "elementSet": "data", + "elementPath": "location.longitude" + }, + "location_altitude": { + "type": "number", + "elementKey": "location_altitude", + "elementName": "altitude", + "elementSet": "data", + "elementPath": "location.altitude" + }, + "location_accuracy": { + "type": "number", + "elementKey": "location_accuracy", + "elementName": "accuracy", + "elementSet": "data", + "elementPath": "location.accuracy" + }, + "_id": { + "type": "string", + "isNotNullable": true, + "elementKey": "_id", + "elementName": "_id", + "elementSet": "instanceMetadata", + "elementPath": "_id" + }, + "_row_etag": { + "type": "string", + "isNotNullable": false, + "elementKey": "_row_etag", + "elementName": "_row_etag", + "elementSet": "instanceMetadata", + "elementPath": "_row_etag" + }, + "_sync_state": { + "type": "string", + "isNotNullable": true, + "elementKey": "_sync_state", + "elementName": "_sync_state", + "elementSet": "instanceMetadata", + "elementPath": "_sync_state" + }, + "_conflict_type": { + "type": "integer", + "isNotNullable": false, + "elementKey": "_conflict_type", + "elementName": "_conflict_type", + "elementSet": "instanceMetadata", + "elementPath": "_conflict_type" + }, + "_default_access": { + "type": "string", + "isNotNullable": false, + "elementKey": "_default_access", + "elementName": "_default_access", + "elementSet": "instanceMetadata", + "elementPath": "_default_access" + }, + "_form_id": { + "type": "string", + "isNotNullable": false, + "elementKey": "_form_id", + "elementName": "_form_id", + "elementSet": "instanceMetadata", + "elementPath": "_form_id" + }, + "_group_modify": { + "type": "string", + "isNotNullable": false, + "elementKey": "_group_modify", + "elementName": "_group_modify", + "elementSet": "instanceMetadata", + "elementPath": "_group_modify" + }, + "_group_privileged": { + "type": "string", + "isNotNullable": false, + "elementKey": "_group_privileged", + "elementName": "_group_privileged", + "elementSet": "instanceMetadata", + "elementPath": "_group_privileged" + }, + "_group_read_only": { + "type": "string", + "isNotNullable": false, + "elementKey": "_group_read_only", + "elementName": "_group_read_only", + "elementSet": "instanceMetadata", + "elementPath": "_group_read_only" + }, + "_locale": { + "type": "string", + "isNotNullable": false, + "elementKey": "_locale", + "elementName": "_locale", + "elementSet": "instanceMetadata", + "elementPath": "_locale" + }, + "_row_owner": { + "type": "string", + "isNotNullable": false, + "elementKey": "_row_owner", + "elementName": "_row_owner", + "elementSet": "instanceMetadata", + "elementPath": "_row_owner" + }, + "_savepoint_type": { + "type": "string", + "isNotNullable": false, + "elementKey": "_savepoint_type", + "elementName": "_savepoint_type", + "elementSet": "instanceMetadata", + "elementPath": "_savepoint_type" + }, + "_savepoint_timestamp": { + "type": "string", + "isNotNullable": true, + "elementKey": "_savepoint_timestamp", + "elementName": "_savepoint_timestamp", + "elementSet": "instanceMetadata", + "elementPath": "_savepoint_timestamp" + }, + "_savepoint_creator": { + "type": "string", + "isNotNullable": false, + "elementKey": "_savepoint_creator", + "elementName": "_savepoint_creator", + "elementSet": "instanceMetadata", + "elementPath": "_savepoint_creator" + } + }, + "properties": [ + { + "_partition": "Column", + "_aspect": "box", + "_key": "displayChoicesList", + "_type": "object", + "_value": "[{\"choice_list_name\":\"box_list\",\"data_value\":\"box of 4\",\"display\":{\"title\":{\"text\":\"A box of 4\"}},\"_row_num\":8},{\"choice_list_name\":\"box_list\",\"data_value\":\"box of 6\",\"display\":{\"title\":{\"text\":\"A box of 6\"}},\"_row_num\":9},{\"choice_list_name\":\"box_list\",\"data_value\":\"box of 8\",\"display\":{\"title\":{\"text\":\"A box of 8\"}},\"_row_num\":10},{\"choice_list_name\":\"box_list\",\"data_value\":\"box of 10\",\"display\":{\"title\":{\"text\":\"A box of 10\"}},\"_row_num\":11}]" + }, + { + "_partition": "Column", + "_aspect": "flavor", + "_key": "displayChoicesList", + "_type": "object", + "_value": "[{\"choice_list_name\":\"flavor_list\",\"data_value\":\"choc fudge\",\"display\":{\"title\":{\"text\":\"Chocolate Fudge\"}},\"_row_num\":16},{\"choice_list_name\":\"flavor_list\",\"data_value\":\"red velvet\",\"display\":{\"title\":{\"text\":\"Red Velvet\"}},\"_row_num\":17},{\"choice_list_name\":\"flavor_list\",\"data_value\":\"cheese\",\"display\":{\"title\":{\"text\":\"Cheese Cake\"}},\"_row_num\":18},{\"choice_list_name\":\"flavor_list\",\"data_value\":\"cookies and cream\",\"display\":{\"title\":{\"text\":\"Cookies and Cream\"}},\"_row_num\":19},{\"choice_list_name\":\"flavor_list\",\"data_value\":\"white choc\",\"display\":{\"title\":{\"text\":\"White Chocolate\"}},\"_row_num\":20}]" + }, + { + "_partition": "Column", + "_aspect": "menu", + "_key": "displayChoicesList", + "_type": "object", + "_value": "[{\"choice_list_name\":\"order_list\",\"data_value\":\"cupcake\",\"display\":{\"title\":{\"text\":\"Cupcakes\"}},\"_row_num\":2},{\"choice_list_name\":\"order_list\",\"data_value\":\"cinnamon roll\",\"display\":{\"title\":{\"text\":\"Cinnamon Rolls\"}},\"_row_num\":3},{\"choice_list_name\":\"order_list\",\"data_value\":\"croissant\",\"display\":{\"title\":{\"text\":\"Croissants\"}},\"_row_num\":4},{\"choice_list_name\":\"order_list\",\"data_value\":\"cake\",\"display\":{\"title\":{\"text\":\"Cake\"}},\"_row_num\":5},{\"choice_list_name\":\"order_list\",\"data_value\":\"doughnut\",\"display\":{\"title\":{\"text\":\"Doughnuts\"}},\"_row_num\":6},{\"choice_list_name\":\"order_list\",\"data_value\":\"bread roll\",\"display\":{\"title\":{\"text\":\"Bread Rolls\"}},\"_row_num\":7}]" + }, + { + "_partition": "Column", + "_aspect": "size", + "_key": "displayChoicesList", + "_type": "object", + "_value": "[{\"choice_list_name\":\"size_list\",\"data_value\":\"6\\\"\",\"display\":{\"title\":{\"text\":\"6 inches\"}},\"_row_num\":12},{\"choice_list_name\":\"size_list\",\"data_value\":\"8\\\"\",\"display\":{\"title\":{\"text\":\"8 inches\"}},\"_row_num\":13},{\"choice_list_name\":\"size_list\",\"data_value\":\"10\\\"\",\"display\":{\"title\":{\"text\":\"10 inches\"}},\"_row_num\":14},{\"choice_list_name\":\"size_list\",\"data_value\":\"12\\\"\",\"display\":{\"title\":{\"text\":\"12 inches\"}},\"_row_num\":15}]" + }, + { + "_partition": "FormType", + "_aspect": "default", + "_key": "FormType.formType", + "_type": "string", + "_value": "SURVEY" + }, + { + "_partition": "SurveyUtil", + "_aspect": "default", + "_key": "SurveyUtil.formId", + "_type": "string", + "_value": "SkipLogic" + }, + { + "_partition": "Table", + "_aspect": "default", + "_key": "defaultViewType", + "_type": "string", + "_value": "LIST" + }, + { + "_partition": "Table", + "_aspect": "default", + "_key": "detailViewFileName", + "_type": "string", + "_value": "config/tables/SkipLogic/html/SkipLogic_detail.html" + }, + { + "_partition": "Table", + "_aspect": "default", + "_key": "displayName", + "_type": "object", + "_value": "{\"text\":\"Skip Logic Example Form\"}" + }, + { + "_partition": "Table", + "_aspect": "default", + "_key": "listViewFileName", + "_type": "string", + "_value": "config/tables/SkipLogic/html/SkipLogic_list.html" + } + ] + } +} diff --git a/app/config/tables/SkipLogic/html/SkipLogic_detail.html b/app/config/tables/SkipLogic/html/SkipLogic_detail.html new file mode 100644 index 000000000..4c8dc0b14 --- /dev/null +++ b/app/config/tables/SkipLogic/html/SkipLogic_detail.html @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + +
+
+

Skip Logic Detail View

+

Order Detail

+ +
+
+
+ + + + + + + diff --git a/app/config/tables/SkipLogic/html/SkipLogic_list.html b/app/config/tables/SkipLogic/html/SkipLogic_list.html new file mode 100644 index 000000000..c4e086167 --- /dev/null +++ b/app/config/tables/SkipLogic/html/SkipLogic_list.html @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + +
+
+

Skip Logic List View

+ +
+
+
+ + + + + + + diff --git a/app/config/tables/SkipLogic/js/SkipLogic_detail.js b/app/config/tables/SkipLogic/js/SkipLogic_detail.js new file mode 100644 index 000000000..3f1c42c67 --- /dev/null +++ b/app/config/tables/SkipLogic/js/SkipLogic_detail.js @@ -0,0 +1,42 @@ +/* global odkData */ + +'use strict'; + +(function () { + var detailViewFields = { + name: 'Name', + state: 'State', + menu: 'Order', + size: 'Size', + flavor: 'Flavor', + box: 'Quantity', + }; + + var detailViewCallbackSuccess = function (result) { + var template = document.getElementById('skipLogicDetailTemplate'); + var fieldsContainer = document.getElementById('skipLogicDetailContainer'); + + Object.entries(detailViewFields).forEach(function (entry) { + var fieldValue = result.get(entry[0]); + + if (fieldValue !== undefined && fieldValue !== null) { + var detailField = document.importNode(template.content, true); + + detailField.querySelector('.skip-logic-detail-label').textContent = entry[1]; + detailField.querySelector('.skip-logic-detail-value').textContent = fieldValue; + + fieldsContainer.appendChild(detailField); + } + }); + }; + + var detailViewCallbackFailure = function (error) { + console.error(error); + }; + + document.addEventListener('DOMContentLoaded', function () { + odkData.getViewData(detailViewCallbackSuccess, detailViewCallbackFailure); + + document.getElementById('wrapper').classList.remove('d-none'); + }); +})(); diff --git a/app/config/tables/SkipLogic/js/SkipLogic_list.js b/app/config/tables/SkipLogic/js/SkipLogic_list.js new file mode 100644 index 000000000..ddd6f0229 --- /dev/null +++ b/app/config/tables/SkipLogic/js/SkipLogic_list.js @@ -0,0 +1,46 @@ +/* global odkTables, odkData */ + +'use strict'; + +(function () { + var openDetailViewOnClick = function (rowId) { + return function () { + odkTables.openDetailView(null, 'SkipLogic', rowId); + }; + }; + + var listViewCallbackSuccess = function (result) { + var resultCount = result.getCount(); + + var template = document.getElementById('skipLogicListTemplate'); + var listContainer = document.getElementById('skipLogicList'); + + for (var i = 0; i < resultCount; i++) { + var listItem = document.importNode(template.content, true); + + listItem + .querySelector('.skip-logic-list-name') + .textContent = result.getData(i, 'name'); + + listItem + .querySelector('.skip-logic-list-order') + .textContent = result.getData(i, 'menu'); + + listItem + .querySelector('.skip-logic-detail-view-link') + .addEventListener('click', openDetailViewOnClick(result.getRowId(i))); + + listContainer.appendChild(listItem); + } + }; + + var listViewCallbackFailure = function (error) { + console.error(error); + }; + + document.addEventListener('DOMContentLoaded', function () { + odkData.getViewData(listViewCallbackSuccess, listViewCallbackFailure); + + document.getElementById('wrapper').classList.remove('d-none'); + }); +})(); diff --git a/app/config/tables/SkipLogic/properties.csv b/app/config/tables/SkipLogic/properties.csv new file mode 100644 index 000000000..87aea7094 --- /dev/null +++ b/app/config/tables/SkipLogic/properties.csv @@ -0,0 +1,11 @@ +_partition,_aspect,_key,_type,_value +Column,box,displayChoicesList,object,"[{""choice_list_name"":""box_list"",""data_value"":""box of 4"",""display"":{""title"":{""text"":""A box of 4""}},""_row_num"":8},{""choice_list_name"":""box_list"",""data_value"":""box of 6"",""display"":{""title"":{""text"":""A box of 6""}},""_row_num"":9},{""choice_list_name"":""box_list"",""data_value"":""box of 8"",""display"":{""title"":{""text"":""A box of 8""}},""_row_num"":10},{""choice_list_name"":""box_list"",""data_value"":""box of 10"",""display"":{""title"":{""text"":""A box of 10""}},""_row_num"":11}]" +Column,flavor,displayChoicesList,object,"[{""choice_list_name"":""flavor_list"",""data_value"":""choc fudge"",""display"":{""title"":{""text"":""Chocolate Fudge""}},""_row_num"":16},{""choice_list_name"":""flavor_list"",""data_value"":""red velvet"",""display"":{""title"":{""text"":""Red Velvet""}},""_row_num"":17},{""choice_list_name"":""flavor_list"",""data_value"":""cheese"",""display"":{""title"":{""text"":""Cheese Cake""}},""_row_num"":18},{""choice_list_name"":""flavor_list"",""data_value"":""cookies and cream"",""display"":{""title"":{""text"":""Cookies and Cream""}},""_row_num"":19},{""choice_list_name"":""flavor_list"",""data_value"":""white choc"",""display"":{""title"":{""text"":""White Chocolate""}},""_row_num"":20}]" +Column,menu,displayChoicesList,object,"[{""choice_list_name"":""order_list"",""data_value"":""cupcake"",""display"":{""title"":{""text"":""Cupcakes""}},""_row_num"":2},{""choice_list_name"":""order_list"",""data_value"":""cinnamon roll"",""display"":{""title"":{""text"":""Cinnamon Rolls""}},""_row_num"":3},{""choice_list_name"":""order_list"",""data_value"":""croissant"",""display"":{""title"":{""text"":""Croissants""}},""_row_num"":4},{""choice_list_name"":""order_list"",""data_value"":""cake"",""display"":{""title"":{""text"":""Cake""}},""_row_num"":5},{""choice_list_name"":""order_list"",""data_value"":""doughnut"",""display"":{""title"":{""text"":""Doughnuts""}},""_row_num"":6},{""choice_list_name"":""order_list"",""data_value"":""bread roll"",""display"":{""title"":{""text"":""Bread Rolls""}},""_row_num"":7}]" +Column,size,displayChoicesList,object,"[{""choice_list_name"":""size_list"",""data_value"":""6\"""",""display"":{""title"":{""text"":""6 inches""}},""_row_num"":12},{""choice_list_name"":""size_list"",""data_value"":""8\"""",""display"":{""title"":{""text"":""8 inches""}},""_row_num"":13},{""choice_list_name"":""size_list"",""data_value"":""10\"""",""display"":{""title"":{""text"":""10 inches""}},""_row_num"":14},{""choice_list_name"":""size_list"",""data_value"":""12\"""",""display"":{""title"":{""text"":""12 inches""}},""_row_num"":15}]" +FormType,default,FormType.formType,string,SURVEY +SurveyUtil,default,SurveyUtil.formId,string,SkipLogic +Table,default,defaultViewType,string,LIST +Table,default,detailViewFileName,string,config/tables/SkipLogic/html/SkipLogic_detail.html +Table,default,displayName,object,"{""text"":""Skip Logic Example Form""}" +Table,default,listViewFileName,string,config/tables/SkipLogic/html/SkipLogic_list.html diff --git a/app/config/tables/SkipLogic/tableSpecificDefinitions.js b/app/config/tables/SkipLogic/tableSpecificDefinitions.js new file mode 100644 index 000000000..178c78ddc --- /dev/null +++ b/app/config/tables/SkipLogic/tableSpecificDefinitions.js @@ -0,0 +1,3 @@ +window.odkTableSpecificDefinitions = { + "_tokens": {} +} \ No newline at end of file