mirror of
https://github.com/mattermost/focalboard.git
synced 2024-11-27 08:31:20 +02:00
npm run fix
This commit is contained in:
parent
3ff889ebab
commit
775db6c36d
@ -60,7 +60,10 @@ class BoardCard extends React.Component<BoardCardProps, BoardCardState> {
|
||||
this.props.onDragEnd(e)
|
||||
}}
|
||||
>
|
||||
<MenuWrapper className='optionsMenu' stopPropagationOnToggle={true}>
|
||||
<MenuWrapper
|
||||
className='optionsMenu'
|
||||
stopPropagationOnToggle={true}
|
||||
>
|
||||
<div className='octo-hoverbutton square'><OptionsIcon/></div>
|
||||
<Menu>
|
||||
<Menu.Text
|
||||
|
@ -529,7 +529,7 @@ class BoardComponent extends React.Component<Props, State> {
|
||||
Utils.assertValue(boardTree.groupByProperty)
|
||||
|
||||
// Move option to new index
|
||||
const visibleOptionIds = boardTree.visibleGroups.map(o => o.option.id)
|
||||
const visibleOptionIds = boardTree.visibleGroups.map((o) => o.option.id)
|
||||
|
||||
const {activeView} = boardTree
|
||||
const srcIndex = visibleOptionIds.indexOf(draggedHeaderOption.id)
|
||||
|
@ -141,7 +141,8 @@ class CardDetail extends React.Component<Props, State> {
|
||||
onClick={() => {
|
||||
const newIcon = BlockIcons.shared.randomIcon()
|
||||
mutator.changeIcon(card, newIcon)
|
||||
}}>
|
||||
}}
|
||||
>
|
||||
<FormattedMessage
|
||||
id='CardDetail.add-icon'
|
||||
defaultMessage='Add Icon'
|
||||
@ -202,10 +203,10 @@ class CardDetail extends React.Component<Props, State> {
|
||||
{/* Comments */}
|
||||
|
||||
<hr/>
|
||||
<CommentsList
|
||||
comments={comments}
|
||||
cardId={card.id}
|
||||
/>
|
||||
<CommentsList
|
||||
comments={comments}
|
||||
cardId={card.id}
|
||||
/>
|
||||
<hr/>
|
||||
</div>
|
||||
|
||||
|
@ -112,7 +112,7 @@ class Editable extends React.Component<Props, State> {
|
||||
|
||||
this.text = newText
|
||||
} else {
|
||||
this.text = oldText // Reset text
|
||||
this.text = oldText // Reset text
|
||||
}
|
||||
|
||||
this.elementRef.current.classList.remove('active')
|
||||
|
@ -24,7 +24,6 @@ type State = {
|
||||
}
|
||||
|
||||
export default class PropertyValueElement extends React.Component<Props, State> {
|
||||
|
||||
constructor(props: Props) {
|
||||
super(props)
|
||||
const propertyValue = props.card.properties[props.propertyTemplate.id]
|
||||
|
@ -175,11 +175,11 @@ class TableComponent extends React.Component<Props, State> {
|
||||
card={card}
|
||||
focusOnMount={focusOnMount}
|
||||
onSaveWithEnter={() => {
|
||||
console.log("WORKING")
|
||||
console.log('WORKING')
|
||||
if (cards.length > 0 && cards[cards.length - 1] === card) {
|
||||
this.addCard(false)
|
||||
}
|
||||
console.log("STILL WORKING")
|
||||
console.log('STILL WORKING')
|
||||
}}
|
||||
/>)
|
||||
|
||||
|
@ -241,7 +241,7 @@ class ViewHeader extends React.Component<Props, State> {
|
||||
}}
|
||||
/>
|
||||
|
||||
<Menu.Separator />
|
||||
<Menu.Separator/>
|
||||
|
||||
{boardTree.board.cardProperties.map((option: IPropertyTemplate) => (
|
||||
<Menu.Text
|
||||
|
@ -1,8 +1,9 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
import {Utils} from './utils'
|
||||
import {IntlShape} from 'react-intl'
|
||||
|
||||
import {Utils} from './utils'
|
||||
|
||||
type FilterCondition = 'includes' | 'notIncludes' | 'isEmpty' | 'isNotEmpty'
|
||||
|
||||
class FilterClause {
|
||||
|
@ -320,7 +320,7 @@ class Mutator {
|
||||
}
|
||||
|
||||
async changePropertyType(boardTree: BoardTree, propertyTemplate: IPropertyTemplate, type: PropertyType) {
|
||||
const { board } = boardTree
|
||||
const {board} = boardTree
|
||||
|
||||
const newBoard = new MutableBoard(board)
|
||||
const newTemplate = newBoard.cardProperties.find((o) => o.id === propertyTemplate.id)
|
||||
@ -333,7 +333,7 @@ class Mutator {
|
||||
for (const card of boardTree.allCards) {
|
||||
const oldValue = card.properties[propertyTemplate.id]
|
||||
if (oldValue) {
|
||||
const newValue = propertyTemplate.options.find(o => o.id === oldValue)?.value
|
||||
const newValue = propertyTemplate.options.find((o) => o.id === oldValue)?.value
|
||||
const newCard = new MutableCard(card)
|
||||
newCard.properties[propertyTemplate.id] = newValue
|
||||
newBlocks.push(newCard)
|
||||
@ -345,7 +345,7 @@ class Mutator {
|
||||
for (const card of boardTree.allCards) {
|
||||
const oldValue = card.properties[propertyTemplate.id]
|
||||
if (oldValue) {
|
||||
const newValue = propertyTemplate.options.find(o => o.value === oldValue)?.id
|
||||
const newValue = propertyTemplate.options.find((o) => o.value === oldValue)?.id
|
||||
const newCard = new MutableCard(card)
|
||||
newCard.properties[propertyTemplate.id] = newValue
|
||||
newBlocks.push(newCard)
|
||||
@ -401,7 +401,7 @@ class Mutator {
|
||||
}
|
||||
|
||||
const newView = new MutableBoardView(view)
|
||||
newView.visibleOptionIds = newView.visibleOptionIds.filter(o => o !== columnOptionId)
|
||||
newView.visibleOptionIds = newView.visibleOptionIds.filter((o) => o !== columnOptionId)
|
||||
newView.hiddenOptionIds.push(columnOptionId)
|
||||
await this.updateBlock(newView, view, 'hide column')
|
||||
}
|
||||
@ -413,8 +413,9 @@ class Mutator {
|
||||
|
||||
const newView = new MutableBoardView(view)
|
||||
newView.hiddenOptionIds = newView.hiddenOptionIds.filter((o) => o !== columnOptionId)
|
||||
|
||||
// Put the column at the end of the visible list
|
||||
newView.visibleOptionIds = newView.visibleOptionIds.filter(o => o !== columnOptionId)
|
||||
newView.visibleOptionIds = newView.visibleOptionIds.filter((o) => o !== columnOptionId)
|
||||
newView.visibleOptionIds.push(columnOptionId)
|
||||
await this.updateBlock(newView, view, 'show column')
|
||||
}
|
||||
|
@ -149,6 +149,7 @@ export default class BoardPage extends React.Component<Props, State> {
|
||||
|
||||
await workspaceTree.sync()
|
||||
const boardIds = workspaceTree.boards.map((o) => o.id)
|
||||
|
||||
// Listen to boards plus all blocks at root (Empty string for parentId)
|
||||
this.workspaceListener.open(['', ...boardIds], async (blockId) => {
|
||||
Utils.log(`workspaceListener.onChanged: ${blockId}`)
|
||||
|
@ -169,9 +169,9 @@ class MutableBoardTree implements BoardTree {
|
||||
private groupCards() {
|
||||
const {activeView, groupByProperty} = this
|
||||
|
||||
const unassignedOptionIds = groupByProperty.options
|
||||
.filter(o => !activeView.visibleOptionIds.includes(o.id) && !activeView.hiddenOptionIds.includes(o.id))
|
||||
.map(o => o.id)
|
||||
const unassignedOptionIds = groupByProperty.options.
|
||||
filter((o) => !activeView.visibleOptionIds.includes(o.id) && !activeView.hiddenOptionIds.includes(o.id)).
|
||||
map((o) => o.id)
|
||||
const visibleOptionIds = [...activeView.visibleOptionIds, ...unassignedOptionIds]
|
||||
const {hiddenOptionIds} = activeView
|
||||
|
||||
@ -188,12 +188,12 @@ class MutableBoardTree implements BoardTree {
|
||||
const groups = []
|
||||
for (const optionId of optionIds) {
|
||||
if (optionId) {
|
||||
const option = groupByProperty.options.find(o => o.id === optionId)
|
||||
const option = groupByProperty.options.find((o) => o.id === optionId)
|
||||
if (option) {
|
||||
const cards = this.cards.filter((o) => optionId === o.properties[groupByProperty.id])
|
||||
const group: Group = {
|
||||
option,
|
||||
cards
|
||||
cards,
|
||||
}
|
||||
groups.push(group)
|
||||
} else {
|
||||
@ -207,7 +207,7 @@ class MutableBoardTree implements BoardTree {
|
||||
})
|
||||
const group: Group = {
|
||||
option: {id: '', value: `No ${groupByProperty.name}`, color: ''},
|
||||
cards: emptyGroupCards
|
||||
cards: emptyGroupCards,
|
||||
}
|
||||
groups.push(group)
|
||||
}
|
||||
|
@ -2,9 +2,10 @@
|
||||
// See LICENSE.txt for license information.
|
||||
import React from 'react'
|
||||
|
||||
import {MenuOptionProps} from './menuItem'
|
||||
import SubmenuTriangleIcon from '../icons/submenuTriangle'
|
||||
|
||||
import {MenuOptionProps} from './menuItem'
|
||||
|
||||
import './subMenuOption.scss'
|
||||
|
||||
type SubMenuOptionProps = MenuOptionProps & {
|
||||
|
Loading…
Reference in New Issue
Block a user