Greetings!
Now I'm using predecessors tab in taskedit but I can't get predecessors data from eventRecord in function named 'afterTaskEdit' or 'afterEventSave'.
Hello,
I tried the latest release to reproduce the issue here https://bryntum.com/products/schedulerpro/examples/constraints/
But it seems to be working fine.
What version are you using? Could you upload a test case here so we can debug it?
Hers's the taskEdit code
taskEdit: {
editorConfig: {
title: 'Task Edit',
bbar: {
items: {
deleteButton: false,
// saveButton: true,
},
},
},
items: {
generalTab: {
items: {
nameField: {
type: 'text',
name: 'name',
label: 'Name',
weight: 100,
readOnly: true,
},
requirementField: {
type: 'text',
name: 'requirement',
label: 'Requirement',
weight: 100,
flex: '1 0 50%',
readOnly: true,
},
qtyNumField: {
type: 'number',
name: 'qtyNum',
label: 'Qty No.',
flex: '1 0 50%',
weight: 100,
readOnly: true,
required: true,
min: 1,
},
locationField: {
type: 'combo',
name: 'location',
label: 'Location',
weight: 100,
flex: '1 0 50%',
items: [],
readOnly: true,
},
resultField: {
type: 'combo',
name: 'result',
label: 'Result',
weight: 100,
flex: '1 0 50%',
items: [],
readOnly: true,
},
equipTypeField: {
type: 'combo',
name: 'equipType',
label: 'Equipment Type',
weight: 100,
flex: '1 0 50%',
items: [],
readOnly: true,
listeners: {
thisObj: this,
},
},
equipspecialField: {
type: 'combo',
name: 'equipSpecialType',
label: 'Type.Test Bench',
multiSelect: true,
weight: 100,
flex: '1 0 50%',
items: [],
value: [],
readOnly: true,
},
startdateField: {
type: 'dateField',
name: 'startDate',
label: 'Choose startDate',
weight: 100,
flex: '1 0 50%',
readOnly: true,
},
enddateField: {
type: 'dateField',
name: 'endDate',
label: 'Choose endDate',
weight: 100,
flex: '1 0 50%',
readOnly: true,
},
duedateField: {
type: 'dateField',
name: 'duedate',
label: 'Sample Avalilable Date',
weight: 100,
flex: '1 0 50%',
readOnly: true,
},
testbenchField: {
type: 'text',
name: 'equipInfoName',
label: 'Test Bench',
weight: 100,
flex: '1 0 50%',
readOnly: true,
},
percentDoneField: {
disabled: true,
readOnly: true,
// weight: 100,
// flex: '1 0 50%',
},
colorField: {
type: 'combo',
name: 'color',
label: 'Color',
weight: 100,
flex: '1 0 50%',
items: Scheduler.eventColors,
listItemTpl: item => `<div class="color-box b-sch-${item.value}"> </div><div>${item.value}</div>`,
listeners: {
thisObj: this,
change(event) {
if (event.value) {
const editor = event.source.owner;
}
},
},
},
startDateField: false,
endDateField: false,
resourcesField: false,
durationField: false,
},
},
notesTab: false,
// predecessorsTab: false,
// successorsTab: false,
advancedTab: false,
},
},
When I set successors or predecessors, I can only find successors data from the first task but no predecessors from another. The predecessors data from the second task only shows when I use add button.
You can just add the following tab in task edit and let the samleList's data = [] . When the data is assigned,the predecessors tab can't show the value.
newTab: {
title: 'Samples List',
weight: 100,
items: {
grid: {
type: 'grid',
height: 300,
columns: [
{ text: 'Sample No', field: 'sampleNo' },
{ text: 'Part No', field: 'partNo' },
{ text: 'Series No', field: 'seriesNo' },
{
text: 'To Test Step',
type: 'widget',
widgets: [
{
type: 'button',
text: 'Link',
flex: 1,
icon: 'b-fa b-fa-link',
// cls: 'b-blue b-raised',
onAction: ({ source: btn }) => {
this.router.navigate([
'app/samples/samples',
{
sampleId: btn.cellInfo.record.id,
formUrl: 'app/resource-arrangement/resource/' + this.currentResourceTypeId,
},
]);
},
},
],
},
],
data: [],
},
},
},
beforeTaskEditShow(e) { const sampleList = e.editor.widgetMap.grid;
sampleList.data = [];}