linter
This commit is contained in:
parent
c009fb55cf
commit
e568ab7eb1
|
@ -67,7 +67,7 @@ export default class KanbanBucket extends React.Component<IKanbanBucketProps, IK
|
||||||
{allowAddTask && (<ActionButton
|
{allowAddTask && (<ActionButton
|
||||||
iconProps={{ iconName: 'Add' }}
|
iconProps={{ iconName: 'Add' }}
|
||||||
allowDisabledFocus={true}
|
allowDisabledFocus={true}
|
||||||
onClick={() => this.props.addTask(bucket)}
|
onClick={() => this.props.addTask && this.props.addTask(bucket)}
|
||||||
>
|
>
|
||||||
{strings.AddTask}
|
{strings.AddTask}
|
||||||
</ActionButton>)}
|
</ActionButton>)}
|
||||||
|
@ -85,7 +85,7 @@ export default class KanbanBucket extends React.Component<IKanbanBucketProps, IK
|
||||||
{...merge}
|
{...merge}
|
||||||
toggleCompleted={this.props.toggleCompleted}
|
toggleCompleted={this.props.toggleCompleted}
|
||||||
isMoving={isMoving}
|
isMoving={isMoving}
|
||||||
openDetails={this.props.openDetails}
|
openDetails={(taskId)=> this.props.openDetails&&this.props.openDetails(taskId)}
|
||||||
onDragStart={(event) => this.props.onDragStart(event, t.taskId, t.bucket)}
|
onDragStart={(event) => this.props.onDragStart(event, t.taskId, t.bucket)}
|
||||||
onDragEnd={(event) => this.props.onDragEnd(event, t.taskId, t.bucket)}
|
onDragEnd={(event) => this.props.onDragEnd(event, t.taskId, t.bucket)}
|
||||||
/></div>
|
/></div>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import * as ReactDom from 'react-dom';
|
import * as ReactDom from 'react-dom';
|
||||||
import { Version, Environment, EnvironmentType } from '@microsoft/sp-core-library';
|
import { Version, Environment, EnvironmentType } from '@microsoft/sp-core-library';
|
||||||
|
@ -11,7 +12,7 @@ import { cloneDeep } from '@microsoft/sp-lodash-subset';
|
||||||
import { PropertyFieldListPicker, PropertyFieldListPickerOrderBy } from '@pnp/spfx-property-controls/lib/PropertyFieldListPicker';
|
import { PropertyFieldListPicker, PropertyFieldListPickerOrderBy } from '@pnp/spfx-property-controls/lib/PropertyFieldListPicker';
|
||||||
import { PropertyFieldOrder } from '@pnp/spfx-property-controls/lib/PropertyFieldOrder';
|
import { PropertyFieldOrder } from '@pnp/spfx-property-controls/lib/PropertyFieldOrder';
|
||||||
import * as strings from 'KanbanBoardWebPartStrings';
|
import * as strings from 'KanbanBoardWebPartStrings';
|
||||||
import { spfi, SPFI, SPFx } from "@pnp/sp";
|
import { spfi, SPFx } from "@pnp/sp";
|
||||||
|
|
||||||
import PropertyPaneBucketConfigComponent from './components/PropertyPaneBucketConfig';
|
import PropertyPaneBucketConfigComponent from './components/PropertyPaneBucketConfig';
|
||||||
import KanbanBoardV2, { IKanbanBoardV2Props } from './components/KanbanBoardV2';
|
import KanbanBoardV2, { IKanbanBoardV2Props } from './components/KanbanBoardV2';
|
||||||
|
@ -106,7 +107,7 @@ export default class KanbanBoardWebPart extends BaseClientSideWebPart<IKanbanBoa
|
||||||
onPropertyChange: this.listConfigurationChanged.bind(this),
|
onPropertyChange: this.listConfigurationChanged.bind(this),
|
||||||
properties: this.properties,
|
properties: this.properties,
|
||||||
context: (this.context as any),
|
context: (this.context as any),
|
||||||
onGetErrorMessage: null,
|
onGetErrorMessage: ()=>'', //TODO
|
||||||
deferredValidationTime: 0,
|
deferredValidationTime: 0,
|
||||||
key: 'listPickerFieldId',
|
key: 'listPickerFieldId',
|
||||||
onListsRetrieved: (lists) => {
|
onListsRetrieved: (lists) => {
|
||||||
|
|
|
@ -2,7 +2,7 @@ import * as React from 'react';
|
||||||
|
|
||||||
import * as strings from 'KanbanBoardWebPartStrings';
|
import * as strings from 'KanbanBoardWebPartStrings';
|
||||||
|
|
||||||
import { DisplayMode, Guid, Environment, EnvironmentType } from '@microsoft/sp-core-library';
|
import { DisplayMode } from '@microsoft/sp-core-library';
|
||||||
import { WebPartContext } from '@microsoft/sp-webpart-base';
|
import { WebPartContext } from '@microsoft/sp-webpart-base';
|
||||||
import { findIndex, isEqual, cloneDeep } from '@microsoft/sp-lodash-subset';
|
import { findIndex, isEqual, cloneDeep } from '@microsoft/sp-lodash-subset';
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import * as ReactDom from 'react-dom';
|
import * as ReactDom from 'react-dom';
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -2,10 +2,10 @@ import * as React from 'react';
|
||||||
import { IKanbanBucket } from '../../../kanban';
|
import { IKanbanBucket } from '../../../kanban';
|
||||||
import styles from './KanbanBoardV2.module.scss';
|
import styles from './KanbanBoardV2.module.scss';
|
||||||
|
|
||||||
export const bucketOrder = (item:IKanbanBucket, index:number): JSX.Element => {
|
export const bucketOrder = (item:IKanbanBucket): JSX.Element => {
|
||||||
return (
|
return (
|
||||||
<span>
|
<span>
|
||||||
{<span className={styles.ordercolor} style={{ backgroundColor: item.color?item.color:'none' }}></span>}
|
{<span className={styles.ordercolor} style={{ backgroundColor: item.color?item.color:'none' }} />}
|
||||||
{item.bucketheadline?item.bucketheadline:item.bucket}
|
{item.bucketheadline?item.bucketheadline:item.bucket}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
|
|
@ -24,6 +24,6 @@ export function mergeBucketsWithChoices(inB: IKanbanBucket[], choices: string[])
|
||||||
return currentbuckets;
|
return currentbuckets;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
return undefined;
|
return []
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -14,9 +14,9 @@ interface IFieldChoiceInfo extends IFieldInfo {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class SPKanbanService implements ISPKanbanService {
|
export default class SPKanbanService implements ISPKanbanService {
|
||||||
private sp:SPFI = null;
|
private sp:SPFI;
|
||||||
constructor(sp:SPFI) {
|
constructor(sp:SPFI) {
|
||||||
sp=sp;
|
this.sp=sp;
|
||||||
}
|
}
|
||||||
|
|
||||||
public updateTaskBucketMove(listid: string, taskId: number, bucket: string): Promise<boolean> {
|
public updateTaskBucketMove(listid: string, taskId: number, bucket: string): Promise<boolean> {
|
||||||
|
@ -62,7 +62,7 @@ export default class SPKanbanService implements ISPKanbanService {
|
||||||
}
|
}
|
||||||
public getBuckets(listId: string, ): Promise<string[]> {
|
public getBuckets(listId: string, ): Promise<string[]> {
|
||||||
return this.sp.web.lists.getById(listId).fields.getByInternalNameOrTitle("Status")()
|
return this.sp.web.lists.getById(listId).fields.getByInternalNameOrTitle("Status")()
|
||||||
.then((status: IFieldChoiceInfo) => status.Choices.map((val, index) => {
|
.then((status: IFieldChoiceInfo) => status.Choices.map((val) => {
|
||||||
return val;
|
return val;
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue