Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes issue#925 #179

Merged
merged 5 commits into from
Sep 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,14 @@ export class FileShareDetailComponent implements OnInit{
str.forEach(item=>{
if(item.fileshareId == fileShareId){
item.createdAt = Utils.formatDate(item.createdAt);
if(!item.description){
item.description = "--";
}
item.date = new Date(Utils.formatDate(item.createdAt)).getTime();
item.description = (!item.description || item.description == '') ? '--' : item.description;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please consider making a reusable util method out of this

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rhsakarpos I have added this to the backlog ( #186 ) since this is something that will have to be implemented at the application level. If this is agreeable please consider resolving this comment.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG...AB

this.snapshots.push(item);
}
})
this.snapshots.sort((previous,later)=>{
return later.date - previous.date;
})
this.selectedSnapshots = [];
})
}
Expand All @@ -223,14 +225,18 @@ export class FileShareDetailComponent implements OnInit{
description: item.description? item.description: "--",
level: item.accessCapability,
createdAt: Utils.formatDate(item.createdAt),
updatedAt: Utils.formatDate(item.updatedAt)
updatedAt: Utils.formatDate(item.updatedAt),
date: new Date(Utils.formatDate(item.updatedAt)).getTime()
}
this.acls.push(acl);
if(dialog){
this.checkAclsIp.push(item.accessTo);
}
}
})
this.acls.sort((previous,later)=>{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ideally, this is not needed, the table component in the UI should handle this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the table component is not used and the table is being generated with plain HTML and JS the sort method will have to be used. This can be looked into when we are redesigning the application.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG...AB

return later.date - previous.date;
})
this.selectedAcls = [];
})
}
Expand Down