refactor settings-multi-choice
This commit is contained in:
1 parent
e006da5bb9
commit
4e09433c6e
2 files changed
+20
-50
No files matched your search
@@ -1,5 +1,5 @@
|
||||
// Code generated by fileb0x at "2021-04-28 14:20:38.593418736 +0200 CEST m=+0.007149551" from config file "embed.yml" DO NOT EDIT.
|
||||
// modification hash(56f697a6d579ebcce4c0576f8be8c80b.8058aec596c5fb73022d09bb97af796e)
|
||||
// Code generated by fileb0x at "2021-04-28 15:21:54.352178468 +0200 CEST m=+0.003921490" from config file "embed.yml" DO NOT EDIT.
|
||||
// modification hash(b719a800f9d335d62c6d3d3f5f8e6820.8058aec596c5fb73022d09bb97af796e)
|
||||
|
||||
package assets
|
||||
|
||||
@@ -36,7 +36,7 @@ type HTTPFS struct {
|
||||
}
|
||||
|
||||
// FileSettingsJs is "settings.js"
|
||||
var FileSettingsJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xbd\xf9\x7e\xdb\x38\xd6\x28\xf8\xf7\xdc\xa7\x90\xd0\x69\x36\x50\x82\x69\x39\xd5\x5d\xd5\x4d\x05\x51\x67\x71\x96\xaa\xc4\x4e\xc5\x49\x6a\x51\xd4\x6e\x5a\x82\x6c\xc6\x14\xa0\x02\x21\x2f\x25\x72\xde\x67\x5e\x63\x9e\x6c\x7e\x58\x09\x52\x94\x93\xde\xee\xf7\xdd\x3b\xb7\x7f\xd5\xb1\x88\xf5\x00\x38\x38\x1b\x0e\x0e\xe6\x74\x91\x31\x0a\xe1\x62\xcd\x66\x32\xe3\x0c\xa2\x0d\x58\x17\xb4\x57\x48\x91\xcd\x24\x18\x5d\xa5\xa2\x27\x09\x58\x33\x53\x70\x0e\xfa\x44\xde\xae\x28\x5f\xf4\xce\x73\x7e\x96\xe6\xef\x2e\xb2\x62\x5c\xff\x4c\xba\x4a\x5e\x67\x6c\xce\xaf\xc7\xe6\x4f\x67\x09\xd3\x80\x6d\xa7\xb3\x44\x41\xf3\xc5\x58\xfd\x93\x6c\xaa\x91\x03\xb6\x47\xa1\x44\x1b\x41\xe5\x5a\xb0\x9e\x8c\x22\x19\x9f\x9e\xd2\xe2\x35\x9f\xaf\x73\x1a\x45\xc7\x67\x9f\xe8\x4c\xc6\x2b\xc1\x25\x57\xad\xc4\x17\x69\x71\x7c\xcd\xde\x08\xbe\xa2\x42\xde\xc6\xb3\x34\xcf\xa1\xc4\x60\x4e\x17\xe9\x3a\x97\x00\x8d\x65\x6c\x7f\x27\xb2\xf2\x7d\x08\xd5\x47\xb6\x80\x61\xe3\xc8\xf5\xa9\xe7\x87\x12\xdb\x95\x81\xda\x75\x00\x37\x15\x06\x75\x1d\x80\x37\x57\x69\xbe\xa6\x49\x7f\x58\xa1\x91\x6d\xc0\x56\xbc\xa4\xb7\x05\x94\x28\x5e\x70\x71\x98\xce\x2e\x82\xe5\x10\x68\xa3\xba\x60\xae\x8b\x73\x2a\x83\x31\x3c\xa5\xc5\x4c\x64\x2b\xc9\x05\x94\x58\xa0\x51\x37\x1c\x14\x0b\xcc\x54\xcd\x31\x4b\x36\x94\xad\x97\x54\xa4\x67\xb9\x02\x04\x9f\x53\x99\x04\x4b\xef\x86\x35\x11\xd3\xaa\x42\x15\x42\x98\xd6\x13\xc1\xd4\x44\x98\xf1\x6e\xe8\xcd\x8a\x0b\x59\x24\x9b\xaa\x72\x43\x91\x90\x62\x1a\xdb\x0c\x54\xff\xac\x58\x30\x1c\xdf\xc2\x56\x0a\x16\xa4\xbd\x60\x98\x11\xd1\x5a\x34\xcc\x09\x70\x55\x01\x71\xc8\x71\x72\xbb\x3c\xe3\xf9\xd8\xfc\x49\x36\x15\xce\x08\x8f\x33\x49\x45\x2a\xb9\x28\x4b\xf0\xd7\xbf\xba\x0f\x80\x53\xc2\xe3\xb4\xb8\x65\xb3\x97\x61\x7e\x23\x05\xe0\x35\xe1\xb1\xe4\x27\x52\x64\xec\xfc\x5d\x7a\xae\x8b\x04\xdf\xa0\xc6\xc0\x02\x4a\x4c\xb1\xf0\x53\xd7\xbd\x02\xaa\x8c\x5d\x7d\x81\x9b\x2b\x30\xe3\x6c\x91\x9d\xaf\xfd\xf7\xb5\xc8\xa4\xfd\x5d\x21\x2c\x27\x74\x5a\x49\x71\xbb\x29\x34\x36\x01\x54\xcd\x52\x39\xbb\x50\xb3\x56\x04\x73\xd8\x00\x41\xd5\x21\xa2\xaa\x17\x6e\x66\x0a\x60\x66\xa6\x9a\x13\x1a\x45\xb4\x9e\xe6\x5e\xc6\x0a\x99\xb2\x99\x9a\xc9\xab\x31\x4d\xae\x70\xe6\x96\x62\x26\x68\x2a\x29\xe4\x75\x61\x84\x53\xc2\xe8\x75\xef\x0d\x64\x65\x39\x99\x7a\x44\xce\xe2\xd3\x8c\x5d\xf1\x4b\xba\x05\x95\x41\xdf\x85\x2b\xe8\xb3\x39\xce\xf4\xbe\x62\x84\x90\x39\x92\x17\x82\x5f\xf7\x54\xcb\x87\x42\x70\x01\xc1\x73\xca\xcc\x6a\xf4\xb2\xa2\x97\xe6\x82\xa6\xf3\xdb\x9e\x58\x33\x96\xb1\x73\x80\x46\xb6\xe2\x85\x6e\x02\xe8\xda\x80\x10\xc2\x6d\x43\x99\xeb\xee\x12\xa2\x6a\xc1\x05\x14\xf1\x92\xca\x0b\x3e\x27\x1c\x8b\x38\x15\xe7\x24\x1b\x8d\x0c\x6c\x29\x11\xf1\x9c\xe6\xf4\x3c\x95\x54\x35\x9b\x9a\xe4\x35\x39\x84\xa9\xda\x53\xd9\x02\xae\x75\x2f\x6b\x42\xc8\x2d\x9a\x71\x26\x33\xb6\xa6\xae\x83\x75\x55\x29\x08\x18\xbd\x91\x0a\x00\xd7\x0f\x12\x71\x41\x99\x24\x22\x3e\xb5\x7f\x53\x71\x3e\xa2\x79\x41\x7b\x0d\x80\x7d\x79\x37\x15\x0b\x37\x15\xe4\xc2\x40\x3a\x12\xf1\x3c\x2b\x56\x6a\xd9\x0f\x6f\x66\x74\x65\xc8\x82\xca\x41\x95\x6a\x0f\x18\x40\xc2\xc6\xa2\x48\xc4\xe9\x99\x58\xaf\x24\x74\xb9\xa6\x2d\x34\x62\x64\xae\x69\x56\x41\x72\xbb\x40\x23\x0d\x3e\x17\xcb\x34\x57\x6d\x14\xb1\x5e\x66\x03\x8e\x88\xe7\x9c\xd1\xf1\x45\xb2\xc2\x85\x9e\xb5\x8e\x19\xb0\x78\xad\xf3\xb1\x2a\x9e\x98\x5a\x55\x55\x8f\xd2\x34\x1a\x45\xd0\x8c\xca\x2e\x85\xcd\xb7\x0b\x52\x98\x21\x55\x95\x22\x65\x38\x45\x38\xab\x31\xd8\xc1\xba\x51\x5b\xc1\x76\xab\x5a\x4c\x1c\xe0\x38\x15\xe7\x89\x34\x24\x5d\x15\xac\xea\x7d\xd2\x28\x6e\x7b\xd4\xa5\xab\xaa\x92\xf1\xb5\x48\x57\x64\xa6\xa7\x64\x41\x40\xb1\x2e\x56\x94\xcd\xe9\xfc\x44\xa6\x42\x02\xbc\x0a\x92\x7e\xce\x68\x3e\x07\x78\x4e\x00\xbd\xa1\xb3\xb5\x54\x78\x88\x2f\x08\x98\xf1\xe5\x2a\xa7\x92\xce\x01\xbe\x25\x21\x73\xba\x82\x68\x53\x0f\xe1\xbc\xf1\xb5\x54\x5f\xaa\xd3\x33\x55\xe5\x6c\x92\x4d\x49\x07\x19\xbe\xc8\x8a\x4a\x83\x76\x1a\x90\xff\x37\x6e\x2b\x1e\x2f\xf0\x35\x39\x8d\xa2\x53\x78\x0a\x9f\xc0\xc9\x14\x21\x34\xba\x8e\xa2\xeb\x3e\x21\x22\x8a\x98\x99\x8c\x6b\x9c\xa1\x28\x82\x67\xe4\x1a\xe9\x96\x8e\xc9\xb2\xde\xcc\xe4\x2a\xf8\xdd\xdc\xf2\x67\xa8\x1e\xc8\x27\x35\x8d\x13\x83\xe2\xd8\x4d\xa1\x43\xac\x69\x07\xd3\xa2\x68\x63\xe8\x62\x83\xf0\x07\xa3\x72\xc4\x02\x52\x2c\x15\x9b\x51\xff\xf9\xee\x4e\x54\x55\xb4\x09\x18\x30\xc7\x19\x4e\xf1\xda\x6c\x4c\x8d\xb9\x13\x3e\xc5\x12\x67\x06\x79\x0d\x44\xfd\x1a\x77\x55\xb1\x99\x41\x28\xbc\x20\xb3\x58\x63\xa8\x27\x40\x51\x04\xb8\x1e\x6b\xcd\x40\x16\x7e\xbe\x16\x8a\x65\xa7\xd7\x69\xa6\xe4\x01\x1a\x0b\x5a\xf0\xfc\x8a\xc2\x45\x6c\x53\x51\x2c\x2f\x68\x8b\xa3\x09\xbb\xfd\xb1\xd4\x50\x56\x08\xb7\xb3\xed\x9c\xb9\x7c\x94\x04\x2d\x77\xb5\x68\x41\x26\x12\xa7\x70\xb6\xdd\xa0\x19\x48\x47\xbb\xd5\x1a\xda\x6d\xa4\x09\xfd\x28\x9c\xeb\x90\x30\xb3\x60\x7a\xb3\x1a\xe1\x14\xf9\x0d\x65\x41\x8a\xb9\x02\x5f\x62\x86\xd5\x4f\xd5\x81\x2d\xc9\x09\x1f\x73\x03\x78\x86\x33\x94\x64\x10\x05\x0c\xe7\x50\x4b\x23\x96\xf2\x4b\xcf\x89\x27\x6e\xe7\x4f\x1d\xf9\x36\x74\xa6\xa6\xbf\x84\xad\xf3\x1c\xef\xa0\x8e\x75\x43\xb1\x81\x22\x8a\x6a\xb2\xde\xa4\x73\x84\x62\x03\x43\x57\x5b\xLine truncated
|
||||
var FileSettingsJs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xbd\xfb\x7e\xdb\x36\xd6\x28\xfa\xf7\xd9\x4f\x21\xe1\x73\x39\x40\x05\xd3\x72\xda\x69\xa7\x54\x10\x8d\x93\x38\x69\xda\xc4\x4e\xe3\x24\xbd\x28\x1a\x7f\xb4\x04\xc9\x8c\x25\x40\x05\x21\x5f\x2a\xf2\xbc\xcf\x79\x8d\xf3\x64\xe7\x87\x2b\x41\x8a\x72\x32\xb7\xfd\x7d\x7b\x9f\x3d\xbf\x4e\x2c\xe2\xba\x00\x2c\xac\x1b\x16\x16\xa6\x74\x96\x31\x0a\xe1\x6c\xcd\x26\x32\xe3\x0c\xa2\x0d\x58\xe7\xb4\x93\x4b\x91\x4d\x24\x18\x5c\xa7\xa2\x23\x09\x58\x33\x53\x70\x0a\xba\x44\xde\xad\x28\x9f\x75\xe6\x0b\x7e\x91\x2e\xde\x5e\x66\xf9\xb0\xfa\x99\xb4\x95\xbc\xc9\xd8\x94\xdf\x0c\xcd\x9f\xd6\x12\xa6\x01\xdb\x4e\x6b\x89\x9c\x2e\x66\x43\xf5\x4f\xb2\x29\x07\x0e\xd8\x0e\x85\x12\x6d\x04\x95\x6b\xc1\x3a\x32\x8a\x64\x7c\x7e\x4e\xf3\x57\x7c\xba\x5e\xd0\x28\x3a\xbd\xf8\x48\x27\x32\x5e\x09\x2e\xb9\x6a\x25\xbe\x4c\xf3\xd3\x1b\xf6\x5a\xf0\x15\x15\xf2\x2e\x9e\xa4\x8b\x05\x94\x18\x4c\xe9\x2c\x5d\x2f\x24\x40\x43\x19\xdb\xdf\x89\x2c\x7d\x1f\x42\xf5\x91\xcd\x60\xd8\x38\x72\x7d\xea\xf9\xa1\xc4\x76\x65\xa0\x76\x1d\xc0\x4d\x89\x41\x55\x07\xe0\xcd\x75\xba\x58\xd3\xa4\xdb\x2f\xd1\xc0\x36\x60\x2b\x5e\xd1\xbb\x1c\x4a\x14\xcf\xb8\x38\x4e\x27\x97\xc1\x72\x08\xb4\x51\x5d\x30\xd7\xc5\x9c\xca\x60\x0c\x4f\x69\x3e\x11\xd9\x4a\x72\x01\x25\x16\x68\xd0\x0e\x07\xc5\x02\x33\x55\x73\xc8\x92\x0d\x65\xeb\x25\x15\xe9\xc5\x42\x01\x82\xe7\x54\x26\xc1\xd2\xbb\x61\x8d\xc4\xb8\x2c\x51\x89\x10\xa6\xd5\x44\x30\x35\x11\x66\xbc\x1b\x7a\xbb\xe2\x42\xe6\xc9\xa6\x2c\xdd\x50\x24\xa4\x98\xc6\x36\x03\x55\x3f\x4b\x16\x0c\xc7\xb7\xb0\x95\x82\x05\x69\x2e\x18\x66\x44\x34\x16\x0d\x73\x02\x5c\x55\x40\x1c\x72\x9c\xdd\x2d\x2f\xf8\x62\x68\xfe\x24\x9b\x12\x67\x84\xc7\x99\xa4\x22\x95\x5c\x14\x05\xf8\xeb\x5f\xdd\x07\xc0\x29\xe1\x71\x9a\xdf\xb1\xc9\x8b\x30\xbf\x96\x02\xf0\x9a\xf0\x58\xf2\x33\x29\x32\x36\x7f\x9b\xce\x75\x91\xe0\x1b\x54\x18\x98\x43\x89\x29\x16\x7e\xea\xda\x57\x40\x95\xb1\xab\x2f\x70\x7d\x05\x26\x9c\xcd\xb2\xf9\xda\x7f\xdf\x88\x4c\xda\xdf\x25\xc2\x72\x44\xc7\xa5\x14\x77\x9b\x5c\x63\x13\x40\xe5\x24\x95\x93\x4b\x35\x6b\x79\x30\x87\x35\x10\x54\x1d\x22\xca\x6a\xe1\x26\xa6\x00\x66\x66\xaa\x39\xa1\x51\x44\xab\x69\xee\x64\x2c\x97\x29\x9b\xa8\x99\xbc\x1e\xd2\xe4\x1a\x67\x6e\x29\x26\x82\xa6\x92\x42\x5e\x15\x46\x38\x25\x8c\xde\x74\x5e\x43\x56\x14\xa3\xb1\x47\xe4\x2c\x3e\xcf\xd8\x35\xbf\xa2\x5b\x50\x19\xf4\x9d\xb9\x82\x3e\x9b\xe3\x4c\xef\x2b\x46\x08\x99\x22\x79\x29\xf8\x4d\x47\xb5\x7c\x2c\x04\x17\x10\x3c\xa7\xcc\xac\x46\x27\xcb\x3b\xe9\x42\xd0\x74\x7a\xd7\x11\x6b\xc6\x32\x36\x07\x68\x60\x2b\x5e\xea\x26\x80\xae\x0d\x08\x21\xdc\x36\x94\xb9\xee\xae\x20\x2a\x67\x5c\x40\x11\x2f\xa9\xbc\xe4\x53\xc2\xb1\x88\x53\x31\x27\xd9\x60\x60\x60\x4b\x89\x88\xa7\x74\x41\xe7\xa9\xa4\xaa\xd9\xd4\x24\xaf\xc9\x31\x4c\xd5\x9e\xca\x66\x70\xad\x7b\x59\x13\x42\xee\xd0\x84\x33\x99\xb1\x35\x75\x1d\xac\xcb\x52\x41\xc0\xe8\xad\x54\x00\xb8\x7e\x90\x88\x73\xca\x24\x11\xf1\xb9\xfd\x9b\x8a\xf9\x80\x2e\x72\xda\xa9\x01\xec\xcb\xbb\xa9\x98\xb9\xa9\x20\x97\x06\xd2\x81\x88\xa7\x59\xbe\x52\xcb\x7e\x7c\x3b\xa1\x2b\x43\x16\x54\x0e\x2a\x55\x7b\xc0\x00\x12\x36\x16\x45\x22\x4e\x2f\xc4\x7a\x25\xa1\xcb\x35\x6d\xa1\x01\x23\x53\x4d\xb3\x72\xb2\xb0\x0b\x34\xd0\xe0\x73\xb1\x4c\x17\xaa\x8d\x3c\xd6\xcb\x6c\xc0\x11\xf1\x94\x33\x3a\xbc\x4c\x56\x38\xd7\xb3\xd6\x32\x03\x16\xaf\x75\x3e\x56\xc5\x13\x53\xab\x2c\xab\x51\x9a\x46\xa3\x08\x9a\x51\xd9\xa5\xb0\xf9\x76\x41\x72\x33\xa4\xb2\x54\xa4\x0c\xa7\x08\x67\x15\x06\x3b\x58\x37\x6a\x2b\xd8\x6e\x55\x8b\x89\x03\x1c\xa7\x62\x9e\x48\x43\xd2\x55\xc1\xb2\xda\x27\xb5\xe2\xb6\x47\x5d\xba\x2c\x4b\x19\xdf\x88\x74\x45\x26\x7a\x4a\x66\x04\xe4\xeb\x7c\x45\xd9\x94\x4e\xcf\x64\x2a\x24\xc0\xab\x20\xe9\xd7\x8c\x2e\xa6\x00\x4f\x09\xa0\xb7\x74\xb2\x96\x0a\x0f\xf1\x25\x01\x13\xbe\x5c\x2d\xa8\xa4\x53\x80\xef\x48\xc8\x9c\xae\x21\xda\x54\x43\x98\xd7\xbe\x96\xea\x4b\x75\x7a\xa1\xaa\x5c\x8c\xb2\x31\x69\x21\xc3\x97\x59\x5e\x6a\xd0\x6e\x02\xf2\xff\xda\x6d\xc5\xd3\x19\x3e\x27\x37\x51\x74\x03\x6f\xe0\x13\x38\x1a\x23\x84\x06\xe7\x51\x74\xde\x25\x44\x44\x11\x33\x93\x71\x8e\x33\x14\x45\xf0\x82\x9c\x23\xdd\xd2\x29\x59\x56\x9b\x99\x5c\x07\xbf\xeb\x5b\xfe\x02\x55\x03\xf9\xa8\xa6\x71\x64\x50\x1c\xbb\x29\x74\x88\x35\x6e\x61\x5a\x14\x6d\x0c\x5d\xac\x11\xfe\x60\x54\x8e\x58\x40\x8a\xa5\x62\x33\xea\x3f\xdf\xdd\x99\xaa\x8a\x36\x01\x03\xe6\x38\xc3\x29\x5e\x9b\x8d\xa9\x31\x77\xc4\xc7\x58\xe2\xcc\x20\xaf\x81\xa8\x5b\xe1\xae\x2a\x36\x31\x08\x85\x67\x64\x12\x6b\x0c\xf5\x04\x28\x8a\x00\xd7\x63\xad\x18\xc8\xcc\xcf\xd7\x4c\xb1\xec\xf4\x26\xcd\x94\x3c\x40\x63\x41\x73\xbe\xb8\xa6\x70\x16\xdb\x54\x14\xcb\x4b\xda\xe0\x68\xc2\x6e\x7f\x2c\x35\x94\x25\xc2\xcd\x6c\x3b\x67\x2e\x1f\x25\x41\xcb\x6d\x2d\x5a\x90\x89\xc4\x29\x9c\x6c\x37\x68\x06\xd2\xd2\x6e\xb9\x86\x76\x1b\x69\x42\x3f\x08\xe7\x3a\x24\xcc\x2c\x98\xde\xac\x42\x38\x45\x7e\x43\x59\x90\x62\xae\xc0\x97\x98\x61\xf5\x53\x75\x60\x4b\x72\xc2\x87\xdc\x00\x9e\xe1\x0c\x25\x19\x44\x01\xc3\x39\xd6\xd2\x88\xa5\xfc\xd2\x73\xe2\x91\xdb\xf9\x63\x47\xbe\x0d\x9d\xa9\xe8\x2f\x61\xeb\xc5\x02\xef\xa0\x8e\x55\x43\xb1\x81\x22\x8a\x2a\xb2\x5e\xa7\x73\x84\x62\x03\x43\xLine truncated
|
||||
|
||||
func init() {
|
||||
err := CTX.Err()
|
||||
|
||||
@@ -1,36 +1,11 @@
|
||||
<template>
|
||||
<div>
|
||||
<oc-button :id="buttonElementId" class="uk-width-expand" justify-content="space-between">
|
||||
<span v-if="selectedOptions !== null && selectedOptions.length > 0">
|
||||
{{ selectedOptionsDisplayValues }}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{ setting.placeholder || $gettext('Please select') }}
|
||||
</span>
|
||||
<oc-icon name="expand_more" />
|
||||
</oc-button>
|
||||
<oc-drop
|
||||
:drop-id="dropElementId"
|
||||
:toggle="`#${buttonElementId}`"
|
||||
mode="click"
|
||||
position="bottom-justify"
|
||||
:options="{ offset: 0, delayHide: 200, flip: false }"
|
||||
>
|
||||
<ul class="uk-list">
|
||||
<li
|
||||
v-for="(option, index) in setting.multiChoiceValue.options"
|
||||
:key="getOptionElementId(index)"
|
||||
>
|
||||
<oc-checkbox
|
||||
v-model="selectedOptions"
|
||||
:option="option"
|
||||
@input="onSelectedOption"
|
||||
:label="option.displayValue"
|
||||
/>
|
||||
</li>
|
||||
</ul>
|
||||
</oc-drop>
|
||||
</div>
|
||||
<oc-select
|
||||
v-model="selectedOptions"
|
||||
:clearable="false"
|
||||
:options="displayOptions"
|
||||
@input="onSelectedOption"
|
||||
multiple
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -53,28 +28,21 @@ export default {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
selectedOptions: null
|
||||
selectedOptions: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
selectedOptionsDisplayValues () {
|
||||
return Array.from(this.selectedOptions).map(option => option.displayValue).join(', ')
|
||||
},
|
||||
dropElementId () {
|
||||
return `multi-choice-drop-${this.setting.id}`
|
||||
},
|
||||
buttonElementId () {
|
||||
return `multi-choice-toggle-${this.setting.id}`
|
||||
displayOptions () {
|
||||
return this.setting.multiChoiceValue.options.map(val => val.displayValue)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getOptionElementId (index) {
|
||||
return `${this.setting.id}-${index}`
|
||||
},
|
||||
async onSelectedOption () {
|
||||
const values = []
|
||||
if (!isNil(this.selectedOptions)) {
|
||||
this.selectedOptions.forEach(option => {
|
||||
this.selectedOptions.forEach(displayValue => {
|
||||
const option = this.setting.multiChoiceValue.options.find(val => val.displayValue === displayValue)
|
||||
|
||||
if (option.value.intValue) {
|
||||
values.push({ intValue: option.value.intValue })
|
||||
}
|
||||
@@ -123,13 +91,15 @@ export default {
|
||||
return selectedValues.includes(option.value.stringValue)
|
||||
}
|
||||
return false
|
||||
})
|
||||
}).map(val => val.displayValue)
|
||||
}
|
||||
}
|
||||
// TODO: load the settings value of the authenticated user and set it in `selectedOptions`
|
||||
// if not set, yet, apply defaults from settings bundle definition
|
||||
if (this.selectedOptions === null) {
|
||||
this.selectedOptions = this.setting.multiChoiceValue.options.filter(option => option.default)
|
||||
this.selectedOptions = this.setting.multiChoiceValue.options
|
||||
.filter(option => option.default)
|
||||
.map(val => val.displayValue)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user