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
|
||||
iconProps={{ iconName: 'Add' }}
|
||||
allowDisabledFocus={true}
|
||||
onClick={() => this.props.addTask(bucket)}
|
||||
onClick={() => this.props.addTask && this.props.addTask(bucket)}
|
||||
>
|
||||
{strings.AddTask}
|
||||
</ActionButton>)}
|
||||
|
@ -85,7 +85,7 @@ export default class KanbanBucket extends React.Component<IKanbanBucketProps, IK
|
|||
{...merge}
|
||||
toggleCompleted={this.props.toggleCompleted}
|
||||
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)}
|
||||
onDragEnd={(event) => this.props.onDragEnd(event, t.taskId, t.bucket)}
|
||||
/></div>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import * as React from 'react';
|
||||
import * as ReactDom from 'react-dom';
|
||||
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 { PropertyFieldOrder } from '@pnp/spfx-property-controls/lib/PropertyFieldOrder';
|
||||
import * as strings from 'KanbanBoardWebPartStrings';
|
||||
import { spfi, SPFI, SPFx } from "@pnp/sp";
|
||||
import { spfi, SPFx } from "@pnp/sp";
|
||||
|
||||
import PropertyPaneBucketConfigComponent from './components/PropertyPaneBucketConfig';
|
||||
import KanbanBoardV2, { IKanbanBoardV2Props } from './components/KanbanBoardV2';
|
||||
|
@ -106,7 +107,7 @@ export default class KanbanBoardWebPart extends BaseClientSideWebPart<IKanbanBoa
|
|||
onPropertyChange: this.listConfigurationChanged.bind(this),
|
||||
properties: this.properties,
|
||||
context: (this.context as any),
|
||||
onGetErrorMessage: null,
|
||||
onGetErrorMessage: ()=>'', //TODO
|
||||
deferredValidationTime: 0,
|
||||
key: 'listPickerFieldId',
|
||||
onListsRetrieved: (lists) => {
|
||||
|
|
|
@ -2,7 +2,7 @@ import * as React from 'react';
|
|||
|
||||
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 { 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 ReactDom from 'react-dom';
|
||||
import {
|
||||
|
|
|
@ -2,10 +2,10 @@ import * as React from 'react';
|
|||
import { IKanbanBucket } from '../../../kanban';
|
||||
import styles from './KanbanBoardV2.module.scss';
|
||||
|
||||
export const bucketOrder = (item:IKanbanBucket, index:number): JSX.Element => {
|
||||
export const bucketOrder = (item:IKanbanBucket): JSX.Element => {
|
||||
return (
|
||||
<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}
|
||||
</span>
|
||||
);
|
||||
|
|
|
@ -24,6 +24,6 @@ export function mergeBucketsWithChoices(inB: IKanbanBucket[], choices: string[])
|
|||
return currentbuckets;
|
||||
} else {
|
||||
|
||||
return undefined;
|
||||
return []
|
||||
}
|
||||
}
|
|
@ -14,9 +14,9 @@ interface IFieldChoiceInfo extends IFieldInfo {
|
|||
}
|
||||
|
||||
export default class SPKanbanService implements ISPKanbanService {
|
||||
private sp:SPFI = null;
|
||||
private sp:SPFI;
|
||||
constructor(sp:SPFI) {
|
||||
sp=sp;
|
||||
this.sp=sp;
|
||||
}
|
||||
|
||||
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[]> {
|
||||
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;
|
||||
}));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue