Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
}
// Header joint filtering
/* eslint-disable */
if (Object.keys(tableFilterConditions).length !== 0) {
for (let item in tableFilterConditions) {
if (tableFilterConditions[item] !== undefined) {
params[item] = tableFilterConditions[item]
}
}
}
// Time search
if (searchTimeName && searchTimeValue
&& searchTimeValue.length > 0 && searchTimeValue[0] && searchTimeValue[1]) {
const startTime = dateformat(searchTimeValue[0], 'yyyy-mm-dd HH:MM:ss')
const endTime = dateformat(searchTimeValue[1], 'yyyy-mm-dd HH:MM:ss')
params.start_time = startTime
params.end_time = endTime
params.time_name = searchTimeName
}
httpGet(this.url, { params, ...this.httpConfig }).then((response) => {
if (response.data.meta) {
this.total = response.data.meta.count || 0
if (response.data.items.length === 0 && response.data.meta.page > 1) {
this.currentPageChanged(this.currentPage - 1)
}
}
const records = response.data.items
this.searchLoading = false
this.loading = false
this.records = records
if (this.isDefaultExpand) { // Expands the first row when there is a default expanded row
getTimebox(entry: LogEntry): Element {
const time = dateformat(new Date(entry.time), 'HH:MM:ss.l');
return (
<div style="{[styles.time_box]}">{`[${time}]`}</div>
);
}
tooltipFormat = (val) => {
return dateformat(new Date(val), 'dd.mm.yy HH:MM:ss')
}
render() {
return (
<div>
<h3> {this.props.scholarship.name} </h3>
<p> {this.props.scholarship.description} </p>
<p> {this.props.scholarship.location} </p>
<p>Apply by {dateFormat(this.props.scholarship.close_time, 'fullDate')} </p>
</div>
);
}
}
tooltipFormat = (val) => {
return dateformat(new Date(val), 'dd.mm.yy HH:MM:ss')
}
tooltipValFormat = (val) => {
<h2>Download</h2>
<p>Default file provided by Pub manager</p>
<div>
{!!formattedDownloadUrl && (
<div>
<button> {
window.open(formattedDownloadUrl);
}}
/>
<div>
Uploaded {dateFormat(formattedDownloadDate, 'mmm dd, yyyy')}
</div>
</button></div>
)}
{this.props.pubData.isManager && (
{
this.updateDownloads('formatted', fileUrl);
}}
className="typset-button"
text="Upload new default file"
/>
)}
</div>
)}
if (!postId) {
return
}
let savedPost = {
id: postId,
title: title,
visibility: visibility,
content: content,
categoryId: categoryId,
tags: {
tag: tags
},
postUrl: url,
date: dateformat(new Date(), 'yyyy-mm-dd HH:MM:ss'),
}
mode == ContentMode.EDIT ? onUpdate(Object.assign(savedPost, {date: post.date})) : onAdd(savedPost)
onFinish()
}
static formatDateForURL (date) {
const format = 'yyyymmdd00';
return dateFormat(date, format, true);
}
this.init = function(name = 'log', path = 'logs') {
let dateStr = dateFormat(new Date(), 'yyyy_mm_dd_HH_MM'),
filePath = jetpack.path(`${path}/${name}_${dateStr}.txt`);
jetpack.dir(path);
stream = jetpack.createWriteStream(filePath, { flags: 'a+' });
messages = [];
logger.log(`${bar}\nSession started at ${new Date()}\n`);
};
function dateDisplayFormat(date) {
return dateFormat(date, "dd-mm-yyyy", true);
}