Commit dd94c9fb by Daniel Barker

Deal with copy directory

parent 236fcdca
...@@ -172,7 +172,10 @@ procedure TAuthService.Logout; ...@@ -172,7 +172,10 @@ procedure TAuthService.Logout;
begin begin
DeleteToken; DeleteToken;
DMConnection.currentTaskId := ''; DMConnection.currentTaskId := '';
DMConnection.currentTimeEntryDate := ''; DMConnection.timeEntriesWeekOf := '';
DMConnection.timeEntriesStartDate := '';
DMConnection.timeEntriesEndDate := '';
DMConnection.timeEntriesKeptIds := '';
end; end;
procedure TAuthService.SetToken(AToken: string); procedure TAuthService.SetToken(AToken: string);
......
...@@ -21,8 +21,12 @@ type ...@@ -21,8 +21,12 @@ type
public public
currentTaskId: string; currentTaskId: string;
currentTimeEntryDate: string; // Time Entries range saved when a row opens Task Items, restored by Back ('' = none)
const clientVersion = '0.9.4.0'; timeEntriesWeekOf: string;
timeEntriesStartDate: string;
timeEntriesEndDate: string;
timeEntriesKeptIds: string;
const clientVersion = '0.9.4.1';
procedure InitApp(SuccessProc: TSuccessProc; procedure InitApp(SuccessProc: TSuccessProc;
UnauthorizedAccessProc: TUnauthorizedAccessProc); UnauthorizedAccessProc: TUnauthorizedAccessProc);
procedure SetClientConfig(Callback: TVersionCheckCallback); procedure SetClientConfig(Callback: TVersionCheckCallback);
......
...@@ -95,9 +95,9 @@ end; ...@@ -95,9 +95,9 @@ end;
procedure ShowErrorModal(msg: string); procedure ShowErrorModal(msg: string);
begin begin
asm asm
var modal = document.getElementById('main_errormodal'); var modal = document.getElementById('mdl_error');
var label = document.getElementById('main_lblmodal_body'); var label = document.getElementById('lbl_modal_body');
var reloadBtn = document.getElementById('btn_modal_restart'); var closeBtn = document.getElementById('btn_modal_error_close');
if (label) label.innerText = msg; if (label) label.innerText = msg;
...@@ -106,10 +106,13 @@ begin ...@@ -106,10 +106,13 @@ begin
document.body.appendChild(modal); document.body.appendChild(modal);
} }
// Bind hard reload to button // Button simply closes the modal
if (reloadBtn) { if (closeBtn) {
reloadBtn.onclick = function () { closeBtn.onclick = function () {
window.location.reload(true); // hard reload, bypass cache var existing = bootstrap.Modal.getInstance(modal);
if (existing) {
existing.hide();
}
}; };
} }
...@@ -123,8 +126,8 @@ end; ...@@ -123,8 +126,8 @@ end;
procedure ShowNotificationModal(msg: string); procedure ShowNotificationModal(msg: string);
begin begin
asm asm
var modal = document.getElementById('main_notification_modal'); var modal = document.getElementById('mdl_notification');
var label = document.getElementById('main_notification_modal_body'); var label = document.getElementById('lbl_notification_body');
var closeBtn = document.getElementById('btn_modal_close'); var closeBtn = document.getElementById('btn_modal_close');
if (label) label.innerText = msg; if (label) label.innerText = msg;
......
...@@ -92,18 +92,6 @@ object FViewLogin: TFViewLogin ...@@ -92,18 +92,6 @@ object FViewLogin: TFViewLogin
TextHint = 'TaskId' TextHint = 'TaskId'
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object edtDate: TWebEdit
Left = 240
Top = 156
Width = 121
Height = 22
ChildOrder = 6
ElementID = 'view.login.edtdate'
ElementFont = efCSS
HeightPercent = 100.000000000000000000
TextHint = 'Date'
WidthPercent = 100.000000000000000000
end
object XDataWebClient: TXDataWebClient object XDataWebClient: TXDataWebClient
Connection = DMConnection.AuthConnection Connection = DMConnection.AuthConnection
Left = 492 Left = 492
......
...@@ -20,9 +20,6 @@ ...@@ -20,9 +20,6 @@
<div id="view.login.taskid.group" class="mb-3"> <div id="view.login.taskid.group" class="mb-3">
<input id="view.login.edttaskid" class="form-control" type="text" placeholder="Task Id"> <input id="view.login.edttaskid" class="form-control" type="text" placeholder="Task Id">
</div> </div>
<div id="view.login.date.group" class="mb-3">
<input id="view.login.edtdate" class="form-control" type="date" placeholder="Date">
</div>
<div class="mb-3"> <div class="mb-3">
<input id="view.login.edtusername" class="form-control" type="text" autofocus placeholder="Username"> <input id="view.login.edtusername" class="form-control" type="text" autofocus placeholder="Username">
</div> </div>
......
...@@ -19,7 +19,6 @@ type ...@@ -19,7 +19,6 @@ type
btnCloseNotification: TWebButton; btnCloseNotification: TWebButton;
XDataWebClient: TXDataWebClient; XDataWebClient: TXDataWebClient;
edtTaskId: TWebEdit; edtTaskId: TWebEdit;
edtDate: TWebEdit;
procedure btnLoginClick(Sender: TObject); procedure btnLoginClick(Sender: TObject);
procedure btnCloseNotificationClick(Sender: TObject); procedure btnCloseNotificationClick(Sender: TObject);
procedure WebFormCreate(Sender: TObject); procedure WebFormCreate(Sender: TObject);
...@@ -58,13 +57,9 @@ var ...@@ -58,13 +57,9 @@ var
if isTimeEntriesMode then if isTimeEntriesMode then
begin begin
DMConnection.currentTaskId := ''; DMConnection.currentTaskId := '';
DMConnection.currentTimeEntryDate := edtDate.Text;
if edtDate.Text <> '' then // Time Entries always opens on the current week, so no date goes in the URL
newUrl := window.location.pathname + '?time_entries=true&date=' + edtDate.Text
else
newUrl := window.location.pathname + '?time_entries=true'; newUrl := window.location.pathname + '?time_entries=true';
window.history.replaceState(TJSObject.new, '', newUrl); window.history.replaceState(TJSObject.new, '', newUrl);
end end
else else
...@@ -89,7 +84,7 @@ begin ...@@ -89,7 +84,7 @@ begin
AuthService.WebLogin( AuthService.WebLogin(
edtUsername.Text, edtUsername.Text,
'time_entries', 'time_entries',
edtDate.Text, '', // the server ignores the login value for time entries
edtPassword.Text, edtPassword.Text,
@LoginSuccess, @LoginSuccess,
@LoginError @LoginError
...@@ -164,19 +159,16 @@ begin ...@@ -164,19 +159,16 @@ begin
edtUsername.Text := FUserId; edtUsername.Text := FUserId;
edtTaskId.Text := FTaskId; edtTaskId.Text := FTaskId;
edtDate.Text := Application.Parameters.Values['date'];
if isTimeEntriesMode then if isTimeEntriesMode then
begin begin
WebLabel1.Caption := 'Time Entries Sign In'; WebLabel1.Caption := 'Time Entries Sign In';
TJSHTMLElement(document.getElementById('view.login.taskid.group')).classList.add('d-none'); TJSHTMLElement(document.getElementById('view.login.taskid.group')).classList.add('d-none');
TJSHTMLElement(document.getElementById('view.login.date.group')).classList.remove('d-none');
end end
else else
begin begin
WebLabel1.Caption := 'Task Items Sign In'; WebLabel1.Caption := 'Task Items Sign In';
TJSHTMLElement(document.getElementById('view.login.taskid.group')).classList.remove('d-none'); TJSHTMLElement(document.getElementById('view.login.taskid.group')).classList.remove('d-none');
TJSHTMLElement(document.getElementById('view.login.date.group')).classList.add('d-none');
end; end;
if FMessage <> '' then if FMessage <> '' then
......
...@@ -76,11 +76,11 @@ ...@@ -76,11 +76,11 @@
<h5 class="modal-title" id="lbl_modal_title">Error</h5> <h5 class="modal-title" id="lbl_modal_title">Error</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div> </div>
<div class="modal-body fs-6 fw-bold" id="lbl_modal_body"> <div class="modal-body fs-6" id="lbl_modal_body">
Please contact EMSystems to solve the issue. Please contact EMSystems to solve the issue.
</div> </div>
<div class="modal-footer justify-content-center"> <div class="modal-footer justify-content-center">
<button type="button" id="btn_modal_restart" class="btn btn-primary">Back to Orders</button> <button type="button" id="btn_modal_error_close" class="btn btn-primary">Close</button>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -26,6 +26,8 @@ type ...@@ -26,6 +26,8 @@ type
procedure ShowForm(aFormClass: TWebFormClass); procedure ShowForm(aFormClass: TWebFormClass);
public public
class procedure Display(logoutProc: TLogoutProc); class procedure Display(logoutProc: TLogoutProc);
procedure ShowTaskItems(const ATaskId: string);
procedure ShowTimeEntries;
end; end;
var var
...@@ -78,6 +80,21 @@ begin ...@@ -78,6 +80,21 @@ begin
Application.CreateForm(aFormClass, pnlMain.ElementID, FChildForm); Application.CreateForm(aFormClass, pnlMain.ElementID, FChildForm);
end; end;
// Opened from a Time Entries row; the URL is left as-is, so a refresh lands back on Time Entries
procedure TFViewMain.ShowTaskItems(const ATaskId: string);
begin
DMConnection.currentTaskId := ATaskId;
lblAppTitle.Caption := 'Task Items';
ShowForm(TFTaskItems);
end;
procedure TFViewMain.ShowTimeEntries;
begin
DMConnection.currentTaskId := '';
lblAppTitle.Caption := 'Time Entries';
ShowForm(TFTimeEntries);
end;
class procedure TFViewMain.Display(logoutProc: TLogoutProc); class procedure TFViewMain.Display(logoutProc: TLogoutProc);
begin begin
if Assigned(FViewMain) then if Assigned(FViewMain) then
......
...@@ -16,6 +16,18 @@ object FTaskItems: TFTaskItems ...@@ -16,6 +16,18 @@ object FTaskItems: TFTaskItems
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
OnClick = btnReloadClick OnClick = btnReloadClick
end end
object btnBack: TWebButton
Left = 78
Top = 57
Width = 96
Height = 25
Caption = 'Back'
ElementID = 'btn_back'
HeightPercent = 100.000000000000000000
TabStop = False
WidthPercent = 100.000000000000000000
OnClick = btnBackClick
end
object btnAddRow: TWebButton object btnAddRow: TWebButton
Left = 78 Left = 78
Top = 119 Top = 119
......
<div class="container-fluid p-2 d-flex flex-column h-100 overflow-hidden"> <div class="container-fluid p-2 d-flex flex-column h-100 overflow-hidden">
<div class="d-flex align-items-center justify-content-between mb-2 flex-shrink-0 gap-3"> <div class="d-flex align-items-center justify-content-between mb-2 flex-shrink-0 gap-3">
<button id="btn_back" type="button" class="btn btn-sm btn-secondary text-nowrap d-none">Back</button>
<h5 class="mb-0" id="lbl_project_name"></h5> <h5 class="mb-0" id="lbl_project_name"></h5>
<div class="d-flex align-items-center gap-2 ms-auto flex-nowrap"> <div class="d-flex align-items-center gap-2 ms-auto flex-nowrap">
......
...@@ -36,6 +36,7 @@ type ...@@ -36,6 +36,7 @@ type
btnFmtBold: TWebButton; btnFmtBold: TWebButton;
btnFmtItalic: TWebButton; btnFmtItalic: TWebButton;
btnFmtUnderline: TWebButton; btnFmtUnderline: TWebButton;
btnBack: TWebButton;
[async] procedure btnAddRowClick(Sender: TObject); [async] procedure btnAddRowClick(Sender: TObject);
procedure btnReloadClick(Sender: TObject); procedure btnReloadClick(Sender: TObject);
procedure WebFormCreate(Sender: TObject); procedure WebFormCreate(Sender: TObject);
...@@ -46,6 +47,7 @@ type ...@@ -46,6 +47,7 @@ type
procedure btnFmtBoldClick(Sender: TObject); procedure btnFmtBoldClick(Sender: TObject);
procedure btnFmtItalicClick(Sender: TObject); procedure btnFmtItalicClick(Sender: TObject);
procedure btnFmtUnderlineClick(Sender: TObject); procedure btnFmtUnderlineClick(Sender: TObject);
procedure btnBackClick(Sender: TObject);
private private
FTaskId: string; FTaskId: string;
FApplicationOptions: TJSArray; FApplicationOptions: TJSArray;
...@@ -120,7 +122,8 @@ var ...@@ -120,7 +122,8 @@ var
implementation implementation
uses uses
ConnectionModule; ConnectionModule,
View.Main;
{$R *.dfm} {$R *.dfm}
...@@ -166,6 +169,10 @@ begin ...@@ -166,6 +169,10 @@ begin
FNameManager.BindControls; FNameManager.BindControls;
// Back only applies when opened from a Time Entries row (no task_id in the URL)
if Application.Parameters.Values['task_id'] = '' then
btnBack.ElementHandle.classList.remove('d-none');
if FTaskId = '' then if FTaskId = '' then
begin begin
Utils.ShowErrorModal('Missing task_id. Please reopen from emt3.'); Utils.ShowErrorModal('Missing task_id. Please reopen from emt3.');
...@@ -658,6 +665,16 @@ begin ...@@ -658,6 +665,16 @@ begin
end; end;
procedure TFTaskItems.btnBackClick(Sender: TObject);
begin
// Deferred so this form isn't freed while its own click is still running
window.setTimeout(
procedure
begin
FViewMain.ShowTimeEntries;
end, 0);
end;
procedure TFTaskItems.btnTextColorClick(Sender: TObject); procedure TFTaskItems.btnTextColorClick(Sender: TObject);
var var
colorEl: TJSHTMLElement; colorEl: TJSHTMLElement;
......
...@@ -27,7 +27,7 @@ object FTimeEntries: TFTimeEntries ...@@ -27,7 +27,7 @@ object FTimeEntries: TFTimeEntries
ShowFocus = False ShowFocus = False
Text = 'edtWeekOf' Text = 'edtWeekOf'
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
OnExit = edtWeekOfExit OnChange = edtWeekOfChange
end end
object edtStartDate: TWebEdit object edtStartDate: TWebEdit
Left = 245 Left = 245
......
...@@ -43,45 +43,75 @@ ...@@ -43,45 +43,75 @@
<div id="time_entries_table_host" class="flex-grow-1 min-h-0 overflow-auto"></div> <div id="time_entries_table_host" class="flex-grow-1 min-h-0 overflow-auto"></div>
<div class="offcanvas offcanvas-end" tabindex="-1" id="task_picker_offcanvas" aria-labelledby="task_picker_title"> <div class="modal fade" tabindex="-1" id="task_picker_modal" aria-labelledby="task_picker_title" aria-hidden="true" data-bs-backdrop="static">
<div class="offcanvas-header"> <div class="modal-dialog modal-lg">
<h5 class="offcanvas-title" id="task_picker_title">Find Task</h5> <div class="modal-content">
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button> <div class="modal-header">
<h5 class="modal-title" id="task_picker_title">Find Task</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div> </div>
<div class="offcanvas-body"> <div class="modal-body">
<div class="mb-3"> <div class="row g-2 mb-3">
<div class="col-md-4">
<label for="task_picker_date" class="form-label">Work Date</label>
<input type="date" id="task_picker_date" class="form-control form-control-sm"
title="Select also sets the row's date. Only projects and tasks open on this date are listed." />
</div>
</div>
<div class="row g-2 align-items-end mb-3">
<div class="col-md">
<label for="task_picker_scope" class="form-label">Show</label>
<select id="task_picker_scope" class="form-select form-select-sm">
<option value="MY" selected>My Projects</option>
<option value="ACTIVE">Active Projects</option>
<option value="ALL">All Projects</option>
</select>
</div>
<div class="col-md" id="task_picker_customer_group">
<label for="task_picker_customer" class="form-label">Customer</label> <label for="task_picker_customer" class="form-label">Customer</label>
<select id="task_picker_customer" class="form-select form-select-sm"> <select id="task_picker_customer" class="form-select form-select-sm">
<option value=""></option> <option value=""></option>
</select> </select>
</div> </div>
<div class="mb-3"> <div class="col-md">
<label for="task_picker_project" class="form-label">Project</label> <label for="task_picker_project" class="form-label">Project</label>
<select id="task_picker_project" class="form-select form-select-sm" disabled> <select id="task_picker_project" class="form-select form-select-sm" disabled>
<option value=""></option> <option value=""></option>
</select> </select>
</div> </div>
</div>
<div class="mb-3"> <div class="row g-2 align-items-end mb-3">
<div class="col-md">
<label for="task_picker_task" class="form-label">Task</label> <label for="task_picker_task" class="form-label">Task</label>
<select id="task_picker_task" class="form-select form-select-sm" disabled> <select id="task_picker_task" class="form-select form-select-sm" disabled>
<option value=""></option> <option value=""></option>
</select> </select>
</div> </div>
</div>
<div id="task_picker_status" class="alert alert-danger py-1 px-2 mb-3 d-none small"></div> <div id="task_picker_status" class="alert alert-danger py-1 px-2 mb-0 d-none small"></div>
</div>
<div class="modal-footer">
<div class="d-flex align-items-center gap-2"> <div class="d-flex align-items-center gap-2">
<div class="d-flex align-items-center gap-2 me-auto">
<input class="form-check-input m-0" type="checkbox" id="task_picker_add_focus" /> <input class="form-check-input m-0" type="checkbox" id="task_picker_add_focus" />
<label class="form-check-label mb-0" for="task_picker_add_focus"> <label class="form-check-label mb-0" for="task_picker_add_focus">
Focused Task Focused Task
</label> </label>
</div> </div>
<button type="button" class="btn btn-outline-secondary btn-sm" data-bs-dismiss="offcanvas"> <!-- The selected task's own status; Save applies it with Focused Task -->
<div class="d-flex align-items-center gap-2 ms-3 me-auto">
<label for="task_picker_task_status" class="form-label mb-0">Status</label>
<select id="task_picker_task_status" class="form-select form-select-sm" style="width: 9rem;" disabled></select>
</div>
<button type="button" class="btn btn-outline-secondary btn-sm" data-bs-dismiss="modal">
Cancel Cancel
</button> </button>
...@@ -95,4 +125,5 @@ ...@@ -95,4 +125,5 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</div> </div>
...@@ -62,3 +62,8 @@ span.card { ...@@ -62,3 +62,8 @@ span.card {
.dropdown-menu { .dropdown-menu {
z-index: 1055; z-index: 1055;
} }
/* Even out the error modal's lines so one word isn't left alone on the last line */
#lbl_modal_body {
text-wrap: balance;
}
...@@ -94,15 +94,16 @@ ...@@ -94,15 +94,16 @@
<DCC_RemoteDebug>false</DCC_RemoteDebug> <DCC_RemoteDebug>false</DCC_RemoteDebug>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo> <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Locale>1033</VerInfo_Locale> <VerInfo_Locale>1033</VerInfo_Locale>
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=0.9.4.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=0.9.8.0;Comments=;LastCompiledTime=2018/08/27 15:18:29</VerInfo_Keys> <VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=0.9.4.1;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=0.9.8.0;Comments=;LastCompiledTime=2018/08/27 15:18:29</VerInfo_Keys>
<AppDPIAwarenessMode>PerMonitor</AppDPIAwarenessMode> <AppDPIAwarenessMode>PerMonitor</AppDPIAwarenessMode>
<VerInfo_MajorVer>0</VerInfo_MajorVer> <VerInfo_MajorVer>0</VerInfo_MajorVer>
<VerInfo_MinorVer>9</VerInfo_MinorVer> <VerInfo_MinorVer>9</VerInfo_MinorVer>
<VerInfo_Release>4</VerInfo_Release> <VerInfo_Release>4</VerInfo_Release>
<TMSWebBrowser>1</TMSWebBrowser>
<TMSUseJSDebugger>2</TMSUseJSDebugger>
<TMSWebSingleInstance>1</TMSWebSingleInstance> <TMSWebSingleInstance>1</TMSWebSingleInstance>
<VerInfo_Build>1</VerInfo_Build>
<TMSWebOutputPath>..\emT3XDataServer\bin\static</TMSWebOutputPath> <TMSWebOutputPath>..\emT3XDataServer\bin\static</TMSWebOutputPath>
<TMSUseJSDebugger>2</TMSUseJSDebugger>
<TMSWebBrowser>1</TMSWebBrowser>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2)'!=''"> <PropertyGroup Condition="'$(Cfg_2)'!=''">
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols> <DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
......
...@@ -1282,7 +1282,6 @@ object ApiDatabase: TApiDatabase ...@@ -1282,7 +1282,6 @@ object ApiDatabase: TApiDatabase
' c.NAME as CUSTOMER_NAME' ' c.NAME as CUSTOMER_NAME'
'from customers c ' 'from customers c '
'join project p on p.CUSTOMER_ID = c.CUSTOMER_ID' 'join project p on p.CUSTOMER_ID = c.CUSTOMER_ID'
'where p.STATUS = '#39'ACTIVE'#39
'order by c.NAME' 'order by c.NAME'
'') '')
Left = 404 Left = 404
...@@ -1302,18 +1301,20 @@ object ApiDatabase: TApiDatabase ...@@ -1302,18 +1301,20 @@ object ApiDatabase: TApiDatabase
'select' 'select'
' p.PROJECT_ID,' ' p.PROJECT_ID,'
' p.NAME as PROJECT_NAME,' ' p.NAME as PROJECT_NAME,'
' p.CUSTOMER_ID' ' p.CUSTOMER_ID,'
' c.SHORT_NAME as CUSTOMER_SHORT_NAME'
'from project p ' 'from project p '
'join customers c on c.CUSTOMER_ID = p.CUSTOMER_ID' 'join customers c on c.CUSTOMER_ID = p.CUSTOMER_ID'
'where p.STATUS = '#39'ACTIVE'#39 'where (:SCOPE = '#39'ALL'#39' or p.STATUS = '#39'ACTIVE'#39')'
'and (:CUSTOMER_ID = '#39#39' or p.CUSTOMER_ID = :CUSTOMER_ID)' 'and (:CUSTOMER_ID = '#39#39' or p.CUSTOMER_ID = :CUSTOMER_ID)'
'order by p.NAME' 'and (:SCOPE <> '#39'MY'#39' or p.PROJECT_ID in ('
'' ' select up.PROJECT_ID from user_project up where up.USER_ID = :USER_ID))'
'' 'and (:PROJECT_DATE = '#39#39' or ('
'' ' (p.START_DATE is null or date(p.START_DATE) <= :PROJECT_DATE)'
'' ' and (p.END_DATE is null or date(p.END_DATE) >= :PROJECT_DATE)))'
'' 'order by'
'' ' c.SHORT_NAME,'
' p.NAME'
'') '')
Left = 544 Left = 544
Top = 494 Top = 494
...@@ -1322,6 +1323,21 @@ object ApiDatabase: TApiDatabase ...@@ -1322,6 +1323,21 @@ object ApiDatabase: TApiDatabase
DataType = ftUnknown DataType = ftUnknown
Name = 'CUSTOMER_ID' Name = 'CUSTOMER_ID'
Value = nil Value = nil
end
item
DataType = ftUnknown
Name = 'SCOPE'
Value = nil
end
item
DataType = ftUnknown
Name = 'USER_ID'
Value = nil
end
item
DataType = ftUnknown
Name = 'PROJECT_DATE'
Value = nil
end> end>
object uqTaskPickerProjectsPROJECT_ID: TStringField object uqTaskPickerProjectsPROJECT_ID: TStringField
FieldName = 'PROJECT_ID' FieldName = 'PROJECT_ID'
...@@ -1336,6 +1352,11 @@ object ApiDatabase: TApiDatabase ...@@ -1336,6 +1352,11 @@ object ApiDatabase: TApiDatabase
FieldName = 'CUSTOMER_ID' FieldName = 'CUSTOMER_ID'
Size = 7 Size = 7
end end
object uqTaskPickerProjectsCUSTOMER_SHORT_NAME: TStringField
FieldName = 'CUSTOMER_SHORT_NAME'
ReadOnly = True
Size = 30
end
end end
object uqTaskPickerTasks: TUniQuery object uqTaskPickerTasks: TUniQuery
Connection = ucETaskApi Connection = ucETaskApi
......
...@@ -97,6 +97,7 @@ type ...@@ -97,6 +97,7 @@ type
uqTaskPickerProjectsPROJECT_ID: TStringField; uqTaskPickerProjectsPROJECT_ID: TStringField;
uqTaskPickerProjectsPROJECT_NAME: TStringField; uqTaskPickerProjectsPROJECT_NAME: TStringField;
uqTaskPickerProjectsCUSTOMER_ID: TStringField; uqTaskPickerProjectsCUSTOMER_ID: TStringField;
uqTaskPickerProjectsCUSTOMER_SHORT_NAME: TStringField;
uqTaskPickerTasksTASK_ID: TStringField; uqTaskPickerTasksTASK_ID: TStringField;
uqTaskPickerTasksCUSTOMER_NAME: TStringField; uqTaskPickerTasksCUSTOMER_NAME: TStringField;
uqTaskPickerTasksPROJECT_NAME: TStringField; uqTaskPickerTasksPROJECT_NAME: TStringField;
......
...@@ -226,6 +226,7 @@ var ...@@ -226,6 +226,7 @@ var
begin begin
Logger.Log(4, Format('TaskItemService.AddTaskRow - TASK_ID="%s" INSERT_AFTER_ITEM_NUM="%d"', [taskId, insertAfterItemNum])); Logger.Log(4, Format('TaskItemService.AddTaskRow - TASK_ID="%s" INSERT_AFTER_ITEM_NUM="%d"', [taskId, insertAfterItemNum]));
try
apiDB.uqGetTaskMaxItemNum.Close; apiDB.uqGetTaskMaxItemNum.Close;
apiDB.uqGetTaskMaxItemNum.ParamByName('TASK_ID').AsString := taskId; apiDB.uqGetTaskMaxItemNum.ParamByName('TASK_ID').AsString := taskId;
apiDB.uqGetTaskMaxItemNum.Open; apiDB.uqGetTaskMaxItemNum.Open;
...@@ -243,7 +244,7 @@ begin ...@@ -243,7 +244,7 @@ begin
newItemNum := insertAfterItemNum + 1; newItemNum := insertAfterItemNum + 1;
apiDB.uqAddTaskRow.Connection.StartTransaction; apiDB.uqAddTaskRow.Connection.StartTransaction;
try
if insertAfterItemNum > 0 then if insertAfterItemNum > 0 then
begin begin
apiDB.uqShiftTaskRowsForInsert.Close; apiDB.uqShiftTaskRowsForInsert.Close;
...@@ -281,24 +282,22 @@ var ...@@ -281,24 +282,22 @@ var
begin begin
Logger.Log(4, Format('TaskItemService.CopyTaskRow - TASK_ID="%s" SOURCE_TASK_ITEM_ID="%d"', [taskId, sourceTaskItemId])); Logger.Log(4, Format('TaskItemService.CopyTaskRow - TASK_ID="%s" SOURCE_TASK_ITEM_ID="%d"', [taskId, sourceTaskItemId]));
q := TUniQuery.Create(nil);
try
q.Connection := apiDB.ucETaskApi;
try
apiDB.uqGetTaskRowPosition.Close; apiDB.uqGetTaskRowPosition.Close;
apiDB.uqGetTaskRowPosition.ParamByName('TASK_ID').AsString := taskId; apiDB.uqGetTaskRowPosition.ParamByName('TASK_ID').AsString := taskId;
apiDB.uqGetTaskRowPosition.ParamByName('TASK_ITEM_ID').AsInteger := sourceTaskItemId; apiDB.uqGetTaskRowPosition.ParamByName('TASK_ITEM_ID').AsInteger := sourceTaskItemId;
apiDB.uqGetTaskRowPosition.Open; apiDB.uqGetTaskRowPosition.Open;
if apiDB.uqGetTaskRowPosition.IsEmpty then if apiDB.uqGetTaskRowPosition.IsEmpty then
begin
Logger.Log(2, Format('TaskItemService.CopyTaskRow - row not found TASK_ID="%s" TASK_ITEM_ID="%d"', [taskId, sourceTaskItemId]));
raise Exception.Create('Task row not found.'); raise Exception.Create('Task row not found.');
end;
sourceItemNum := apiDB.uqGetTaskRowPositionITEM_NUM.AsInteger; sourceItemNum := apiDB.uqGetTaskRowPositionITEM_NUM.AsInteger;
q := TUniQuery.Create(nil);
try
q.Connection := apiDB.ucETaskApi;
apiDB.ucETaskApi.StartTransaction; apiDB.ucETaskApi.StartTransaction;
try
apiDB.uqShiftTaskRowsForInsert.Close; apiDB.uqShiftTaskRowsForInsert.Close;
apiDB.uqShiftTaskRowsForInsert.ParamByName('TASK_ID').AsString := taskId; apiDB.uqShiftTaskRowsForInsert.ParamByName('TASK_ID').AsString := taskId;
apiDB.uqShiftTaskRowsForInsert.ParamByName('INSERT_AFTER_ITEM_NUM').AsInteger := sourceItemNum; apiDB.uqShiftTaskRowsForInsert.ParamByName('INSERT_AFTER_ITEM_NUM').AsInteger := sourceItemNum;
...@@ -345,17 +344,14 @@ begin ...@@ -345,17 +344,14 @@ begin
' TASK_ITEM_ID=' + IntToStr(taskItemId) + ' TASK_ITEM_ID=' + IntToStr(taskItemId) +
' NEW_ITEM_NUM=' + IntToStr(newItemNum)); ' NEW_ITEM_NUM=' + IntToStr(newItemNum));
try
apiDB.uqGetTaskRowPosition.Close; apiDB.uqGetTaskRowPosition.Close;
apiDB.uqGetTaskRowPosition.ParamByName('TASK_ID').AsInteger := taskId; apiDB.uqGetTaskRowPosition.ParamByName('TASK_ID').AsInteger := taskId;
apiDB.uqGetTaskRowPosition.ParamByName('TASK_ITEM_ID').AsInteger := taskItemId; apiDB.uqGetTaskRowPosition.ParamByName('TASK_ITEM_ID').AsInteger := taskItemId;
apiDB.uqGetTaskRowPosition.Open; apiDB.uqGetTaskRowPosition.Open;
if apiDB.uqGetTaskRowPosition.IsEmpty then if apiDB.uqGetTaskRowPosition.IsEmpty then
begin
logger.log(2, 'MoveTaskRow row not found TASK_ID=' + IntToStr(taskId) +
' TASK_ITEM_ID=' + IntToStr(taskItemId));
raise Exception.Create('Task row not found.'); raise Exception.Create('Task row not found.');
end;
oldItemNum := apiDB.uqGetTaskRowPositionITEM_NUM.AsInteger; oldItemNum := apiDB.uqGetTaskRowPositionITEM_NUM.AsInteger;
...@@ -384,7 +380,7 @@ begin ...@@ -384,7 +380,7 @@ begin
tempItemNum := -1; tempItemNum := -1;
apiDB.uqGetTaskRowPosition.Connection.StartTransaction; apiDB.uqGetTaskRowPosition.Connection.StartTransaction;
try
apiDB.uqMoveTaskRowTemp.ParamByName('TEMP_ITEM_NUM').AsInteger := tempItemNum; apiDB.uqMoveTaskRowTemp.ParamByName('TEMP_ITEM_NUM').AsInteger := tempItemNum;
apiDB.uqMoveTaskRowTemp.ParamByName('TASK_ID').AsInteger := taskId; apiDB.uqMoveTaskRowTemp.ParamByName('TASK_ID').AsInteger := taskId;
apiDB.uqMoveTaskRowTemp.ParamByName('TASK_ITEM_ID').AsInteger := taskItemId; apiDB.uqMoveTaskRowTemp.ParamByName('TASK_ITEM_ID').AsInteger := taskItemId;
...@@ -496,6 +492,7 @@ var ...@@ -496,6 +492,7 @@ var
end; end;
begin begin
try
Result := False; Result := False;
if not Assigned(Item) then if not Assigned(Item) then
...@@ -538,6 +535,13 @@ begin ...@@ -538,6 +535,13 @@ begin
finally finally
uqSaveField.Free; uqSaveField.Free;
end; end;
except
on E: Exception do
begin
Logger.Log(2, 'TaskItemService.SaveTaskItemField - ERROR: ' + E.Message);
raise;
end;
end;
end; end;
...@@ -590,21 +594,19 @@ var ...@@ -590,21 +594,19 @@ var
begin begin
Logger.Log(4, Format('TaskItemService.DeleteTaskRow - TASK_ID="%d" TASK_ITEM_ID="%d"', [taskId, taskItemId])); Logger.Log(4, Format('TaskItemService.DeleteTaskRow - TASK_ID="%d" TASK_ITEM_ID="%d"', [taskId, taskItemId]));
try
apiDB.uqGetTaskRowPosition.Close; apiDB.uqGetTaskRowPosition.Close;
apiDB.uqGetTaskRowPosition.ParamByName('TASK_ID').AsInteger := taskId; apiDB.uqGetTaskRowPosition.ParamByName('TASK_ID').AsInteger := taskId;
apiDB.uqGetTaskRowPosition.ParamByName('TASK_ITEM_ID').AsInteger := taskItemId; apiDB.uqGetTaskRowPosition.ParamByName('TASK_ITEM_ID').AsInteger := taskItemId;
apiDB.uqGetTaskRowPosition.Open; apiDB.uqGetTaskRowPosition.Open;
if apiDB.uqGetTaskRowPosition.IsEmpty then if apiDB.uqGetTaskRowPosition.IsEmpty then
begin
Logger.Log(2, Format('TaskItemService.DeleteTaskRow - row not found TASK_ID="%d" TASK_ITEM_ID="%d"', [taskId, taskItemId]));
raise Exception.Create('Task row not found.'); raise Exception.Create('Task row not found.');
end;
oldItemNum := apiDB.uqGetTaskRowPositionITEM_NUM.AsInteger; oldItemNum := apiDB.uqGetTaskRowPositionITEM_NUM.AsInteger;
apiDB.uqGetTaskRowPosition.Connection.StartTransaction; apiDB.uqGetTaskRowPosition.Connection.StartTransaction;
try
apiDB.uqDeleteTaskRow.ParamByName('TASK_ID').AsInteger := taskId; apiDB.uqDeleteTaskRow.ParamByName('TASK_ID').AsInteger := taskId;
apiDB.uqDeleteTaskRow.ParamByName('TASK_ITEM_ID').AsInteger := taskItemId; apiDB.uqDeleteTaskRow.ParamByName('TASK_ITEM_ID').AsInteger := taskItemId;
apiDB.uqDeleteTaskRow.ExecSQL; apiDB.uqDeleteTaskRow.ExecSQL;
...@@ -678,6 +680,7 @@ var ...@@ -678,6 +680,7 @@ var
existingName: string; existingName: string;
newGuid: TGuid; newGuid: TGuid;
begin begin
try
newName := Trim(name); newName := Trim(name);
if newName = '' then if newName = '' then
raise Exception.Create('Assigned name cannot be blank.'); raise Exception.Create('Assigned name cannot be blank.');
...@@ -707,6 +710,13 @@ begin ...@@ -707,6 +710,13 @@ begin
end; end;
Result := BuildAssignedOptionsResponse(taskId); Result := BuildAssignedOptionsResponse(taskId);
except
on E: Exception do
begin
Logger.Log(2, 'TaskItemService.AddAssignedName - ERROR: ' + E.Message);
raise;
end;
end;
end; end;
...@@ -717,6 +727,7 @@ var ...@@ -717,6 +727,7 @@ var
trimmedOldName: string; trimmedOldName: string;
trimmedNewName: string; trimmedNewName: string;
begin begin
try
trimmedOldName := Trim(oldName); trimmedOldName := Trim(oldName);
trimmedNewName := Trim(newName); trimmedNewName := Trim(newName);
...@@ -767,6 +778,13 @@ begin ...@@ -767,6 +778,13 @@ begin
end; end;
Result := BuildAssignedOptionsResponse(taskId); Result := BuildAssignedOptionsResponse(taskId);
except
on E: Exception do
begin
Logger.Log(2, 'TaskItemService.RenameAssignedName - ERROR: ' + E.Message);
raise;
end;
end;
end; end;
...@@ -775,6 +793,7 @@ var ...@@ -775,6 +793,7 @@ var
assignedId: string; assignedId: string;
assignedName: string; assignedName: string;
begin begin
try
assignedId := FindAssignedOptionId(taskId, name); assignedId := FindAssignedOptionId(taskId, name);
assignedName := FindAssignedOptionName(taskId, name); assignedName := FindAssignedOptionName(taskId, name);
...@@ -804,6 +823,13 @@ begin ...@@ -804,6 +823,13 @@ begin
end; end;
Result := BuildAssignedOptionsResponse(taskId); Result := BuildAssignedOptionsResponse(taskId);
except
on E: Exception do
begin
Logger.Log(2, 'TaskItemService.DeleteAssignedName - ERROR: ' + E.Message);
raise;
end;
end;
end; end;
...@@ -916,6 +942,7 @@ var ...@@ -916,6 +942,7 @@ var
newName: string; newName: string;
existingName: string; existingName: string;
begin begin
try
newName := Trim(name); newName := Trim(name);
if newName = '' then if newName = '' then
raise Exception.Create('Application name cannot be blank.'); raise Exception.Create('Application name cannot be blank.');
...@@ -946,6 +973,13 @@ begin ...@@ -946,6 +973,13 @@ begin
end; end;
Result := BuildApplicationOptionsResponse(taskId); Result := BuildApplicationOptionsResponse(taskId);
except
on E: Exception do
begin
Logger.Log(2, 'TaskItemService.AddApplicationName - ERROR: ' + E.Message);
raise;
end;
end;
end; end;
...@@ -957,6 +991,7 @@ var ...@@ -957,6 +991,7 @@ var
trimmedOldName: string; trimmedOldName: string;
trimmedNewName: string; trimmedNewName: string;
begin begin
try
trimmedOldName := Trim(oldName); trimmedOldName := Trim(oldName);
trimmedNewName := Trim(newName); trimmedNewName := Trim(newName);
...@@ -1011,6 +1046,13 @@ begin ...@@ -1011,6 +1046,13 @@ begin
end; end;
Result := BuildApplicationOptionsResponse(taskId); Result := BuildApplicationOptionsResponse(taskId);
except
on E: Exception do
begin
Logger.Log(2, 'TaskItemService.RenameApplicationName - ERROR: ' + E.Message);
raise;
end;
end;
end; end;
...@@ -1020,6 +1062,7 @@ var ...@@ -1020,6 +1062,7 @@ var
applicationId: Integer; applicationId: Integer;
applicationName: string; applicationName: string;
begin begin
try
projectId := FindProjectId(taskId); projectId := FindProjectId(taskId);
if projectId = '' then if projectId = '' then
raise Exception.Create('Project not found for task.'); raise Exception.Create('Project not found for task.');
...@@ -1053,6 +1096,13 @@ begin ...@@ -1053,6 +1096,13 @@ begin
end; end;
Result := BuildApplicationOptionsResponse(taskId); Result := BuildApplicationOptionsResponse(taskId);
except
on E: Exception do
begin
Logger.Log(2, 'TaskItemService.DeleteApplicationName - ERROR: ' + E.Message);
raise;
end;
end;
end; end;
...@@ -1128,6 +1178,7 @@ var ...@@ -1128,6 +1178,7 @@ var
existingName: string; existingName: string;
newGuid: TGuid; newGuid: TGuid;
begin begin
try
newName := Trim(name); newName := Trim(name);
if newName = '' then if newName = '' then
raise Exception.Create('Reported name cannot be blank.'); raise Exception.Create('Reported name cannot be blank.');
...@@ -1157,6 +1208,13 @@ begin ...@@ -1157,6 +1208,13 @@ begin
end; end;
Result := BuildReportedOptionsResponse(taskId); Result := BuildReportedOptionsResponse(taskId);
except
on E: Exception do
begin
Logger.Log(2, 'TaskItemService.AddReportedName - ERROR: ' + E.Message);
raise;
end;
end;
end; end;
...@@ -1167,6 +1225,7 @@ var ...@@ -1167,6 +1225,7 @@ var
trimmedOldName: string; trimmedOldName: string;
trimmedNewName: string; trimmedNewName: string;
begin begin
try
trimmedOldName := Trim(oldName); trimmedOldName := Trim(oldName);
trimmedNewName := Trim(newName); trimmedNewName := Trim(newName);
...@@ -1217,6 +1276,13 @@ begin ...@@ -1217,6 +1276,13 @@ begin
end; end;
Result := BuildReportedOptionsResponse(taskId); Result := BuildReportedOptionsResponse(taskId);
except
on E: Exception do
begin
Logger.Log(2, 'TaskItemService.RenameReportedName - ERROR: ' + E.Message);
raise;
end;
end;
end; end;
...@@ -1225,6 +1291,7 @@ var ...@@ -1225,6 +1291,7 @@ var
reportedId: string; reportedId: string;
reportedName: string; reportedName: string;
begin begin
try
reportedId := FindReportedOptionId(taskId, name); reportedId := FindReportedOptionId(taskId, name);
reportedName := FindReportedOptionName(taskId, name); reportedName := FindReportedOptionName(taskId, name);
...@@ -1254,6 +1321,13 @@ begin ...@@ -1254,6 +1321,13 @@ begin
end; end;
Result := BuildReportedOptionsResponse(taskId); Result := BuildReportedOptionsResponse(taskId);
except
on E: Exception do
begin
Logger.Log(2, 'TaskItemService.DeleteReportedName - ERROR: ' + E.Message);
raise;
end;
end;
end; end;
initialization initialization
......
...@@ -31,6 +31,8 @@ type ...@@ -31,6 +31,8 @@ type
public public
taskId: string; taskId: string;
taskDisplay: string; taskDisplay: string;
startDate: string; // yyyy-mm-dd, '' = no lower limit
completionDate: string; // yyyy-mm-dd, '' = still open
end; end;
TTimeEntryCategoryOption = class TTimeEntryCategoryOption = class
...@@ -42,6 +44,8 @@ type ...@@ -42,6 +44,8 @@ type
TTimeEntriesResponse = class TTimeEntriesResponse = class
public public
userName: string; userName: string;
userStartDate: string; // yyyy-mm-dd employment window, '' = open-ended
userEndDate: string;
count: Integer; count: Integer;
items: TList<TTimeEntry>; items: TList<TTimeEntry>;
taskOptions: TList<TTimeEntryTaskOption>; taskOptions: TList<TTimeEntryTaskOption>;
...@@ -64,20 +68,14 @@ type ...@@ -64,20 +68,14 @@ type
summary: string; summary: string;
end; end;
TTimeEntryFieldSave = class
public
entryId: Integer;
userId: string;
fieldName: string;
value: string;
end;
TTaskPickerOption = class TTaskPickerOption = class
public public
value: string; value: string;
display: string; display: string;
customerId: string; customerId: string;
completed: Boolean; // tasks only: COMPLETION_DATE is set
unavailableReason: string; // tasks only: why hours can't go on the picker date, '' = allowed
status: string; // tasks only: task status code
end; end;
TTaskPickerOptionsResponse = class TTaskPickerOptionsResponse = class
...@@ -97,16 +95,17 @@ type ...@@ -97,16 +95,17 @@ type
[ServiceContract, Model(API_MODEL)] [ServiceContract, Model(API_MODEL)]
ITimeEntryService = interface(IInvokable) ITimeEntryService = interface(IInvokable)
['{B18BCD1E-B19A-4D25-BBA9-50A24FC4C690}'] ['{B18BCD1E-B19A-4D25-BBA9-50A24FC4C690}']
[HttpGet] function GetTimeEntries(userId, startDate, endDate: string): TTimeEntriesResponse; [HttpGet] function GetTimeEntries(userId, startDate, endDate, keptEntryIds: string): TTimeEntriesResponse;
[HttpPost] function AddTimeEntry(userId, taskDate: string): string; [HttpPost] function AddTimeEntry(userId, taskDate: string): string;
[HttpPost] function SaveTimeEntry(Item: TTimeEntrySave): string; [HttpPost] function SaveTimeEntry(Item: TTimeEntrySave): string;
[HttpPost] function SaveTimeEntryField(Item: TTimeEntryFieldSave): Boolean;
[HttpPost] function DeleteTimeEntry(userId: string; entryId: Integer): Boolean; [HttpPost] function DeleteTimeEntry(userId: string; entryId: Integer): Boolean;
[HttpPost] function AddTaskToFocus(userId, taskId: string): Boolean; [HttpPost] function AddTaskToFocus(userId, taskId: string): Boolean;
[HttpPost] function RemoveTaskFromFocus(userId, taskId: string): Boolean; [HttpPost] function RemoveTaskFromFocus(userId, taskId: string): Boolean;
[HttpPost] function SetTaskStatus(taskId, status, taskDate: string): Boolean;
function GetTaskPickerCustomers: TTaskPickerOptionsResponse; function GetTaskPickerCustomers: TTaskPickerOptionsResponse;
function GetTaskPickerProjects(customerId: string): TTaskPickerOptionsResponse; function GetTaskPickerStatuses: TTaskPickerOptionsResponse;
function GetTaskPickerTasks(projectId: string): TTaskPickerOptionsResponse; function GetTaskPickerProjects(customerId, scope, userId, taskDate: string): TTaskPickerOptionsResponse;
function GetTaskPickerTasks(projectId, userId, taskDate: string): TTaskPickerOptionsResponse;
function GetTaskPickerTaskContext(taskId: string): TTaskPickerTaskContext; function GetTaskPickerTaskContext(taskId: string): TTaskPickerTaskContext;
end; end;
......
[Settings] [Settings]
MemoLogLevel=5 MemoLogLevel=5
FileLogLevel=5 FileLogLevel=5
webClientVersion=0.9.4.0 webClientVersion=0.9.4.1
LogFileNum=218 LogFileNum=243
[Database] [Database]
--Server=192.168.102.131 --Server=192.168.102.131
......
<div class="container">
<br />
<div class="panel panel-red">
<div id="view.errorpage.title" class="panel-heading">
Error Page
</div>
<div id="view.errorpage.message" class="panel-body">
Message
</div>
<div class="panel-footer">
<a href=".">Reload web application</a>
</div>
</div>
</div>
<nav class="navbar navbar-light bg-light login-navbar">
<div class="container-fluid">
<a class="navbar-brand">emT3web</a>
</div>
</nav>
<div class="container mt-5">
<div class="row justify-content-center">
<div class="col-md-6 col-lg-4">
<div class="card login-card">
<div class="card-header">
<h3 id="view.login.title" class="fs-6 card-title">Please Sign In</h3>
</div>
<div class="card-body">
<div role="form">
<div id="view.login.message" class="alert alert-danger">
<button id="view.login.message.button" type="button" class="btn-close" aria-label="Close"></button>
<span id="view.login.message.label"></span>
</div>
<fieldset>
<div id="view.login.taskid.group" class="mb-3">
<input id="view.login.edttaskid" class="form-control" type="text" placeholder="Task Id">
</div>
<div id="view.login.date.group" class="mb-3">
<input id="view.login.edtdate" class="form-control" type="date" placeholder="Date">
</div>
<div class="mb-3">
<input id="view.login.edtusername" class="form-control" type="text" autofocus placeholder="Username">
</div>
<div class="mb-3">
<input id="view.login.edtpassword" class="form-control" type="password" placeholder="Password">
</div>
<div class="mb-3">
<button id="view.login.btnlogin" class="btn btn-primary w-100">Login</button>
</div>
</fieldset>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="div_wrapper">
<nav class="navbar navbar-expand-lg bg-body-tertiary border-bottom shadow-sm">
<div class="container-fluid">
<div class="d-flex align-items-center gap-2">
<a id="lbl_app_title" class="navbar-brand fw-semibold" href="index.html">emT3Web</a>
<span id="lbl_version" class="badge text-bg-light border text-muted fw-normal"></span>
</div>
<div class="collapse navbar-collapse show" id="pnl_navbar_nav_dropdown">
<ul class="navbar-nav ms-auto">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle d-flex align-items-center gap-2" id="lnk_navbar_dropdown_menu_link"
role="button" data-bs-toggle="dropdown" aria-expanded="false">
<i class="fa fa-user fa-fw"></i>
<span id="lbl_username" class="fw-semibold">Username</span>
</a>
<ul class="dropdown-menu dropdown-menu-end shadow-sm" aria-labelledby="lnk_navbar_dropdown_menu_link">
<li>
<a class="dropdown-item d-flex align-items-center gap-2" id="lbl_home">
<i class="fa fa-home fa-fw"></i><span>Home</span>
</a>
</li>
<li>
<a class="dropdown-item d-flex align-items-center gap-2" id="lbl_user_profile">
<i class="fa fa-user fa-fw"></i><span>User Profile</span>
</a>
</li>
<li><hr class="dropdown-divider"></li>
<li>
<a class="dropdown-item d-flex align-items-center gap-2 text-danger" id="lbl_logout">
<i class="fa fa-sign-out fa-fw"></i><span>Logout</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<!-- Toast -->
<div id="pnl_toast_wrapper" class="position-fixed top-0 start-0 mt-5 ms-4"
style="z-index: 1080; min-width: 300px; max-width: 500px;">
<div id="toast_bootstrap" class="toast align-items-center text-white bg-success border-0 shadow" role="alert"
aria-live="assertive" aria-atomic="true">
<div class="d-flex">
<div class="toast-body" id="lbl_bootstrap_toast_body">
Success message
</div>
<button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast"
aria-label="Close"></button>
</div>
</div>
</div>
<!-- Main Panel (where all forms display) -->
<div class="container-fluid py-3 d-flex flex-column overflow-hidden" style="height: calc(100vh - 57px);">
<div id="pnl_main" class="flex-grow-1 min-h-0 overflow-hidden"></div>
</div>
<!-- Spinner Modal -->
<div id="div_spinner" class="position-absolute top-50 start-50 translate-middle d-none">
<div class="lds-roller">
<div></div><div></div><div></div><div></div>
<div></div><div></div><div></div><div></div>
</div>
</div>
<!-- Error Modal -->
<div class="modal fade" id="mdl_error" tabindex="-1" aria-labelledby="lbl_modal_title" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content shadow-lg">
<div class="modal-header">
<h5 class="modal-title" id="lbl_modal_title">Error</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body fs-6 fw-bold" id="lbl_modal_body">
Please contact EMSystems to solve the issue.
</div>
<div class="modal-footer justify-content-center">
<button type="button" id="btn_modal_restart" class="btn btn-primary">Back to Orders</button>
</div>
</div>
</div>
</div>
<!-- Confirmation Modal -->
<div class="modal fade" id="main_confirmation_modal" tabindex="-1" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content shadow-lg">
<div class="modal-header">
<h5 class="modal-title">Confirm</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body fw-bold" id="main_modal_body">
Placeholder text
</div>
<div class="modal-footer justify-content-center">
<button type="button" class="btn btn-danger me-3" id="btn_confirm_left">
Delete
</button>
<button type="button" class="btn btn-secondary" id="btn_confirm_right">
Cancel
</button>
</div>
</div>
</div>
</div>
<!-- Notification Modal -->
<div class="modal fade" id="mdl_notification" tabindex="-1" aria-labelledby="lbl_notification_title"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content shadow-lg">
<div class="modal-header">
<h5 class="modal-title" id="lbl_notification_title">Info</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body fs-6 fw-bold" id="lbl_notification_body">
Please contact EMSystems to solve the issue.
</div>
<div class="modal-footer justify-content-center">
<button type="button" id="btn_modal_close" class="btn btn-primary">Close</button>
</div>
</div>
</div>
</div>
</div>
<div class="container-fluid p-2 d-flex flex-column h-100 overflow-hidden">
<div class="d-flex align-items-center justify-content-between mb-2 flex-shrink-0 gap-3">
<h5 class="mb-0" id="lbl_project_name"></h5>
<div class="d-flex align-items-center gap-2 ms-auto flex-nowrap">
<div id="lbl_total_rows" class="me-2 text-nowrap"></div>
<div class="task-toolbar d-flex align-items-center gap-1 px-2 py-1">
<button id="btn_fmt_bold" type="button" class="btn btn-sm btn-light task-toolbar-btn" title="Bold">
<i class="fas fa-bold"></i>
</button>
<button id="btn_fmt_italic" type="button" class="btn btn-sm btn-light task-toolbar-btn" title="Italic">
<i class="fas fa-italic"></i>
</button>
<button id="btn_fmt_underline" type="button" class="btn btn-sm btn-light task-toolbar-btn" title="Underline">
<i class="fas fa-underline"></i>
</button>
<div class="vr mx-1"></div>
<button id="btn_text_color" type="button" class="btn btn-sm btn-light task-toolbar-btn task-color-btn" title="Text color">
<span class="task-color-glyph">A</span>
<span id="text_color_swatch" class="task-color-swatch"></span>
<input id="issue_notes_text_color" type="color" class="task-hidden-color-input" value="#000000">
</button>
</div>
<button id="btn_add_row" class="btn btn-sm btn-success text-nowrap">Add Row</button>
<button id="btn_insert_row" class="btn btn-sm btn-success text-nowrap">Insert Row</button>
<button id="btn_copy_row" class="btn btn-sm btn-primary text-nowrap" disabled>Copy Row</button>
<button id="btn_delete_row" class="btn btn-sm btn-danger text-nowrap">Delete Row</button>
<button id="btn_reload" class="btn btn-sm btn-primary text-nowrap">Reload</button>
</div>
</div>
<div id="tasks_table_host" class="flex-grow-1 min-h-0 overflow-auto"></div>
<div class="offcanvas offcanvas-end" tabindex="-1" id="offcanvasNameManager" aria-labelledby="nm_title">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="nm_title">Add Item</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<div id="nm_existing_list" class="list-group mb-3"></div>
<div id="nm_add_wrap" class="d-none mb-3">
<input id="nm_name_input" type="text" class="form-control" maxlength="100">
<div id="nm_name_invalid" class="invalid-feedback d-none"></div>
<div class="d-flex justify-content-end mt-2">
<button id="btn_nm_save" type="button" class="btn btn-success">Save</button>
</div>
</div>
<button id="btn_nm_add_another" type="button" class="btn btn-secondary">
Add another item
</button>
</div>
</div>
</div>
<div class="container-fluid p-2 d-flex flex-column h-100 overflow-hidden">
<div class="d-flex align-items-center justify-content-between mb-2 flex-shrink-0 gap-3">
<h5 class="mb-0 text-nowrap" id="lbl_time_entries_title"></h5>
<div class="d-flex align-items-center gap-2 ms-auto flex-nowrap">
<div id="lbl_time_total_hours" class="me-2 text-nowrap fw-semibold">Total Hours: 0</div>
<div id="lbl_time_total_rows" class="me-2 text-nowrap"></div>
<div class="d-flex align-items-center gap-2 flex-nowrap">
<label for="edt_week_of" class="form-label mb-0 text-nowrap small">Week of</label>
<input id="edt_week_of" type="date" class="form-control form-control-sm time-date-picker" />
</div>
<div class="d-flex align-items-center gap-2 flex-nowrap">
<label for="edt_start_date" class="form-label mb-0 text-nowrap small">Start</label>
<input id="edt_start_date" type="date" class="form-control form-control-sm time-date-picker" />
</div>
<div class="d-flex align-items-center gap-2 flex-nowrap">
<label for="edt_end_date" class="form-label mb-0 text-nowrap small">End</label>
<input id="edt_end_date" type="date" class="form-control form-control-sm time-date-picker" />
</div>
<button id="btn_search_range" class="btn btn-sm btn-primary text-nowrap">
Search Range
</button>
<button id="btn_add_entry" class="btn btn-sm btn-success text-nowrap">
Add Entry
</button>
<button id="btn_copy_entry" class="btn btn-sm btn-primary text-nowrap" disabled>
Copy Entry
</button>
<button id="btn_delete_entry" class="btn btn-sm btn-danger text-nowrap" disabled>
Delete Entry
</button>
</div>
</div>
<div id="lbl_validation_message" class="alert alert-danger py-1 px-2 mb-2 invisible small" style="min-height: 31px;"></div>
<div id="time_entries_table_host" class="flex-grow-1 min-h-0 overflow-auto"></div>
<div class="offcanvas offcanvas-end" tabindex="-1" id="task_picker_offcanvas" aria-labelledby="task_picker_title">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="task_picker_title">Find Task</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<div class="mb-3">
<label for="task_picker_date" class="form-label">Work Date</label>
<input type="date" id="task_picker_date" class="form-control form-control-sm" />
<div class="form-text">Only tasks open on this date are listed. Select also sets the row's date.</div>
</div>
<div class="mb-3">
<label for="task_picker_customer" class="form-label">Customer</label>
<select id="task_picker_customer" class="form-select form-select-sm">
<option value=""></option>
</select>
</div>
<div class="mb-3">
<label for="task_picker_project" class="form-label">Project</label>
<select id="task_picker_project" class="form-select form-select-sm" disabled>
<option value=""></option>
</select>
</div>
<div class="mb-3">
<label for="task_picker_task" class="form-label">Task</label>
<select id="task_picker_task" class="form-select form-select-sm" disabled>
<option value=""></option>
</select>
</div>
<div id="task_picker_status" class="alert alert-danger py-1 px-2 mb-3 d-none small"></div>
<div class="d-flex align-items-center gap-2">
<div class="d-flex align-items-center gap-2 me-auto">
<input class="form-check-input m-0" type="checkbox" id="task_picker_add_focus" />
<label class="form-check-label mb-0" for="task_picker_add_focus">
Focused Task
</label>
</div>
<button type="button" class="btn btn-outline-secondary btn-sm" data-bs-dismiss="offcanvas">
Cancel
</button>
<button type="button" class="btn btn-outline-success btn-sm" id="btn_task_picker_save" disabled>
Save
</button>
<button type="button" class="btn btn-primary btn-sm" id="btn_task_picker_select" disabled>
Select
</button>
</div>
<div id="task_picker_focus_hint" class="form-text d-none">
Completed tasks can't be added to Focused Tasks.
</div>
</div>
</div>
</div>
...@@ -114,10 +114,11 @@ ...@@ -114,10 +114,11 @@
<VerInfo_Locale>1033</VerInfo_Locale> <VerInfo_Locale>1033</VerInfo_Locale>
<DCC_ExeOutput>.\bin</DCC_ExeOutput> <DCC_ExeOutput>.\bin</DCC_ExeOutput>
<DCC_UnitSearchPath>C:\RADTOOLS\FastMM4;$(DCC_UnitSearchPath)</DCC_UnitSearchPath> <DCC_UnitSearchPath>C:\RADTOOLS\FastMM4;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
<VerInfo_Keys>CompanyName=EM Systems;FileDescription=$(MSBuildProjectName);FileVersion=0.9.4.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=0.9.11;Comments=</VerInfo_Keys> <VerInfo_Keys>CompanyName=EM Systems;FileDescription=$(MSBuildProjectName);FileVersion=0.9.4.1;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=0.9.11;Comments=</VerInfo_Keys>
<VerInfo_MajorVer>0</VerInfo_MajorVer> <VerInfo_MajorVer>0</VerInfo_MajorVer>
<VerInfo_MinorVer>9</VerInfo_MinorVer> <VerInfo_MinorVer>9</VerInfo_MinorVer>
<VerInfo_AutoIncVersion>true</VerInfo_AutoIncVersion> <VerInfo_AutoIncVersion>true</VerInfo_AutoIncVersion>
<VerInfo_Build>1</VerInfo_Build>
<VerInfo_Release>4</VerInfo_Release> <VerInfo_Release>4</VerInfo_Release>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_Win64)'!=''"> <PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment