NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

import moment from 'moment';

export const initialSort = {
column: '',
direction: ''
};

export const sort = {
column: 'CREDIT_ACCOUNT',
direction: 'DESC'
};

export const sortColumn = {
id: 'creditAcctNo',
label: 'creditAcctNo',
type: 'custom',
sortable: true,
sortKey: 'CREDIT_ACCOUNT'
};

export const mockChangedData = {
getDDIBatchList: {
count: 10,
dDIHeaderDtls: [
{
batchRefNo: 'BA000001',
batchName: null,
creditAcct: '388100201316',
status: 'Completed',
totalDebitAmt: null,
noOfDDI: '1',
subAction: ['VIEW', 'EDIT', 'PRINT', 'DELETE', 'SUBMIT', 'EXPORT']
},
{
batchRefNo: 'BA000002',
batchName: null,
creditAcct: '388100201316',
status: 'Completed',
totalDebitAmt: null,
noOfDDI: '1',
subAction: ['VIEW', 'EDIT', 'PRINT', 'DELETE', 'SUBMIT', 'EXPORT']
}
],
listHeader: [
{
id: 'batchRefNo',
isSortable: false,
label: 'list.listHeaders.mandate.batchRefNo',
sortKey: 'BATCH_REF'
},
{
id: 'totalDebitAmt',
isSortable: false,
label: 'list.listHeaders.mandate.totalDebitAmt',
sortKey: 'total_DebitAmt'
},
{
id: 'batchName',
isSortable: false,
label: 'list.listHeaders.mandate.batchName',
sortKey: 'BATCH_NAME'
},
{
id: 'creditAcctNo',
isSortable: true,
label: 'list.listHeaders.mandate.creditAcctNo',
sortKey: 'CREDIT_ACCOUNT'
},
{
id: 'noOfDDI',
isSortable: false,
label: 'list.listHeaders.mandate.noOfDDI',
sortKey: 'NO_OF_DDI'
},
{
id: 'status',
isSortable: true,
label: 'list.listHeaders.mandate.status',
sortKey: 'STATUS'
}
]
},
getDDIBatchListFilterColumns: {
listFilter: [
{
filterTitle: 'list.mandate.listHeaders.transaction.lblMandateRef',
filterKey: 'BANK_REF',
filterType: 'FREETEXT',
filterData: null
},
{
filterTitle: 'list.mandate.listHeaders.transaction.lblEndDate',
filterKey: 'MANDATE_AMOUNT',
filterType: 'RANGE',
valueMin: 0,
valueMax: 9000
},
{
filterTitle: 'list.mandate.listHeaders.transaction.lblEndDate',
filterKey: 'START_DATE',
filterType: 'DATE',
filterData: null
},
{
filterTitle: 'list.mandate.listHeaders.transaction.lblStatus',
filterKey: 'Status',
filterType: 'CHECKBOX',
filterData: [
{
id: 14,
value: 'BATCH REPAIRED',
label: 'BATCH REPAIRED',
selected: false,
minAmountRange: null
},

{
id: 2,
value: 'COMPLETED',
label: 'Completed',
selected: false,
minAmountRange: null
}
]
}
]
},
fetchMore: jest.fn()
};

export const previousResult = {
getDDIBatchList: {
count: 146,
dDIHeaderDtls: [
{
batchRefNo: 'BA000001',
batchName: null,
creditAcct: '388100201316',
status: 'Completed',
totalDebitAmt: null,
noOfDDI: '1'
}
]
}
};

export const fetchMoreResult = {
getDDIBatchList: {
count: 146,
dDIHeaderDtls: [
{
batchRefNo: 'BA000002',
batchName: null,
creditAcct: '388100201316',
status: 'Completed',
totalDebitAmt: null,
noOfDDI: '1'
}
]
}
};

export const previousWithFetchMoreResult = {
count: 10,
getDDIBatchList: {
count: 146,
dDIHeaderDtls: [
{
batchName: null,
batchRefNo: 'BA000001',
creditAcct: '388100201316',
noOfDDI: '1',
status: 'Completed',
totalDebitAmt: null
}
]
},
getMandateBatchList: {
mandateHeaderDtls: [
{
batchName: null,
batchRefNo: 'ManP0001',
creditAcctName: null,
creditAcctNo: '388100201316',
creditBankCode: 'SCBLMYKXXXX',
creditBankLocalCode: null,
ctryCode: null,
noOfMandates: '1',
status: 'Completed'
},
{
batchName: null,
batchRefNo: 'ManP0002',
creditAcctName: null,
creditAcctNo: '388100201316',
creditBankCode: 'SCBLMYKXXXX',
creditBankLocalCode: null,
ctryCode: null,
noOfMandates: '1',
status: 'Completed'
}
]
}
};

export const previousWithoutFetchMoreResult = {
count: 146,
dDIHeaderDtls: [
{
batchRefNo: 'BA000001',
batchName: null,
creditAcct: '388100201316',
status: 'Completed',
totalDebitAmt: null,
noOfDDI: '1'
}
]
};

const startDate = moment('2018-04-09T12:51:33.603Z');

const endDate = moment('2018-04-10T12:51:33.603Z');

export const path = {
pathname: 'collections/lists/managelists/mandate/transactions'
};

export const mockColumnsWithoutSort = [
{
clickable: true,
highlight: true,
id: 'batchRefNo',
label: 'list.listHeaders.mandate.batchRefNo',
sortKey: 'BATCH_REF',
sortable: false,
type: 'custom'
},
{
id: 'totalDebitAmt',
label: 'list.listHeaders.mandate.totalDebitAmt',
sortKey: 'total_DebitAmt',
sortable: false,
type: 'custom'
},
{
id: 'batchName',
label: 'list.listHeaders.mandate.batchName',
sortKey: 'BATCH_NAME',
sortable: false,
type: 'custom'
},
{
id: 'creditAcctNo',
label: 'list.listHeaders.mandate.creditAcctNo',
sortKey: 'CREDIT_ACCOUNT',
sortable: true,
type: 'custom'
},
{
id: 'noOfDDI',
label: 'list.listHeaders.mandate.noOfDDI',
sortKey: 'NO_OF_DDI',
sortable: false,
type: 'custom'
},
{
id: 'status',
label: 'list.listHeaders.mandate.status',
sortKey: 'STATUS',
sortable: true,
type: 'custom'
}
];

export const mockColumnsWithSort = [
{
clickable: true,
highlight: true,
id: 'batchRefNo',
label: 'list.listHeaders.mandate.batchRefNo',
sortKey: 'BATCH_REF',
sortable: false,
type: 'custom'
},
{
id: 'totalDebitAmt',
label: 'list.listHeaders.mandate.totalDebitAmt',
sortKey: 'total_DebitAmt',
sortable: false,
type: 'custom'
},
{
id: 'batchName',
label: 'list.listHeaders.mandate.batchName',
sortKey: 'BATCH_NAME',
sortable: false,
type: 'custom'
},
{
id: 'creditAcctNo',
label: 'list.listHeaders.mandate.creditAcctNo',
sortKey: 'CREDIT_ACCOUNT',
sortable: true,
sorted: 'DESC',
type: 'custom'
},
{
id: 'noOfDDI',
label: 'list.listHeaders.mandate.noOfDDI',
sortKey: 'NO_OF_DDI',
sortable: false,
type: 'custom'
},
{
id: 'status',
label: 'list.listHeaders.mandate.status',
sortKey: 'STATUS',
sortable: true,
type: 'custom'
}
];

export const mockLoadMoreData = {
getDDIBatchList: {
count: 146,
dDIHeaderDtls: [
{
batchName: null,
batchRefNo: 'BA000001',
creditAcct: '388100201316',
noOfDDI: '1',
status: 'Completed',
totalDebitAmt: null
},
{
batchName: null,
batchRefNo: 'BA000002',
creditAcct: '388100201316',
noOfDDI: '1',
status: 'Completed',
totalDebitAmt: null
}
]
}
};

export const mockSortVariable = {
getDDIListRqst: {
listSortCriteria: {
attributeName: 'CREDIT_ACCOUNT',
attributeOrder: 'DESC'
},
groupingCriteria: [],
startIndex: 1,
noOfRecords: 20
},
needListFilterColumns: false
};

export const mockLoadMoreVariable = {
getDDIListRqst: {
listSortCriteria: { attributeName: '', attributeOrder: '' },
groupingCriteria: [],
startIndex: 5,
noOfRecords: 20
},
needListFilterColumns: false
};

export const updateSearchFilter = [
{
id: 'BANK_REF',
label: 'list.mandate.listHeaders.transaction.lblMandateRef',
type: 'search',
selected: 'ABC'
},
{
d: 'BANK_REF',
label: 'list.mandate.listHeaders.transaction.lblMandateRef',
type: 'range'
},
{
d: 'BANK_REF',
label: 'list.mandate.listHeaders.transaction.lblMandateRef',
type: 'daterange'
}
];

export const mockSearchVariable = {
getDDIListRqst: {
listSortCriteria: { attributeName: '', attributeOrder: '' },
groupingCriteria: [{ attributeName: 'BANK_REF', attributeValues: 'ABC' }],
startIndex: 1,
noOfRecords: 20
},
needListFilterColumns: false
};

