-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from arnaugiralt/feat/LITE-28299-create-deploy…
…ment-request-dialog LITE-28299: create deployment request dialog
- Loading branch information
Showing
22 changed files
with
3,826 additions
and
1,035 deletions.
There are no files selected for viewing
220 changes: 0 additions & 220 deletions
220
...eployment-details.762bdc77ba188478a878.js → ...eployment-details.74b7244a090b39702a09.js
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
1,154 changes: 1,138 additions & 16 deletions
1,154
..._ppr/static/index.b6eb29f46e003ae8f9a4.js → ..._ppr/static/index.4e92fe096c8c41ecf7ea.js
Large diffs are not rendered by default.
Oops, something went wrong.
1,284 changes: 986 additions & 298 deletions
1,284
...ppr/static/index.5c5477c3e81eb95e1456.css → ...ppr/static/index.7f54bf0dcbb9dc626487.css
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
...pr/static/vendors.179057bad5fafaf6a016.js → ...pr/static/vendors.3c43b45d3e9e7cbf9863.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
<template lang="pug"> | ||
.checkbox-table | ||
p.checkbox-table__title {{ title }} | ||
|
||
c-search.checkbox-table__search(v-model="localSearch") | ||
|
||
c-data-table.checkbox-table__table( | ||
:value="computedItems", | ||
:headers="processedHeaders", | ||
:prepare-row="prepareRow", | ||
:updating="loading", | ||
hide-all-pagination-sections, | ||
fix-layout, | ||
) | ||
template(#items="{ item, row, visibleHeaders }") | ||
tr.table__row.hoverable | ||
template(v-if="item.type === 'all'") | ||
td( | ||
v-for="(header, index) in visibleHeaders" | ||
:key="header.value", | ||
) | ||
span(v-if="index === 0") All | ||
c-checkbox( | ||
v-if="header.value === 'radio'" | ||
v-model="localIsAllSelected", | ||
) | ||
|
||
template(v-else) | ||
td( | ||
v-for="header in visibleHeaders" | ||
:key="header.value", | ||
) | ||
c-checkbox( | ||
v-if="header.value === 'radio'" | ||
:value="localValue.includes(row[valueProp])", | ||
@input="toggleSelected(row[valueProp])", | ||
) | ||
slot( | ||
v-else, | ||
:name="header.value", | ||
:row="row", | ||
) | ||
|
||
</template> | ||
|
||
<script> | ||
import cDataTable from '~components/cDataTable.vue'; | ||
import cCheckbox from '~components/cCheckbox.vue'; | ||
import cSearch from '~components/cSearch.vue'; | ||
import sync from '~mixins/sync'; | ||
export default { | ||
mixins: [sync([ | ||
{ prop: 'value', local: 'localValue' }, | ||
{ prop: 'search', local: 'localSearch' }, | ||
{ prop: 'isAllSelected', local: 'localIsAllSelected' }, | ||
])], | ||
components: { | ||
cDataTable, | ||
cCheckbox, | ||
cSearch, | ||
}, | ||
props: { | ||
value: { | ||
type: Array, | ||
default: () => [], | ||
}, | ||
valueProp: { | ||
type: String, | ||
default: 'id', | ||
}, | ||
loading: Boolean, | ||
title: String, | ||
prepareRow: Function, | ||
headers: { | ||
type: Array, | ||
required: true, | ||
}, | ||
includeAll: Boolean, | ||
isAllSelected: Boolean, | ||
items: { | ||
type: Array, | ||
default: () => [], | ||
}, | ||
search: String, | ||
}, | ||
data: () => ({ | ||
localValue: [], | ||
localSearch: '', | ||
localIsAllSelected: false, | ||
}), | ||
computed: { | ||
processedHeaders: ({ headers }) => [ | ||
...headers, | ||
{ | ||
notResizable: true, | ||
text: '', | ||
value: 'radio', | ||
width: 80, | ||
}, | ||
], | ||
computedItems: ({ items, includeAll }) => { | ||
if (includeAll) return [{ type: 'all' }, ...items]; | ||
return items; | ||
}, | ||
}, | ||
methods: { | ||
toggleSelected(value) { | ||
const index = this.localValue.indexOf(value); | ||
if (index > -1) { | ||
this.localValue.splice(index, 1); | ||
} else { | ||
this.localValue.push(value); | ||
} | ||
}, | ||
}, | ||
watch: { | ||
isAllSelected(v) { | ||
if (v) { | ||
this.localValue = this.items.map(item => item[this.valueProp]); | ||
} else { | ||
this.localValue = []; | ||
} | ||
}, | ||
}, | ||
}; | ||
</script> | ||
|
||
<style lang="stylus" scoped> | ||
.checkbox-table { | ||
&__title { | ||
font-size: 18px; | ||
font-weight: 500; | ||
line-height: 24px; | ||
margin-bottom: 24px; | ||
} | ||
&__search { | ||
margin-bottom: 12px; | ||
} | ||
} | ||
</style> |
Oops, something went wrong.