|
@@ -19,6 +19,9 @@ using InABox.Mobile;
|
|
|
using System.IO;
|
|
|
using comal.timesheets.QAForms;
|
|
|
using comal.timesheets.CustomControls;
|
|
|
+using PRSSecurity = InABox.Core.Security;
|
|
|
+using static Android.Content.ClipData;
|
|
|
+using Xamarin.Essentials;
|
|
|
//using static Android.Provider.MediaStore;
|
|
|
|
|
|
namespace comal.timesheets.Tasks
|
|
@@ -56,6 +59,8 @@ namespace comal.timesheets.Tasks
|
|
|
else
|
|
|
{
|
|
|
ExistingKanbanTrack();
|
|
|
+ if (PRSSecurity.IsAllowed<CanShareTaskDetails>())
|
|
|
+ shareBtn.IsVisible = true;
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -246,6 +251,25 @@ namespace comal.timesheets.Tasks
|
|
|
#endregion
|
|
|
|
|
|
#region Fields Changed
|
|
|
+ private async void ShareBtn_Clicked(object sender, EventArgs e)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ CoreTable table = new Client<Kanban>().Query(new Filter<Kanban>(x => x.ID).IsEqualTo(kanbanID));
|
|
|
+ if (table.Rows.Any())
|
|
|
+ {
|
|
|
+ var detail = KanbanGrid.GenerateDetail(table.Rows.First());
|
|
|
+ var message = new EmailMessage
|
|
|
+ {
|
|
|
+ Subject = "Task Details shared from: " + GlobalVariables.EmpName,
|
|
|
+ Body = detail,
|
|
|
+ };
|
|
|
+
|
|
|
+ await Xamarin.Essentials.Email.ComposeAsync(message);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch { }
|
|
|
+ }
|
|
|
private void TitleEdt_Changed(object sender, EventArgs e)
|
|
|
{
|
|
|
kanban.Title = titleEdt.Text;
|