You need to sign in to do that
Don't have an account?
Jonathan Wolff 7
Add complete button, short day and change status language in custome Task Component
Hello, as you can see below, I build a task component, in which I would like to make some changes I dont know how to add. First I would like to change the status to be in german. Even when I change my SF to german it is still english. In addition I would like to have a checkbox or button as a 3rd column to mark the task as completed.
As the last topic I would like to have a short for the day at the row for tommorow and day after tomorrow. Like :
04.05.2021 (Tue)
05.05.2021 (Wed)
If you know how to make even just one of the things tell me :)
I give you a code sample
({
doInit: function(component, event, helper) {
var today = new Date();
var tomorrow = new Date();
tomorrow.setDate(new Date().getDate()+1);
var aftertomorrowdate = new Date();
aftertomorrowdate.setDate(new Date().getDate()+2);
let options = {"month":"2-digit", "day":"2-digit", "year":"numeric"};
component.set('v.currentDate', today.toLocaleDateString("de-DE",options));
component.set('v.TomorrowDate', tomorrow.toLocaleDateString("de-DE",options));
component.set('v.AfterTomorrowDate', aftertomorrowdate.toLocaleDateString("de-DE",options));
component.set('v.mycolumns', [
{label: 'Thema', fieldName: 'SubjectName', type: 'url',
typeAttributes: {label: { fieldName: 'Subject' }, target: '_blank'}},
{label: 'Status', fieldName: 'Status', type: 'picklist'},
]);
var action = component.get("c.loadTasks");
action.setCallback(this, function(response){
var state = response.getState();
if (state === "SUCCESS") {
var records =response.getReturnValue();
records.forEach(function(record){
record.SubjectName = '/'+record.Id;
record.ActivityDate= record.ActivityDate;
});
component.set("v.tasks", records);
}
});
$A.enqueueAction(action);
As the last topic I would like to have a short for the day at the row for tommorow and day after tomorrow. Like :
04.05.2021 (Tue)
05.05.2021 (Wed)
If you know how to make even just one of the things tell me :)
I give you a code sample
({
doInit: function(component, event, helper) {
var today = new Date();
var tomorrow = new Date();
tomorrow.setDate(new Date().getDate()+1);
var aftertomorrowdate = new Date();
aftertomorrowdate.setDate(new Date().getDate()+2);
let options = {"month":"2-digit", "day":"2-digit", "year":"numeric"};
component.set('v.currentDate', today.toLocaleDateString("de-DE",options));
component.set('v.TomorrowDate', tomorrow.toLocaleDateString("de-DE",options));
component.set('v.AfterTomorrowDate', aftertomorrowdate.toLocaleDateString("de-DE",options));
component.set('v.mycolumns', [
{label: 'Thema', fieldName: 'SubjectName', type: 'url',
typeAttributes: {label: { fieldName: 'Subject' }, target: '_blank'}},
{label: 'Status', fieldName: 'Status', type: 'picklist'},
]);
var action = component.get("c.loadTasks");
action.setCallback(this, function(response){
var state = response.getState();
if (state === "SUCCESS") {
var records =response.getReturnValue();
records.forEach(function(record){
record.SubjectName = '/'+record.Id;
record.ActivityDate= record.ActivityDate;
});
component.set("v.tasks", records);
}
});
$A.enqueueAction(action);