export const updateDateRangeFilter = [
{
id: 'BANK_REF',
label: 'list.mandate.listHeaders.transaction.lblMandateRef',
type: 'search'
},
{
id: 'BANK_REF',
label: 'list.mandate.listHeaders.transaction.lblMandateRef',
type: 'daterange',
selected: [startDate, endDate]
},
{
id: 'BANK_REF',
label: 'list.mandate.listHeaders.transaction.lblMandateRef',
type: 'daterange'
}
];

export const mockDateRangeFilterVariable = {
getDDIListRqst: {
groupingCriteria: [
{
attributeName: 'BANK_REF',
attributeValues: [
startDate.format('DD/MM/YYYY HH:mm:ss'),
endDate.format('DD/MM/YYYY HH:mm:ss')
]
}
],
listSortCriteria: { attributeName: '', attributeOrder: '' },
noOfRecords: 20,
startIndex: 1
},
needListFilterColumns: false
};

export const updateRangeFilter = [
{
id: 'BANK_REF',
label: 'list.mandate.listHeaders.transaction.lblMandateRef',
type: 'search'
},
{
id: 'BANK_REF',
label: 'list.mandate.listHeaders.transaction.lblMandateRef',
type: 'daterange'
},
{
id: 'BANK_REF',
label: 'list.mandate.listHeaders.transaction.lblMandateRef',
type: 'range',
valueMax: '2',
valueMin: '1'
}
];

export const mockRangeFilterVariable = {
getDDIListRqst: {
groupingCriteria: [
{ attributeName: 'BANK_REF', attributeValues: ['1', '2'] }
],
listSortCriteria: { attributeName: '', attributeOrder: '' },
noOfRecords: 20,
startIndex: 1
},
needListFilterColumns: false
};

export const updateCheckboxFilter = [
{
id: 'BANK_REF',
label: 'list.mandate.listHeaders.transaction.lblMandateRef',
type: 'search'
},
{
id: 'BANK_REF',
label: 'list.mandate.listHeaders.transaction.lblMandateRef',
type: 'daterange'
},
{
id: 'BANK_REF',
label: 'list.mandate.listHeaders.transaction.lblMandateRef',
type: 'checkbox',
selected: ['0', '1']
}
];

export const mockCheckboxFilterVariable = {
getDDIListRqst: {
groupingCriteria: [
{ attributeName: 'BANK_REF', attributeValues: ['0', '1'] }
],
listSortCriteria: { attributeName: '', attributeOrder: '' },
noOfRecords: 20,
startIndex: 1
},
needListFilterColumns: false
};

export const mockUpdatedFilter = [
{
id: 'BANK_REF',
label: 'list.mandate.listHeaders.transaction.lblMandateRef',
type: 'range',
valueMax: '2',
valueMin: '1'
}
];

export const removeSearchFilterVariable = {
getDDIListRqst: {
groupingCriteria: [],
listSortCriteria: { attributeName: '', attributeOrder: '' },
noOfRecords: 20,
startIndex: 1
},
needListFilterColumns: false
};

export const batchRefSelected = 'Batch00001';

export const routeAfterBatchRefSelected =
'collections/mandate/batch/batchdetails';

export const mockActions = {
EXPORT: {
label: 'EXPORT',
action: () => {}
},
PRINT: {
label: 'PRINT',
action: () => {}
},
DELETE: {
label: 'DELETE',
action: () => {}
},
EDIT: {
label: 'EDIT',
action: () => {}
},
SUBMIT: {
label: 'SUBMIT',
action: () => {}
},
VIEW: {
label: 'VIEW',
action: () => {}
}
};

export const selectedRowsWithoutCommonActions = [
{ id: 'batch0001', actions: ['DELETE'] },
{ id: 'batch0002', actions: ['SUBMIT'] }
];

export const defaultActions = ['EXPORT', 'PRINT'];

export const selectedRowsWithCommonActions = [
{ id: 'batch0001', actions: ['DELETE', 'VIEW'] },
{ id: 'batch0002', actions: ['SUBMIT', 'DELETE'] }
];

export const selectedRowsWithEDITVIEWCommonActions = [
{ id: 'batch0001', actions: ['EDIT', 'VIEW'] },
{ id: 'batch0002', actions: ['VIEW', 'EDIT'] }
];

export const commonActions = ['EXPORT', 'PRINT', 'DELETE'];

export const multipleSelectedRows = [
{
id: 'MANDATE001'
},
{
id: 'MANDATE002'
}
];

export const singleSelectedRow = [
{
id: 'MANDATE001'
}
];

