-
Notifications
You must be signed in to change notification settings - Fork 981
Expand file tree
/
Copy pathcreate-event-drawer-components.html
More file actions
79 lines (71 loc) · 3.89 KB
/
create-event-drawer-components.html
File metadata and controls
79 lines (71 loc) · 3.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<script type="text/x-template" id="data-manager-create-segment-input">
<div class="data-manager-create-event__segment bu-my-4 bg-cool-gray-10">
<div class="bu-px-4 bu-py-5">
<div class="bu-level">
<div :data-test-id="'event-drawer-event-segmentation-segmentation-details-label-' + segmentIndex" class="text-small text-heading bu-level-left bu-level-item text-uppercase bu-mb-3">{{i18n('data-manager.segmentation.details')}}</div>
<div :data-test-id="'event-drawer-event-segmentation-delete-segmentation-button-' + segmentIndex" @click="removeSegment" class="bu-is-clickable text-small bu-level-item bu-level-right color-red-100">{{i18n('data-manager.segmentation.delete')}}</div>
</div>
<cly-form-field :test-id= "'event-drawer-event-segmentation-segmentation-key-label-'+ segmentIndex" :label="i18n('data-manager.segmentation.key')">
<el-input
:test-id= "'event-drawer-event-segmentation-event-segmentation-key-input-' + segmentIndex"
class="bu-pt-1"
v-model="segment.name"
:placeholder="i18n('data-manager.segmentation.enter.key')">
</el-input>
</cly-form-field>
<cly-form-field :test-id= "'event-drawer-event-segmentation-segmentation-type-label-' + segmentIndex" class="bu-pt-1" :label="i18n('data-manager.segmentation.type')">
<el-select :test-id="'event-drawer-event-segmentation-segmentation-dropdown-' +segmentIndex" style="width: 280px;" v-model="segment.type" :placeholder="i18n('data-manager.segmentation.select.type')">
<el-option
:test-id="'event-drawer-event-segmentation-event-segmentation-type-' + segmentIndex"
class="bu-pt-1"
v-for="(item, idx) in dataTypes"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</cly-form-field>
<div class="bu-mt-3">
<el-checkbox :test-id="'event-drawer-event-segmentation-required-segmentation-checkbox-' + segmentIndex" v-model="segment.required" size="medium">
<span :test-id="'event-drawer-event-segmentation-required-segmentation-checkbox-label-' + segmentIndex" class="text-smallish color-cool-gray-100">{{i18n('data-manager.segmentation.required')}}</span>
</el-checkbox>
</div>
<div v-if="segment.required" class="text-medium text-heading">
<cly-form-field :label="i18n('data-manager.segmentation.description')" class="bu-pb-0">
<el-input
:data-test-id="'event-drawer-event-segmentation-required-segmentation-description-input-' + segmentIndex"
class="bu-pt-1"
v-if="segment.required"
type="textarea"
:rows="2"
v-model="segment.description"
:placeholder="i18n('data-manager.segmentation.enter.description')">
</el-input>
</cly-form-field>
</div>
</div>
</div>
</script>
<script type="text/x-template" id="data-manager-create-segment">
<div>
<data-manager-create-segment-input
ref="segmentInput"
v-for="(segment, i) in segments"
@remove-me="removeSegmentAtIndex(i)"
:removable="segments.length > 1"
:key="i"
:segment-index="i"
:max-choices="10"
v-model="segments[i]">
</data-manager-create-segment-input>
<el-button
data-test-id="event-drawer-event-segmentation-add-event-segmentation-button"
class="bg-light-blue-100 color-blue-100"
size="small"
type="text"
:disabled="!newSegmentAllowed"
@click="addNewSegment">
{{i18n('data-manager.segmentation.add')}}
</el-button>
</div>
</script>