Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♟️ Create dataset from UI #5532

Open
wants to merge 168 commits into
base: feat/argilla-direct-feature-branch
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
168 commits
Select commit Hold shift + click to select a range
003918d
✨ First iteration for dataset creation
damianpumar Sep 24, 2024
ad16756
🔥 Add di
damianpumar Sep 24, 2024
ea9882f
📝 Support more than subsets
damianpumar Sep 26, 2024
4f537fb
💄 Fix lint
damianpumar Sep 26, 2024
02b25a6
include dataset_info in datasetCreation
leiyre Sep 26, 2024
9b7ef93
Merge branch 'feat/create-dataset-from-ui' of https://github.com/argi…
leiyre Sep 26, 2024
663ddb7
update some styles for dataset creation
leiyre Sep 26, 2024
3ec8d61
include new dataset creation page and component
leiyre Sep 26, 2024
08ace3c
fix lint
leiyre Sep 26, 2024
6df8ba8
fix lint
leiyre Sep 26, 2024
b8532dd
fix resizable styles
leiyre Sep 27, 2024
05f3e7a
remove class
leiyre Sep 27, 2024
6495e30
new configuration components
leiyre Sep 27, 2024
94b7930
fix lint
leiyre Sep 30, 2024
78ce04b
include subset and split selectors and update styles
leiyre Oct 1, 2024
7175ddc
use FieldType
leiyre Oct 1, 2024
a15d17f
create DatasetConfigurationField
leiyre Oct 1, 2024
dcfc758
include draggable area
leiyre Oct 1, 2024
54eb1d6
include empty question and styles
leiyre Oct 1, 2024
f7699bf
update styles
leiyre Oct 1, 2024
ac36407
create question card
leiyre Oct 2, 2024
46542c4
feat: :sparkles: Add Metadata creation and improve types
damianpumar Oct 2, 2024
206383d
feat: :fire: Add required text field
damianpumar Oct 2, 2024
d768181
Merge branch 'feat/create-dataset-from-ui' of https://github.com/argi…
damianpumar Oct 2, 2024
c602a18
remove question and update styles
leiyre Oct 3, 2024
806901a
Merge branch 'feat/create-dataset-from-ui' of https://github.com/argi…
leiyre Oct 3, 2024
afe9879
feat: :sparkles: Add single question as required
damianpumar Oct 3, 2024
367989f
Merge branch 'feat/create-dataset-from-ui' of https://github.com/argi…
damianpumar Oct 3, 2024
5182769
include plus icon
leiyre Oct 3, 2024
aa1abb7
restructure
leiyre Oct 3, 2024
83047ed
include addQuestion method
leiyre Oct 3, 2024
a67f6ea
Merge branch 'feat/create-dataset-from-ui' of https://github.com/argi…
leiyre Oct 3, 2024
2cabe9a
feat: :zap: Add chat field
damianpumar Oct 3, 2024
18a8783
type field and question type
leiyre Oct 3, 2024
05e5200
Merge branch 'feat/create-dataset-from-ui' of https://github.com/argi…
leiyre Oct 3, 2024
f841006
Wip
damianpumar Oct 3, 2024
3e83d3e
Merge branch 'feat/create-dataset-from-ui' of https://github.com/argi…
damianpumar Oct 3, 2024
b629e96
feat: Handle no mapped
damianpumar Oct 3, 2024
c75ea62
include options input
leiyre Oct 4, 2024
8073f6f
Merge branch 'feat/create-dataset-from-ui' of https://github.com/argi…
leiyre Oct 4, 2024
21072a9
include availableTypes and include options input
leiyre Oct 4, 2024
fcd023b
fix typo and include no mapping option
leiyre Oct 4, 2024
749606d
include title for field and question
leiyre Oct 4, 2024
ef73df2
prevent drag when the input is focused
leiyre Oct 4, 2024
2a24d44
create questions
leiyre Oct 4, 2024
15ec37d
show metadata types and allow to change
leiyre Oct 4, 2024
6cbea29
update error message
leiyre Oct 4, 2024
1dc12a5
update repository Id example
leiyre Oct 7, 2024
c1d4745
include metadata and restructure components
leiyre Oct 7, 2024
e68948d
metadata type
leiyre Oct 7, 2024
c460ec4
update some styles
leiyre Oct 7, 2024
7ed13cd
fix validation
leiyre Oct 8, 2024
30fe30a
remove console
leiyre Oct 8, 2024
8b51b9c
fix Mtetadata creation class
leiyre Oct 8, 2024
99865c1
feat: Improve design
damianpumar Oct 8, 2024
735492d
Merge branch 'feat/create-dataset-from-ui' of https://github.com/argi…
leiyre Oct 8, 2024
9f459f0
fix param value
leiyre Oct 8, 2024
5338b63
feat: :art: Improve design
damianpumar Oct 8, 2024
43047a6
feat: :art: Fix lint
damianpumar Oct 8, 2024
c0795f2
update title
leiyre Oct 9, 2024
7669e9a
update question prefilled settings
leiyre Oct 9, 2024
a5b70e5
initialize answers for preview
leiyre Oct 9, 2024
3447129
Merge branch 'feat/create-dataset-from-ui' of https://github.com/argi…
leiyre Oct 9, 2024
3bdb5a5
fix subset selector when single subset
leiyre Oct 9, 2024
07f1e12
fix draggable areas
leiyre Oct 9, 2024
5c75e59
refactor
leiyre Oct 9, 2024
f584cd5
allow to choose column from question card
leiyre Oct 9, 2024
724e57d
refresh static settings data on changing type
leiyre Oct 9, 2024
2bc24e2
fix condition
leiyre Oct 9, 2024
47e0a9d
update structure
leiyre Oct 9, 2024
4e167d1
refactor DatasetConfigurationColumnSelector to DatasetConfigurationSe…
leiyre Oct 9, 2024
db2159c
show default setting when no mapping is selected
leiyre Oct 9, 2024
c0e85fc
include dataset configuration name and workspace
leiyre Oct 9, 2024
d15022a
create prop for rezisable minHeightPercent
leiyre Oct 10, 2024
2b7eb0e
Merge branch 'develop' into feat/create-dataset-from-ui
leiyre Oct 10, 2024
39cf614
🐛 Fix
damianpumar Oct 10, 2024
bbf01ed
fix lint
leiyre Oct 10, 2024
0c80440
fix comparison error
leiyre Oct 10, 2024
190f008
remove default question and field
leiyre Oct 11, 2024
c91ac3e
explicit import icons
leiyre Oct 11, 2024
ef0661a
include resize between preview and form
leiyre Oct 11, 2024
aa3b562
include dtype in FieldCreation
leiyre Oct 11, 2024
33e8553
remove metadata references in templates
leiyre Oct 11, 2024
78ff312
fix test
leiyre Oct 11, 2024
53bbe88
remove markdown and titile edition
leiyre Oct 11, 2024
b5fe6c7
include required
leiyre Oct 11, 2024
4941871
feat: :art: Improve
damianpumar Oct 11, 2024
5d60724
Merge branch 'feat/create-dataset-from-ui' of https://github.com/argi…
damianpumar Oct 11, 2024
53add70
Merge branch 'feat/create-dataset-from-ui' of https://github.com/argi…
leiyre Oct 11, 2024
f93e05d
✨ Fix
damianpumar Oct 11, 2024
7de1005
🔥 Fix
damianpumar Oct 11, 2024
1c557ba
show column type in cards
leiyre Oct 11, 2024
9aa1022
include mocked field preview
leiyre Oct 11, 2024
d53d42b
get types for field preview
leiyre Oct 11, 2024
9eee2c9
Merge branch 'feat/create-dataset-from-ui' of https://github.com/argi…
leiyre Oct 11, 2024
47753ca
fix resize id
leiyre Oct 11, 2024
b02bc96
update generated question name
leiyre Oct 11, 2024
46dad2e
include padding
leiyre Oct 11, 2024
2c19cbf
🐛 Add workspace creation
damianpumar Oct 14, 2024
006e6d3
Merge branch 'feat/create-dataset-from-ui' of https://github.com/argi…
damianpumar Oct 14, 2024
2592af3
🚑 Fix DI
damianpumar Oct 14, 2024
aa6988c
🚑 Get first record
damianpumar Oct 14, 2024
4dbac18
🚑 Rename
damianpumar Oct 14, 2024
4adb2ea
✨ Fix endpoint
damianpumar Oct 14, 2024
165fd50
💄 Send repo id instead of name
damianpumar Oct 14, 2024
724a846
🚑 Fix errors
damianpumar Oct 14, 2024
70dfe63
🚀 Fix
damianpumar Oct 14, 2024
f296e1c
Merge branch 'develop' into feat/create-dataset-from-ui
frascuchon Oct 14, 2024
024aa25
Merge branch 'feat/argilla-direct-feature-branch' into feat/create-da…
frascuchon Oct 14, 2024
6789822
🚑 Improve
damianpumar Oct 14, 2024
a0d96a8
✨ Improve
damianpumar Oct 14, 2024
4553f55
🔥 Add metadata
damianpumar Oct 15, 2024
95e3e3b
🚑 Improve connection
damianpumar Oct 15, 2024
1b97b00
✨ Improve code
damianpumar Oct 15, 2024
d441511
✨ Fix lint
damianpumar Oct 15, 2024
1ea3cc2
🚀 Improve
damianpumar Oct 15, 2024
1f9b779
Merge branch 'feat/argilla-direct-feature-branch' into feat/create-da…
frascuchon Oct 15, 2024
0760e8d
✨ FIX, wip unit test...
damianpumar Oct 15, 2024
aa8f4cd
Merge branch 'feat/create-dataset-from-ui' of https://github.com/argi…
damianpumar Oct 15, 2024
b00b547
⚡️ Fix metadata and improve mapping
damianpumar Oct 15, 2024
98b754e
🐛 Fix, review with Leire
damianpumar Oct 15, 2024
304508c
⚡️ Fix
damianpumar Oct 15, 2024
f1cae6a
Merge branch 'feat/create-dataset-from-ui' of https://github.com/argi…
leiyre Oct 16, 2024
cc94ae3
update UI actions structure
leiyre Oct 16, 2024
817d34a
💄 Improve dynamic fields
damianpumar Oct 16, 2024
e1b1f90
⚡️ Fix nuxt
damianpumar Oct 16, 2024
fdcefaf
update UI
leiyre Oct 16, 2024
65f674a
Merge branch 'feat/create-dataset-from-ui' of https://github.com/argi…
leiyre Oct 16, 2024
25aed90
🔥 Remove visible options
damianpumar Oct 16, 2024
dce0e81
Merge branch 'feat/create-dataset-from-ui' of https://github.com/argi…
damianpumar Oct 16, 2024
9195a4a
✨ Fix question
damianpumar Oct 16, 2024
e102d2e
✨ Redirect when the dataset has records
damianpumar Oct 16, 2024
3255f0d
column selector
leiyre Oct 16, 2024
79aa0c8
Merge branch 'feat/create-dataset-from-ui' of https://github.com/argi…
leiyre Oct 16, 2024
5da3d78
update styles
leiyre Oct 16, 2024
fae5840
update dialog
leiyre Oct 17, 2024
f1c0601
include intro before dropdown option list
leiyre Oct 17, 2024
8c766c7
fix lint
leiyre Oct 17, 2024
d8f43d3
fix test
leiyre Oct 17, 2024
767d6a8
update chips
leiyre Oct 17, 2024
181607c
fix chips selector reactivity
leiyre Oct 17, 2024
f460ec5
add isLoading prop
leiyre Oct 17, 2024
01eaa8d
update styles
leiyre Oct 17, 2024
d91bc1f
lint fix
leiyre Oct 17, 2024
058c309
include chips translations and update styles
leiyre Oct 17, 2024
4c5567a
remove hover
leiyre Oct 17, 2024
abf06e0
update styles
leiyre Oct 17, 2024
7562db6
update static data
leiyre Oct 17, 2024
43bb587
restructure
leiyre Oct 17, 2024
7877c71
update styles
leiyre Oct 17, 2024
625f45c
update styles
leiyre Oct 17, 2024
01ab48a
update padding
leiyre Oct 17, 2024
14938a2
✨ Improve navigation
damianpumar Oct 17, 2024
dbd894b
Merge branch 'feat/create-dataset-from-ui' of https://github.com/argi…
damianpumar Oct 17, 2024
226e3a4
update layout and styles
leiyre Oct 17, 2024
e9fc63a
Merge branch 'feat/create-dataset-from-ui' of https://github.com/argi…
leiyre Oct 17, 2024
8820db6
Update styles and copy
leiyre Oct 18, 2024
9df5efa
update border color
leiyre Oct 18, 2024
598755d
remove default value for resize
leiyre Oct 18, 2024
af241ef
🔥 Little improves
damianpumar Oct 18, 2024
97e1bf6
prevent white spaces
leiyre Oct 18, 2024
f65c77a
show selected column and prevent map when some type are selected
leiyre Oct 18, 2024
e14af1b
Merge branch 'feat/create-dataset-from-ui' of https://github.com/argi…
leiyre Oct 18, 2024
7d7519e
disable button when no workspace
leiyre Oct 18, 2024
4deb5b5
include split selector
leiyre Oct 18, 2024
7cf486f
allow images in preview
leiyre Oct 18, 2024
bdbedd0
fix lint
leiyre Oct 18, 2024
94151ee
⚡️ Fix
damianpumar Oct 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions argilla-frontend/assets/icons/assign.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* coding=utf-8
* Copyright 2021-present, the Recognai S.L. team.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/* eslint-disable */
var icon = require('vue-svgicon')
icon.register({
'assign': {
width: 10,
height: 10,
viewBox: '0 0 10 10',
data: '<path pid="0" d="M1.625 2.75c.416 0 .78-.226.974-.563h3.526a1.125 1.125 0 010 2.25h-2.25a2.25 2.25 0 000 4.5h3.526a1.125 1.125 0 100-1.124H3.875a1.125 1.125 0 010-2.25h2.25a2.25 2.25 0 000-4.5H2.599a1.125 1.125 0 10-.974 1.687z"/>'
}
})
2 changes: 2 additions & 0 deletions argilla-frontend/assets/icons/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable */
require('./arrow-down')
require('./arrow-up')
require('./assign')
require('./bulk-mode')
require('./change-height')
require('./check')
Expand Down Expand Up @@ -34,6 +35,7 @@ require('./meatballs')
require('./minimize-arrows')
require('./no-matching')
require('./pen')
require('./plus')
require('./progress')
require('./refresh')
require('./reset')
Expand Down
27 changes: 27 additions & 0 deletions argilla-frontend/assets/icons/plus.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* coding=utf-8
* Copyright 2021-present, the Recognai S.L. team.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/* eslint-disable */
var icon = require('vue-svgicon')
icon.register({
'plus': {
width: 16,
height: 16,
viewBox: '0 0 16 16',
data: '<path pid="0" d="M8 2a.75.75 0 00-.75.75v4.5h-4.5a.75.75 0 000 1.5h4.5v4.5a.75.75 0 001.5 0v-4.5h4.5a.75.75 0 000-1.5h-4.5v-4.5A.75.75 0 008 2z" _fill="#000" fill-opacity=".87"/>'
}
})
4 changes: 4 additions & 0 deletions argilla-frontend/assets/scss/abstract/variables/_themes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@
--bg-banner-warning: hsl(47, 83%, 91%);
--bg-banner-error: hsl(3, 100%, 92%);
--bg-tooltip: var(--color-dark-grey);
--bg-config-card: hsl(227, 100%, 90%);
--bg-congig-alert: hsl(41, 100%, 82%, 0.8);
--fg-chat-1: #488d81;
--fg-chat-2: #e07be0;
--fg-chat-3: #fd926a;
Expand Down Expand Up @@ -146,6 +148,8 @@
--bg-banner-warning: hsl(47, 83%, 16%);
--bg-banner-error: hsl(3, 100%, 20%);
--bg-tooltip: hsl(207, 9%, 32%);
--bg-config-card: hsla(227, 100%, 82%, 30%);
--bg-congig-alert: hsl(41, 100%, 82%, 0.4);
--fg-chat-1: #628e87;
--fg-chat-2: #af6daf;
--fg-chat-3: #cd8065;
Expand Down
2 changes: 1 addition & 1 deletion argilla-frontend/assets/scss/base/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");
html {
box-sizing: border-box;
-webkit-text-size-adjust: 100%;
Expand Down
2 changes: 1 addition & 1 deletion argilla-frontend/components/base/base-card/BaseCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default {
};
</script>

<style lang="scss">
<style lang="scss" scoped>
.card {
display: flex;
align-items: flex-end;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
<template>
<div class="resizable" :class="resizing ? '--h-resizing' : null">
<div class="resizable__up">
<div class="resizable-h" :class="resizing ? '--h-resizing' : null">
<div class="resizable-h__up">
<slot name="up" />
</div>

<div class="resizable__bar" ref="resizableBar">
<div class="resizable__bar__inner" />
<div class="resizable-h__bar" ref="resizableBar">
<div class="resizable-h__bar__inner" />
</div>
<div class="resizable-h__down" v-if="!collapsable">
<slot name="down" />
</div>

<BaseCollapsablePanel
class="resizable__down"
v-else
class="resizable-h__down"
:class="isExpanded ? '--expanded' : null"
:is-expanded="isExpanded"
@toggle-expand="toggleExpand"
Expand Down Expand Up @@ -38,6 +41,17 @@ export default {
type: String,
default: "h-rz",
},
collapsable: {
type: Boolean,
default: false,
},
minHeightPercent: {
type: Number,
default: 50,
},
topPercentHeight: {
type: Number,
},
},
data() {
return {
Expand Down Expand Up @@ -80,20 +94,35 @@ export default {
});
},
},
mounted() {
this.resizer = this.$refs.resizableBar;
this.upSide = this.resizer.previousElementSibling;
this.downSide = this.resizer.nextElementSibling;
this.limitElementHeight(this.upSide);
if (!this.collapsable) {
this.limitElementHeight(this.downSide);
}
this.resizer.addEventListener(EVENT.MOUSE_DOWN, this.mouseDownHandler);
const savedPosition = this.getPosition();
this.isExpanded = savedPosition?.isExpanded ?? false;
this.upSide.style.height = savedPosition?.isExpanded
? savedPosition?.position
: "100%";
if (savedPosition) {
if (savedPosition.isExpanded) {
this.isExpanded = savedPosition.isExpanded;
this.upSide.style.height = savedPosition.position;
} else {
this.isExpanded = false;
this.upSide.style.height = "100%";
}
} else if (this.topPercentHeight) {
this.isExpanded = false;
this.upSide.style.height = `${this.topPercentHeight}%`;
} else {
this.isExpanded = false;
this.upSide.style.height = "100%";
}
},
destroyed() {
this.resizer.removeEventListener(EVENT.MOUSE_DOWN, this.mouseDownHandler);
Expand All @@ -102,7 +131,7 @@ export default {
savePosition() {},
limitElementHeight(element) {
element.style["max-height"] = "100%";
element.style["min-height"] = "50%";
element.style["min-height"] = `${this.minHeightPercent}%`;
},
savePositionOnStartResizing(e) {
this.upSidePrevPosition = {
Expand Down Expand Up @@ -169,11 +198,11 @@ export default {
$resizabla-bar-color: #6794fe;
$collapsed-panel-height: 50px;
$resizable-bar-width: $base-space;
.resizable {
.resizable-h {
$this: &;
display: flex;
justify-content: space-between;
flex-direction: column;
justify-content: space-between;
height: 100%;
min-height: 0;
width: 100%;
Expand All @@ -190,6 +219,8 @@ $resizable-bar-width: $base-space;
margin-bottom: calc(-#{$resizable-bar-width} / 2);
@include media("<desktop") {
height: auto !important;
max-height: none !important;
min-height: auto !important;
}
.--h-resizing & {
transition: none;
Expand All @@ -203,11 +234,17 @@ $resizable-bar-width: $base-space;
flex-direction: column;
justify-content: center;
min-height: $collapsed-panel-height;
margin-top: calc(-#{$resizable-bar-width} / 2);
&.panel {
@include media(">=desktop") {
border: none;
}
}
@include media("<desktop") {
height: auto !important;
max-height: none !important;
min-height: auto !important;
}
}
&__bar {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<template>
<div class="resizable" :class="resizing ? '--v-resizing' : ''">
<div class="resizable__left"><slot name="left" /></div>
<div class="resizable-v" :class="resizing ? '--v-resizing' : ''">
<div class="resizable-v__left"><slot name="left" /></div>

<div class="resizable__bar" ref="resizableBar">
<div class="resizable__bar__inner" />
<div class="resizable-v__bar" ref="resizableBar">
<div class="resizable-v__bar__inner" />
</div>

<div class="resizable__right"><slot name="right" /></div>
<div class="resizable-v__right"><slot name="right" /></div>
<slot></slot>
</div>
</template>
Expand All @@ -26,6 +26,13 @@ export default {
type: String,
default: "v-rz",
},
minWidthPercent: {
type: Number,
default: 38,
},
leftPercentWidth: {
type: Number,
},
},
data() {
return {
Expand All @@ -52,15 +59,17 @@ export default {
const savedPosition = this.getPosition();
if (savedPosition) {
this.leftSide.style.width = savedPosition;
} else if (this.leftPercentWidth) {
this.leftSide.style.width = `${this.leftPercentWidth}%`;
}
},
destroyed() {
this.resizer.removeEventListener(EVENT.MOUSE_DOWN, this.mouseDownHandler);
},
methods: {
limitElementWidth(element) {
element.style["max-width"] = "62%";
element.style["min-width"] = "38%";
element.style["max-width"] = `${100 - this.minWidthPercent}%`;
element.style["min-width"] = `${this.minWidthPercent}%`;
},
savePositionOnStartResizing(e) {
this.leftSidePrevPosition = {
Expand Down Expand Up @@ -107,13 +116,17 @@ export default {
$resizabla-bar-color: #6794fe;
$resizable-bar-width: $base-space;

.resizable {
.resizable-v {
$this: &;
display: flex;
flex-direction: row;
justify-content: space-between;
height: 100%;
min-height: 0;
width: 100%;
@include media("<desktop") {
flex-direction: column;
}
&.--v-resizing {
user-select: none;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
:datasetVectors="datasetVectors"
:selectedRecords="selectedRecords"
@on-select-record="onSelectedRecord"
/>
><template slot="intro">
<slot name="intro" />
</template>
</RecordFieldsHeader>
<div class="record__content">
<RecordFields
:record="record"
Expand Down Expand Up @@ -48,7 +51,7 @@ export default {
computed: {
spanQuestionsAnswers() {
return this.record?.questions
.filter((q) => q.isSpanType)
?.filter((q) => q.isSpanType)
.map((q) => ({
id: q.id,
answer: q.answer.values,
Expand All @@ -61,7 +64,7 @@ export default {
handler() {
if (
this.record?.questions
.filter((q) => q.isSpanType)
?.filter((q) => q.isSpanType)
.some((q) => q.isAnswerModified)
) {
this.onSelectedRecord(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export default {
},
computed: {
spanQuestions() {
return this.record?.questions.filter((q) => q.isSpanType);
return this.record?.questions?.filter((q) => q.isSpanType);
},
},
};
Expand All @@ -95,7 +95,5 @@ export default {
flex-direction: column;
gap: $base-space;
min-width: 0;
height: 100%;
min-height: 0;
}
</style>
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<div class="fields__header">
<slot name="intro"></slot>
<div class="fields__header--left">
<BaseCheckbox
v-if="Array.isArray(selectedRecords)"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<span
v-if="record.status"
:key="record.status"
:class="['status-tag', getStatusInfo.class]"
:title="getStatusInfo.name"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default {
},
sdkRecord: {
type: Object,
required: true,
default: () => ({}),
},
},
computed: {
Expand Down
Loading
Loading