export const clientQuery = {
printExportRequest: {
selectedIds: ['MANDATE001', 'MANDATE002'],
userRole: 'O'
}
};

export const storeFake = (state) => ({
default: () => {},
subscribe: () => {},
dispatch: () => {},
getState: () => ({ ...state })
});

export const store = storeFake({
default: {
allowedJourney: {
allowedJourneys: {}
}
}
});

export const mockClient = {
query: jest.fn(
() =>
new Promise((resolve) =>
resolve({
data: {
id: 'MANDATE0001'
}
})
)
)
};

export const printExportVariable = {
printExportRequest: {
selectedIds: ['ManP0001', 'PIUATSGEE2A09434'],
userRole: 'O'
}
};

export const printExportSelectedRows = [
{ id: 'ManP0001' },
{ id: 'PIUATSGEE2A09434' }
];

export const colToSortVariable = {
getDDIListRqst: {
groupingCriteria: [],
listSortCriteria: {
attributeName: 'CREDIT_ACCOUNT',
attributeOrder: 'ASC'
},
noOfRecords: 20,
startIndex: 1
},
needListFilterColumns: false
};

export const mockRows = [
{
actions: ['VIEW', 'EDIT', 'PRINT', 'DELETE', 'SUBMIT', 'EXPORT'],
data: {
batchName: null,
batchRef: 'BA000001',
creditAccNum: '388100201316',
ddiStatus: 'Completed',
numberOfDDI: '1',
totalAmount: null
},
id: 'BA000001'
},
{
actions: ['VIEW', 'EDIT', 'PRINT', 'DELETE', 'SUBMIT', 'EXPORT'],
data: {
batchName: null,
batchRef: 'BA000002',
creditAccNum: '388100201316',
ddiStatus: 'Completed',
numberOfDDI: '1',
totalAmount: null
},
id: 'BA000002'
}
];

export const mockCols = [
{
type: 'custom',
sortable: false,
highlight: true,
clickable: true,
id: 'batchName',
label: 'list.listHeaders.mandate.batchName',
sortKey: 'BATCH_NAME'
},
{
type: 'custom',
sortable: true,
id: 'fileName',
label: 'list.listHeaders.mandate.fileName',
sortKey: 'FILE_NAME'
},
{
type: 'custom',
id: 'creditAcctNo',
sortable: true,
label: 'list.listHeaders.mandate.creditAcctNo',
sortKey: 'CREDIT_ACCOUNT'
},
{
type: 'custom',
sortable: false,
id: 'noOfMandates',
label: 'list.listHeaders.mandate.noOfMandates',
sortKey: 'NO_OF_MANDATE'
},
{
id: 'status',
sortable: true,
label: 'list.listHeaders.mandate.status',
sortKey: 'STATUS',
type: 'custom'
}
];

export const mockPrintExportVariables = {
printExportRequest: {
selectedIds: ['MANDATE001', 'MANDATE002'],
userRole: 'O'
}
};

export const mockUpdatedDataWithFetchMore = {
count: 10,
getMandateBatchList: {
mandateHeaderDtls: [
{
batchRefNo: 'ManP0001',
batchName: null,
creditAcctNo: '388100201316',
creditAcctName: null,
creditBankCode: 'SCBLMYKXXXX',
ctryCode: null,
creditBankLocalCode: null,
noOfMandates: '1',
status: 'Completed'
},
{
batchName: null,
batchRefNo: 'ManP0002',
creditAcctName: null,
creditAcctNo: '388100201316',
creditBankCode: 'SCBLMYKXXXX',
creditBankLocalCode: null,
ctryCode: null,
noOfMandates: '1',
status: 'Completed'
}
]
}
};

export const mockSearchFilterVariable = {
getMandateBatchListRqst: {
groupingCriteria: [],
listSortCriteria: { attributeName: '', attributeOrder: '' },
noOfRecords: 20,
startIndex: 1
},
needListFilterColumns: false
};

export const mockFilter = [
{
id: 'BANK_REF',
label: 'list.mandate.listHeaders.transaction.lblMandateRef',
type: 'search'
},
{
id: 'MANDATE_AMOUNT',
label: 'list.mandate.listHeaders.transaction.lblEndDate',
type: 'range'
},
{
id: 'START_DATE',
label: 'list.mandate.listHeaders.transaction.lblEndDate',
type: 'daterange'
},
{
id: 'Status',
items: [
{ id: 'BATCH REPAIRED', label: 'BATCH REPAIRED' },
{ id: 'COMPLETED', label: 'Completed' }
],
label: 'list.mandate.listHeaders.transaction.lblStatus',
type: 'checkbox'
}
];
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.