|
27 | 27 | /** @type {any[]} */ |
28 | 28 | export let ruleOptions = []; |
29 | 29 |
|
30 | | - /** @type {any[]} */ |
31 | | - export let criteriaOptions = []; |
| 30 | + /** @type {any} */ |
| 31 | + export let configOptions = {}; |
32 | 32 |
|
33 | 33 | /** @type {number} */ |
34 | 34 | export let windowWidth; |
|
80 | 80 | rule: rule |
81 | 81 | }); |
82 | 82 | } |
| 83 | +
|
| 84 | + function toggleConfig() { |
| 85 | + svelteDispatch('config', { |
| 86 | + ruleIdx: ruleIndex |
| 87 | + }); |
| 88 | + } |
83 | 89 | </script> |
84 | 90 |
|
85 | 91 | <div class="utility-wrapper"> |
|
133 | 139 | </BotsharpTooltip> |
134 | 140 | </div> |
135 | 141 | {/if} |
| 142 | +
|
| 143 | + {#if ADMIN_ROLES.includes(user?.role || '') && !!rule.trigger_name && Object.keys(configOptions || {}).length > 0} |
| 144 | + <!-- svelte-ignore a11y-no-static-element-interactions --> |
| 145 | + <div class="line-align-center"> |
| 146 | + <!-- svelte-ignore a11y-click-events-have-key-events --> |
| 147 | + <i |
| 148 | + class="bx bx-cog text-primary fs-6 clickable" |
| 149 | + style="padding-top: 2px;" |
| 150 | + id={`rule-config-${ruleIndex}`} |
| 151 | + data-bs-toggle="tooltip" |
| 152 | + data-bs-placement="top" |
| 153 | + title="Rule config" |
| 154 | + on:click={() => toggleConfig()} |
| 155 | + /> |
| 156 | + </div> |
| 157 | + {/if} |
136 | 158 | </div> |
137 | 159 | </div> |
138 | 160 | <div class="utility-value"> |
|
164 | 186 | {#if !collapsed} |
165 | 187 | <div class="utility-row utility-row-secondary" transition:slide={{ duration: duration }}> |
166 | 188 | <div class="utility-content"> |
167 | | - <div class="utility-list-item"> |
| 189 | + <!-- <div class="utility-list-item"> |
168 | 190 | <div class="utility-label line-align-center"> |
169 | 191 | <div class="d-flex gap-1"> |
170 | 192 | <div class="line-align-center"> |
|
286 | 308 | <div class="utility-delete line-align-center"></div> |
287 | 309 | </div> |
288 | 310 | </div> |
289 | | - {/if} |
| 311 | + {/if} --> |
290 | 312 | </div> |
291 | 313 | </div> |
292 | 314 | {/if} |
|
0 commit comments