Commit a72bb77e by Mac Stephens

Merge remote-tracking branch 'origin/cam2'

main code merged in lookupimpl in get corrugated orders
parents 37788721 5b01b1ab
...@@ -3,8 +3,8 @@ object FAddOrder: TFAddOrder ...@@ -3,8 +3,8 @@ object FAddOrder: TFAddOrder
Height = 477 Height = 477
OnShow = WebFormShow OnShow = WebFormShow
object WebLabel1: TWebLabel object WebLabel1: TWebLabel
Left = 278 Left = 334
Top = 44 Top = 56
Width = 35 Width = 35
Height = 15 Height = 15
Caption = 'Search' Caption = 'Search'
...@@ -12,8 +12,8 @@ object FAddOrder: TFAddOrder ...@@ -12,8 +12,8 @@ object FAddOrder: TFAddOrder
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object WebLabel2: TWebLabel object WebLabel2: TWebLabel
Left = 414 Left = 482
Top = 44 Top = 56
Width = 58 Width = 58
Height = 15 Height = 15
Caption = 'Selected ID' Caption = 'Selected ID'
...@@ -21,8 +21,8 @@ object FAddOrder: TFAddOrder ...@@ -21,8 +21,8 @@ object FAddOrder: TFAddOrder
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object edtSearch: TWebEdit object edtSearch: TWebEdit
Left = 278 Left = 334
Top = 62 Top = 82
Width = 121 Width = 121
Height = 22 Height = 22
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
...@@ -30,8 +30,8 @@ object FAddOrder: TFAddOrder ...@@ -30,8 +30,8 @@ object FAddOrder: TFAddOrder
OnChange = edtSearchChange OnChange = edtSearchChange
end end
object edtID: TWebEdit object edtID: TWebEdit
Left = 414 Left = 482
Top = 62 Top = 82
Width = 69 Width = 69
Height = 22 Height = 22
ChildOrder = 1 ChildOrder = 1
...@@ -196,8 +196,8 @@ object FAddOrder: TFAddOrder ...@@ -196,8 +196,8 @@ object FAddOrder: TFAddOrder
DesignTimeSampleData = True DesignTimeSampleData = True
end end
object cbCorrugatedPlate: TWebCheckBox object cbCorrugatedPlate: TWebCheckBox
Left = 26 Left = 4
Top = 63 Top = 83
Width = 113 Width = 113
Height = 22 Height = 22
Caption = 'Corrugated Plate' Caption = 'Corrugated Plate'
...@@ -207,8 +207,8 @@ object FAddOrder: TFAddOrder ...@@ -207,8 +207,8 @@ object FAddOrder: TFAddOrder
OnClick = cbCorrugatedPlateClick OnClick = cbCorrugatedPlateClick
end end
object cbWebPlate: TWebCheckBox object cbWebPlate: TWebCheckBox
Left = 152 Left = 128
Top = 64 Top = 83
Width = 83 Width = 83
Height = 22 Height = 22
Caption = 'Web Plate' Caption = 'Web Plate'
...@@ -218,8 +218,8 @@ object FAddOrder: TFAddOrder ...@@ -218,8 +218,8 @@ object FAddOrder: TFAddOrder
OnClick = cbWebPlateClick OnClick = cbWebPlateClick
end end
object btnCancel: TWebButton object btnCancel: TWebButton
Left = 674 Left = 680
Top = 61 Top = 81
Width = 96 Width = 96
Height = 25 Height = 25
Caption = 'Cancel' Caption = 'Cancel'
...@@ -229,8 +229,8 @@ object FAddOrder: TFAddOrder ...@@ -229,8 +229,8 @@ object FAddOrder: TFAddOrder
OnClick = btnCancelClick OnClick = btnCancelClick
end end
object btnConfirm: TWebButton object btnConfirm: TWebButton
Left = 554 Left = 564
Top = 61 Top = 81
Width = 96 Width = 96
Height = 25 Height = 25
Caption = 'Confirm' Caption = 'Confirm'
...@@ -239,15 +239,48 @@ object FAddOrder: TFAddOrder ...@@ -239,15 +239,48 @@ object FAddOrder: TFAddOrder
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
OnClick = btnConfirmClick OnClick = btnConfirmClick
end end
object cbCuttingDie: TWebCheckBox
Left = 231
Top = 83
Width = 83
Height = 22
Caption = 'Cutting Die'
ChildOrder = 3
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnClick = cbCuttingDieClick
end
object edtNotification: TWebEdit
Left = 4
Top = 16
Width = 510
Height = 22
HelpType = htKeyword
TabStop = False
ChildOrder = 8
ElementClassName = 'form-control'
ElementFont = efCSS
Enabled = False
Font.Charset = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -8
Font.Name = 'Arial'
Font.Style = []
HeightPercent = 100.000000000000000000
HideSelection = False
ParentFont = False
TabOrder = 1
WidthPercent = 100.000000000000000000
end
object XDataWebClient1: TXDataWebClient object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection Connection = DMConnection.ApiConnection
Left = 730 Left = 780
Top = 93 Top = 21
end end
object xdwdsCustomers: TXDataWebDataSet object xdwdsCustomers: TXDataWebDataSet
Connection = DMConnection.ApiConnection Connection = DMConnection.ApiConnection
Left = 600 Left = 726
Top = 95 Top = 7
object xdwdsCustomersID: TIntegerField object xdwdsCustomersID: TIntegerField
FieldName = 'ID' FieldName = 'ID'
end end
...@@ -264,7 +297,7 @@ object FAddOrder: TFAddOrder ...@@ -264,7 +297,7 @@ object FAddOrder: TFAddOrder
end end
object wdsCustomers: TWebDataSource object wdsCustomers: TWebDataSource
DataSet = xdwdsCustomers DataSet = xdwdsCustomers
Left = 468 Left = 660
Top = 93 Top = 1
end end
end end
// Pop-Up menu that appears when Add Order button is clicked on orders page.
// Used to select customer before entering an order.
unit View.AddOrder; unit View.AddOrder;
interface interface
...@@ -29,6 +31,8 @@ type ...@@ -29,6 +31,8 @@ type
xdwdsCustomersSHORT_NAME: TStringField; xdwdsCustomersSHORT_NAME: TStringField;
wdsCustomers: TWebDataSource; wdsCustomers: TWebDataSource;
xdwdsCustomersADDRESS: TStringField; xdwdsCustomersADDRESS: TStringField;
cbCuttingDie: TWebCheckBox;
edtNotification: TWebEdit;
procedure WebFormShow(Sender: TObject); procedure WebFormShow(Sender: TObject);
procedure TMSFNCGrid1SelectedCell(Sender: TObject; ACol, ARow: Integer); procedure TMSFNCGrid1SelectedCell(Sender: TObject; ACol, ARow: Integer);
procedure edtSearchChange(Sender: TObject); procedure edtSearchChange(Sender: TObject);
...@@ -36,6 +40,7 @@ type ...@@ -36,6 +40,7 @@ type
procedure cbWebPlateClick(Sender: TObject); procedure cbWebPlateClick(Sender: TObject);
procedure btnConfirmClick(Sender: TObject); procedure btnConfirmClick(Sender: TObject);
procedure btnCancelClick(Sender: TObject); procedure btnCancelClick(Sender: TObject);
procedure cbCuttingDieClick(Sender: TObject);
private private
[async] procedure getCustomers; [async] procedure getCustomers;
procedure PopulateGridManually; procedure PopulateGridManually;
...@@ -56,14 +61,20 @@ implementation ...@@ -56,14 +61,20 @@ implementation
procedure TFAddOrder.btnCancelClick(Sender: TObject); procedure TFAddOrder.btnCancelClick(Sender: TObject);
begin begin
edtID.Text := '';
Close; Close;
end; end;
procedure TFAddOrder.btnConfirmClick(Sender: TObject); procedure TFAddOrder.btnConfirmClick(Sender: TObject);
begin begin
confirm := true; if ( ( not cbCorrugatedPlate.Checked ) and ( not cbWebPlate.Checked ) and ( not cbCuttingDie.Checked ) ) then
Close; edtNotification.Text := 'Please Select an Order Type'
else if edtID.Text = '' then
edtNotification.Text := 'Please Select a Customer'
else
begin
confirm := true;
Close;
end;
end; end;
procedure TFAddOrder.WebFormShow(Sender: TObject); procedure TFAddOrder.WebFormShow(Sender: TObject);
...@@ -75,12 +86,20 @@ end; ...@@ -75,12 +86,20 @@ end;
procedure TFAddOrder.cbCorrugatedPlateClick(Sender: TObject); procedure TFAddOrder.cbCorrugatedPlateClick(Sender: TObject);
begin begin
cbWebPlate.Checked := False; cbWebPlate.Checked := False;
cbCuttingDie.Checked := False;
end;
procedure TFAddOrder.cbCuttingDieClick(Sender: TObject);
begin
cbCorrugatedPlate.Checked := False;
cbWebPlate.Checked := False;
end; end;
procedure TFAddOrder.cbWebPlateClick(Sender: TObject); procedure TFAddOrder.cbWebPlateClick(Sender: TObject);
begin begin
cbCorrugatedPlate.Checked := False; cbCorrugatedPlate.Checked := False;
cbCuttingDie.Checked := False;
end; end;
procedure TFAddOrder.edtSearchChange(Sender: TObject); procedure TFAddOrder.edtSearchChange(Sender: TObject);
...@@ -89,6 +108,7 @@ begin ...@@ -89,6 +108,7 @@ begin
end; end;
[async] procedure TFAddOrder.getCustomers(); [async] procedure TFAddOrder.getCustomers();
// retrieves customer list from server
var var
xdcResponse: TXDataClientResponse; xdcResponse: TXDataClientResponse;
customerList: TJSObject; customerList: TJSObject;
...@@ -107,6 +127,7 @@ begin ...@@ -107,6 +127,7 @@ begin
end; end;
procedure TFAddOrder.PopulateGridManually; procedure TFAddOrder.PopulateGridManually;
// populates the grid with customers manually.
var var
RowIndex: Integer; RowIndex: Integer;
begin begin
...@@ -122,10 +143,6 @@ begin ...@@ -122,10 +143,6 @@ begin
TMSFNCGrid1.Cells[2, 0] := 'Name'; TMSFNCGrid1.Cells[2, 0] := 'Name';
TMSFNCGrid1.Cells[3, 0] := 'Address'; TMSFNCGrid1.Cells[3, 0] := 'Address';
// TMSFNCGrid1.ColumnWidths[0] := 40;
// TMSFNCGrid1.ColumnWidths[1] := 80;
// TMSFNCGrid1.ColumnWidths[2] := 250;
// Populate the grid with data from the dataset // Populate the grid with data from the dataset
xdwdsCustomers.First; xdwdsCustomers.First;
RowIndex := 1; RowIndex := 1;
...@@ -152,11 +169,13 @@ end; ...@@ -152,11 +169,13 @@ end;
procedure TFAddOrder.TMSFNCGrid1SelectedCell(Sender: TObject; ACol, procedure TFAddOrder.TMSFNCGrid1SelectedCell(Sender: TObject; ACol,
ARow: Integer); ARow: Integer);
// When a cell is clicked it puts the ID in the text box
begin begin
edtID.Text := TMSFNCGrid1.Cells[0, ARow]; edtID.Text := TMSFNCGrid1.Cells[0, ARow];
end; end;
procedure TFAddOrder.ApplyFilter; procedure TFAddOrder.ApplyFilter;
// filters the grid based on search textbox contents.
var var
fd: TTMSFNCGridFilterData; fd: TTMSFNCGridFilterData;
i: Integer; i: Integer;
......
...@@ -26,7 +26,6 @@ type ...@@ -26,7 +26,6 @@ type
cbStatus: TWebCheckBox; cbStatus: TWebCheckBox;
procedure WebFormCreate(Sender: TObject); procedure WebFormCreate(Sender: TObject);
procedure btnApplyClick(Sender: TObject); procedure btnApplyClick(Sender: TObject);
procedure btnSearchClick(Sender: TObject);
procedure wcbPageSizeChange(Sender: TObject); procedure wcbPageSizeChange(Sender: TObject);
private private
FChildForm: TWebForm; FChildForm: TWebForm;
...@@ -34,7 +33,6 @@ type ...@@ -34,7 +33,6 @@ type
procedure ClearTable(); procedure ClearTable();
procedure GeneratePagination(TotalPages: Integer); procedure GeneratePagination(TotalPages: Integer);
function GenerateSearchOptions(): string; function GenerateSearchOptions(): string;
[async] procedure Search(searchOptions: string);
[async] procedure GetItems(searchOptions: string); [async] procedure GetItems(searchOptions: string);
[async] procedure getUser(); [async] procedure getUser();
[async] procedure AddItem(itemOptions: string); [async] procedure AddItem(itemOptions: string);
...@@ -86,11 +84,10 @@ end; ...@@ -86,11 +84,10 @@ end;
procedure TFViewItems.AddRowToTable(ID, Name, Description, Status: string); procedure TFViewItems.AddRowToTable(ID, Name, Description, Status: string);
// Adds rows to the table // Adds rows to the table
// PhoneNumber: phone number of the location // ID: item ID
// Caller: phone number of the caller // Name: item name
// Duration: duration of the call // Description: item description
// Transcript: transcription of the recording // Status: inactive or active
// MediaUrl: Link to the recording
var var
NewRow, Cell, P, Button, Audio: TJSHTMLElement; NewRow, Cell, P, Button, Audio: TJSHTMLElement;
begin begin
...@@ -293,6 +290,9 @@ begin ...@@ -293,6 +290,9 @@ begin
end; end;
procedure TFViewItems.GetItems(searchOptions: string); procedure TFViewItems.GetItems(searchOptions: string);
// retrieves items from the server.
// searchOptions: info to limit how many items we retrieve from the server.
// probably not needed due to database size.
var var
xdcResponse: TXDataClientResponse; xdcResponse: TXDataClientResponse;
itemList : TJSObject; itemList : TJSObject;
...@@ -355,6 +355,7 @@ begin ...@@ -355,6 +355,7 @@ begin
end; end;
procedure TFViewItems.AddItem(itemOptions: string); procedure TFViewItems.AddItem(itemOptions: string);
// adds an item to the database.
var var
xdcResponse: TXDataClientResponse; xdcResponse: TXDataClientResponse;
begin begin
...@@ -363,48 +364,13 @@ begin ...@@ -363,48 +364,13 @@ begin
getItems(GenerateSearchOptions()); getItems(GenerateSearchOptions());
end; end;
procedure TFViewItems.Search(searchOptions: string);
// Search method that searches the database for a specific phone number
var
xdcResponse: TXDataClientResponse;
callList : TJSObject;
i: integer;
data: TJSArray;
call: TJSObject;
callListLength: integer;
begin
{if PageNumber > 0 then
begin
xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.Search',
[searchOptions]));
callList := TJSObject(xdcResponse.Result);
data := TJSArray(callList['data']);
callListLength := integer(callList['count']);
ClearTable();
for i := 0 to data.Length - 1 do
begin
call := TJSObject(data[i]);
AddRowToTable(string(call['toNumber']), string(call['fromNumber']), string(call['dateCreated']),
string(call['duration']), string(call['transcription']), string(call['mediaUrl']));
end;
TotalPages := (callListLength + PageSize - 1) div PageSize;
lblEntries.Caption := 'Showing entries for phone number: ' + searchOptions;
end; }
end;
procedure TFViewItems.wcbPageSizeChange(Sender: TObject); procedure TFViewItems.wcbPageSizeChange(Sender: TObject);
// gets a new amount of items based when the page size is changed
begin begin
PageNumber := 1; PageNumber := 1;
getItems(GenerateSearchOptions()); getItems(GenerateSearchOptions());
end; end;
procedure TFViewItems.btnSearchClick(Sender: TObject);
// item Search method
begin
//Search(edtSearch.Text);
end;
procedure TFViewItems.ClearTable(); procedure TFViewItems.ClearTable();
// clears the table // clears the table
var var
......
...@@ -51,7 +51,9 @@ type ...@@ -51,7 +51,9 @@ type
procedure ShowForm( AFormClass: TWebFormClass ); procedure ShowForm( AFormClass: TWebFormClass );
procedure EditUser( Mode, Username, Password, Name, Status, Email, procedure EditUser( Mode, Username, Password, Name, Status, Email,
Access, Rights, Perspective, QB: string); Access, Rights, Perspective, QB: string);
procedure ViewOrderEntry(orderInfo, customerInfo, mode: string); procedure ViewOrderEntryCorrugated(orderInfo, customerInfo, mode: string);
procedure ViewOrderEntryWeb(orderInfo, customerInfo, mode: string);
procedure ViewOrderEntryCuttingDie(orderInfo, customerInfo, mode: string);
procedure ViewOrders(info: string); procedure ViewOrders(info: string);
procedure ShowUserForm(Info: string); procedure ShowUserForm(Info: string);
end; end;
...@@ -70,7 +72,9 @@ uses ...@@ -70,7 +72,9 @@ uses
View.Users, View.Users,
View.EditUser, View.EditUser,
View.Orders, View.Orders,
View.OrderEntryCorrugated; View.OrderEntryCorrugated,
View.OrderEntryCuttingDie,
View.OrderEntryWeb;
{$R *.dfm} {$R *.dfm}
...@@ -227,12 +231,28 @@ begin ...@@ -227,12 +231,28 @@ begin
end; end;
procedure TFViewMain.ViewOrderEntry(orderInfo, customerInfo, mode: string); procedure TFViewMain.ViewOrderEntryCorrugated(orderInfo, customerInfo, mode: string);
begin begin
lblAppTitle.Caption := 'Koehler-Gibson Order Entry'; lblAppTitle.Caption := 'Koehler-Gibson Order Entry';
if Assigned(FChildForm) then if Assigned(FChildForm) then
FChildForm.Free; FChildForm.Free;
FChildForm := TFOrderEntry.CreateForm(WebPanel1.ElementID, orderInfo, customerInfo, mode); FChildForm := TFOrderEntryCorrugated.CreateForm(WebPanel1.ElementID, orderInfo, customerInfo, mode);
end;
procedure TFViewMain.ViewOrderEntryWeb(orderInfo, customerInfo, mode: string);
begin
lblAppTitle.Caption := 'Koehler-Gibson Order Entry';
if Assigned(FChildForm) then
FChildForm.Free;
FChildForm := TFOrderEntryWeb.CreateForm(WebPanel1.ElementID, orderInfo, customerInfo, mode);
end;
procedure TFViewMain.ViewOrderEntryCuttingDie(orderInfo, customerInfo, mode: string);
begin
lblAppTitle.Caption := 'Koehler-Gibson Order Entry';
if Assigned(FChildForm) then
FChildForm.Free;
FChildForm := TFOrderEntryCuttingDie.CreateForm(WebPanel1.ElementID, orderInfo, customerInfo, mode);
end; end;
procedure TFViewMain.ShowUserForm(Info: string); procedure TFViewMain.ShowUserForm(Info: string);
......
object FOrderEntry: TFOrderEntry object FOrderEntryCorrugated: TFOrderEntryCorrugated
Width = 1018 Width = 1018
Height = 764 Height = 764
Font.Charset = ANSI_CHARSET Font.Charset = ANSI_CHARSET
...@@ -354,19 +354,6 @@ object FOrderEntry: TFOrderEntry ...@@ -354,19 +354,6 @@ object FOrderEntry: TFOrderEntry
DataField = 'staff_fields_job_name' DataField = 'staff_fields_job_name'
DataSource = WebDataSource1 DataSource = WebDataSource1
end end
object edtQuickBooksItem: TWebDBEdit
Left = 26
Top = 514
Width = 121
Height = 22
AutoSize = True
ChildOrder = 79
ElementID = 'edtquickbooksitem'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'staff_fields_quickbooks_item'
DataSource = WebDataSource1
end
object edtOther: TWebDBEdit object edtOther: TWebDBEdit
Left = 316 Left = 316
Top = 348 Top = 348
...@@ -692,32 +679,6 @@ object FOrderEntry: TFOrderEntry ...@@ -692,32 +679,6 @@ object FOrderEntry: TFOrderEntry
DataField = 'plates_job_number' DataField = 'plates_job_number'
DataSource = WebDataSource1 DataSource = WebDataSource1
end end
object edtPlateMaterial: TWebDBEdit
Left = 852
Top = 72
Width = 121
Height = 22
AutoSize = True
ChildOrder = 79
ElementID = 'edtplatematerial'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'plates_plate_material'
DataSource = WebDataSource1
end
object edtThickness: TWebDBEdit
Left = 852
Top = 39
Width = 121
Height = 22
AutoSize = True
ChildOrder = 79
ElementID = 'edtThickness'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'plates_thickness'
DataSource = WebDataSource1
end
object cbArtApprovedAsIs: TWebDBCheckBox object cbArtApprovedAsIs: TWebDBCheckBox
Left = 662 Left = 662
Top = 480 Top = 480
...@@ -797,8 +758,8 @@ object FOrderEntry: TFOrderEntry ...@@ -797,8 +758,8 @@ object FOrderEntry: TFOrderEntry
DataSource = WebDataSource1 DataSource = WebDataSource1
end end
object btnConfirm: TWebButton object btnConfirm: TWebButton
Left = 752 Left = 652
Top = 558 Top = 560
Width = 96 Width = 96
Height = 25 Height = 25
Caption = 'Confirm' Caption = 'Confirm'
...@@ -965,10 +926,80 @@ object FOrderEntry: TFOrderEntry ...@@ -965,10 +926,80 @@ object FOrderEntry: TFOrderEntry
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object btnEdit: TWebButton
Left = 870
Top = 560
Width = 96
Height = 25
Caption = 'Edit'
ChildOrder = 79
ElementID = 'btnedit'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object btnCancel: TWebButton
Left = 764
Top = 560
Width = 96
Height = 25
Caption = 'Cancel'
ChildOrder = 79
ElementID = 'btncancel'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnClick = btnCancelClick
end
object WebDBComboBox2: TWebDBComboBox
Left = 26
Top = 515
Width = 145
Height = 22
ElementID = 'wcbqbitem'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
ItemIndex = -1
DataField = 'staff_fields_quickbooks_item'
DataSource = WebDataSource1
ListField = 'name'
ListSource = wdsQBItem
end
object WebDBComboBox3: TWebDBComboBox
Left = 833
Top = 77
Width = 145
Height = 22
ElementID = 'wcbmaterial'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
ItemIndex = -1
Items.Strings = (
'PhotoPolymer'
'Rubber')
DataField = 'plates_plate_material'
DataSource = WebDataSource1
end
object WebDBComboBox4: TWebDBComboBox
Left = 833
Top = 48
Width = 145
Height = 22
ElementID = 'wcbthickness'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
ItemIndex = -1
Items.Strings = (
'.250'
'.155'
'.107'
'.067'
'.045')
DataField = 'plates_thickness'
DataSource = WebDataSource1
end
object XDataWebClient1: TXDataWebClient object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection Connection = DMConnection.ApiConnection
Left = 244 Left = 160
Top = 44 Top = 18
end end
object tmrScrollTop: TWebTimer object tmrScrollTop: TWebTimer
Interval = 100 Interval = 100
...@@ -978,8 +1009,8 @@ object FOrderEntry: TFOrderEntry ...@@ -978,8 +1009,8 @@ object FOrderEntry: TFOrderEntry
end end
object XDataWebDataSet1: TXDataWebDataSet object XDataWebDataSet1: TXDataWebDataSet
Connection = DMConnection.ApiConnection Connection = DMConnection.ApiConnection
Left = 324 Left = 90
Top = 104 Top = 20
object XDataWebDataSet1ORDER_ID: TIntegerField object XDataWebDataSet1ORDER_ID: TIntegerField
FieldName = 'ORDER_ID' FieldName = 'ORDER_ID'
end end
...@@ -1256,8 +1287,8 @@ object FOrderEntry: TFOrderEntry ...@@ -1256,8 +1287,8 @@ object FOrderEntry: TFOrderEntry
end end
object WebDataSource1: TWebDataSource object WebDataSource1: TWebDataSource
DataSet = XDataWebDataSet1 DataSet = XDataWebDataSet1
Left = 216 Left = 22
Top = 104 Top = 10
end end
object wdsShipTo: TWebDataSource object wdsShipTo: TWebDataSource
DataSet = xdwdsShipTo DataSet = xdwdsShipTo
...@@ -1265,10 +1296,22 @@ object FOrderEntry: TFOrderEntry ...@@ -1265,10 +1296,22 @@ object FOrderEntry: TFOrderEntry
Top = 436 Top = 436
end end
object xdwdsShipTo: TXDataWebDataSet object xdwdsShipTo: TXDataWebDataSet
Left = 192 Left = 202
Top = 486 Top = 416
object xdwdsShipToADDRESS: TStringField object xdwdsShipToADDRESS: TStringField
FieldName = 'ADDRESS' FieldName = 'ADDRESS'
end end
end end
object wdsQBItem: TWebDataSource
DataSet = xdwdsQBItem
Left = 240
Top = 518
end
object xdwdsQBItem: TXDataWebDataSet
Left = 200
Top = 512
object xdwdsQBItemname: TStringField
FieldName = 'name'
end
end
end end
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">QuickBooks Item:</label> <label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">QuickBooks Item:</label>
<input id="edtquickbooksitem" class="form-control input-sm" width='50%'/> <select id="wcbqbitem" class='form-select'></select>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Art Due:</label> <label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Art Due:</label>
...@@ -278,15 +278,15 @@ ...@@ -278,15 +278,15 @@
<hr class="custom-hr"> <hr class="custom-hr">
<div class="row"> <div class="row">
<div class="col-auto"> <div class="col-auto">
<label class='pe-2' style="font-weight: 700; font-size: 15px;" id="lblthickness">Thickness:</label> <label style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Thickness:</label>
<input id="edtThickness" class="form-control input-sm" style="width: 150px"/> <select id="wcbthickness" class='form-select'></select>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<label class='pe-2' style="font-weight: 700; font-size: 15px;" id="lblplatematerial">Plate Material:</label> <label style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Plate Material:</label>
<input id="edtplatematerial" class="form-control input-sm" style="width: 150px"/> <select id="wcbmaterial" class='form-select'></select>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<label class='pe-2' style="font-weight: 700; font-size: 15px;" id="lbljobnumber">Job Number:</label> <label class="form-label mt-2" style="font-weight: 700; font-size: 15px;" id="lbljobnumber">Job Number:</label>
<input id="edtjobnumber" class="form-control input-sm" style="width: 150px"/> <input id="edtjobnumber" class="form-control input-sm" style="width: 150px"/>
</div> </div>
</div> </div>
...@@ -300,7 +300,13 @@ ...@@ -300,7 +300,13 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-auto"> <div class="col-auto">
<button id="btnconfirm" class="btn btn-primary btn-sm float-end">Confirm</button> <button id="btnconfirm" class="btn btn-primary btn-sm float-end my-2">Confirm</button>
</div>
<div class="col-auto">
<button id="btncancel" class="btn btn-primary btn-sm float-end my-2">Cancel</button>
</div>
<div class="col-auto">
<button id="btnedit" class="btn btn-primary btn-sm float-end my-2">Edit</button>
</div> </div>
</div> </div>
</div> </div>
......
// Order Entry page of Corruguated Orders. Used for both editting and adding
// orders.
unit View.OrderEntryCorrugated; unit View.OrderEntryCorrugated;
interface interface
...@@ -10,7 +12,7 @@ uses ...@@ -10,7 +12,7 @@ uses
Data.DB, XData.Web.JsonDataset, XData.Web.Dataset, WEBLib.DB; Data.DB, XData.Web.JsonDataset, XData.Web.Dataset, WEBLib.DB;
type type
TFOrderEntry = class(TWebForm) TFOrderEntryCorrugated = class(TWebForm)
pnlMessage: TWebPanel; pnlMessage: TWebPanel;
lblMessage: TWebLabel; lblMessage: TWebLabel;
btnCloseNotification: TWebButton; btnCloseNotification: TWebButton;
...@@ -40,7 +42,6 @@ type ...@@ -40,7 +42,6 @@ type
edtInvoiceTo: TWebDBEdit; edtInvoiceTo: TWebDBEdit;
edtPONumber: TWebDBEdit; edtPONumber: TWebDBEdit;
edtJobName: TWebDBEdit; edtJobName: TWebDBEdit;
edtQuickBooksItem: TWebDBEdit;
edtOther: TWebDBEdit; edtOther: TWebDBEdit;
edtCADFile: TWebDBEdit; edtCADFile: TWebDBEdit;
edtAroundNo: TWebDBEdit; edtAroundNo: TWebDBEdit;
...@@ -66,8 +67,6 @@ type ...@@ -66,8 +67,6 @@ type
edtMachineIndent: TWebDBEdit; edtMachineIndent: TWebDBEdit;
edtCylinderSize: TWebDBEdit; edtCylinderSize: TWebDBEdit;
edtJobNumber: TWebDBEdit; edtJobNumber: TWebDBEdit;
edtPlateMaterial: TWebDBEdit;
edtThickness: TWebDBEdit;
cbArtApprovedAsIs: TWebDBCheckBox; cbArtApprovedAsIs: TWebDBCheckBox;
cbPDFFile: TWebDBCheckBox; cbPDFFile: TWebDBCheckBox;
cbWideFormat: TWebDBCheckBox; cbWideFormat: TWebDBCheckBox;
...@@ -187,6 +186,14 @@ type ...@@ -187,6 +186,14 @@ type
WebDBComboBox1: TWebDBComboBox; WebDBComboBox1: TWebDBComboBox;
cbEmail: TWebCheckBox; cbEmail: TWebCheckBox;
XDataWebDataSet1supplied_by_customer_order_date: TStringField; XDataWebDataSet1supplied_by_customer_order_date: TStringField;
btnEdit: TWebButton;
btnCancel: TWebButton;
WebDBComboBox2: TWebDBComboBox;
wdsQBItem: TWebDataSource;
xdwdsQBItem: TXDataWebDataSet;
xdwdsQBItemname: TStringField;
WebDBComboBox3: TWebDBComboBox;
WebDBComboBox4: TWebDBComboBox;
procedure WebFormCreate(Sender: TObject); procedure WebFormCreate(Sender: TObject);
procedure HideNotification(); procedure HideNotification();
procedure ShowNotification(Notification: string); procedure ShowNotification(Notification: string);
...@@ -198,6 +205,7 @@ type ...@@ -198,6 +205,7 @@ type
procedure addColorRow(num, Color, LPI, Size: string); procedure addColorRow(num, Color, LPI, Size: string);
procedure btnConfirmClick(Sender: TObject); procedure btnConfirmClick(Sender: TObject);
[async] procedure AddCorrugatedOrder(orderJSON: TJSONObject); [async] procedure AddCorrugatedOrder(orderJSON: TJSONObject);
procedure btnCancelClick(Sender: TObject);
private private
FAgencyCode: string; FAgencyCode: string;
FCurrentReportType: string; FCurrentReportType: string;
...@@ -211,7 +219,7 @@ type ...@@ -211,7 +219,7 @@ type
end; end;
var var
FOrderEntry: TFOrderEntry; FOrderEntryCorrugated: TFOrderEntryCorrugated;
implementation implementation
...@@ -220,7 +228,8 @@ implementation ...@@ -220,7 +228,8 @@ implementation
uses uses
View.Home, View.Main; View.Home, View.Main;
procedure TFOrderEntry.btnConfirmClick(Sender: TObject); procedure TFOrderEntryCorrugated.btnConfirmClick(Sender: TObject);
// Converts all the information on the page into a JSON to then send to the server
var var
colorList: TJSONArray; colorList: TJSONArray;
container: TJSElement; container: TJSElement;
...@@ -263,8 +272,8 @@ begin ...@@ -263,8 +272,8 @@ begin
XDataWebDataSet1staff_fields_art_due.Value := DateTimeToStr(dtpArtDue.Date); XDataWebDataSet1staff_fields_art_due.Value := DateTimeToStr(dtpArtDue.Date);
XDataWebDataSet1staff_fields_mount_due.Value := DateTimeToStr(dtpMountDue.Date); XDataWebDataSet1staff_fields_mount_due.Value := DateTimeToStr(dtpMountDue.Date);
XDataWebDataSet1staff_fields_plate_due.Value := DateTimeToStr(dtpPlateDue.Date); XDataWebDataSet1staff_fields_plate_due.Value := DateTimeToStr(dtpPlateDue.Date);
XDataWebDataSet1supplied_by_customer_order_date.Value := DateTimeToStr(dtpOrderDate.Date); XDataWebDataSet1staff_fields_order_date.Value := DateTimeToStr(dtpOrderDate.Date);
XDataWebDataSet1proofing_approved_date.Value := DateTimeToStr(dtpOrderDate.Date); XDataWebDataSet1proofing_approved_date.Value := DateTimeToStr(dtpApprovedDate.Date);
// Convert all check boxes to strings because the database stores them as strings // Convert all check boxes to strings because the database stores them as strings
if cbFTP.Checked then if cbFTP.Checked then
...@@ -349,15 +358,16 @@ begin ...@@ -349,15 +358,16 @@ begin
XDataWebDataSet1.Next; XDataWebDataSet1.Next;
end; end;
orderJSON.AddPair('COMPANY_ID', customerID); orderJSON.AddPair('COMPANY_ID', customerID);
orderJSON.AddPair('USER_ID', '1011'); orderJSON.AddPair('USER_ID', JS.toString(AuthService.TokenPayload.Properties['user_id']));
orderJSON.AddPair('mode', mode); orderJSON.AddPair('mode', mode);
if mode = 'EDIT' then if mode = 'EDIT' then
orderJSON.AddPair('ORDER_ID', orderID); orderJSON.AddPair('ORDER_ID', orderID);
AddCorrugatedOrder(orderJSON); AddCorrugatedOrder(orderJSON);
FViewMain.ViewOrders('Success'); FViewMain.ViewOrders('Success:Order Successfully Added');
end; end;
procedure TFOrderEntry.AddCorrugatedOrder(orderJSON: TJSONObject); procedure TFOrderEntryCorrugated.AddCorrugatedOrder(orderJSON: TJSONObject);
// sends the order JSON object to the server
var var
Response: TXDataClientResponse; Response: TXDataClientResponse;
begin begin
...@@ -365,27 +375,30 @@ begin ...@@ -365,27 +375,30 @@ begin
[orderJSON.ToString])); [orderJSON.ToString]));
end; end;
class function TFOrderEntry.CreateForm(AElementID, orderInfo, customerInfo, mode: string): TWebForm; class function TFOrderEntryCorrugated.CreateForm(AElementID, orderInfo, customerInfo, mode: string): TWebForm;
var var
localMode: string; localMode: string;
begin begin
localMode := mode; localMode := mode;
Application.CreateForm(TFOrderEntry, AElementID, Result, Application.CreateForm(TFOrderEntryCorrugated, AElementID, Result,
procedure(AForm: TObject) procedure(AForm: TObject)
begin begin
with TFOrderEntry(AForm) do with TFOrderEntryCorrugated(AForm) do
begin begin
HideNotification; HideNotification;
TFOrderEntry(AForm).customerID := customerInfo; TFOrderEntryCorrugated(AForm).customerID := customerInfo;
TFOrderEntry(AForm).orderID := orderInfo; TFOrderEntryCorrugated(AForm).orderID := orderInfo;
TFOrderEntry(AForm).mode := localMode; TFOrderEntryCorrugated(AForm).mode := localMode;
end; end;
end end
); );
end; end;
procedure TFOrderEntry.addColorRow(num: string; Color: string; LPI: string; Size: string); procedure TFOrderEntryCorrugated.addColorRow(num: string; Color: string; LPI: string; Size: string);
// Java script code to add a row of colors when a button is clicked
// all variables are information to be placed in the boxes when loading an order.
// TODO: convert to Delphi
begin begin
asm asm
const container = document.getElementById('additionalFields'); const container = document.getElementById('additionalFields');
...@@ -435,12 +448,17 @@ begin ...@@ -435,12 +448,17 @@ begin
end; end;
end; end;
procedure TFOrderEntry.WebButton1Click(Sender: TObject); procedure TFOrderEntryCorrugated.WebButton1Click(Sender: TObject);
begin begin
addColorRow('','','',''); addColorRow('','','','');
end; end;
procedure TFOrderEntry.WebFormCreate(Sender: TObject); procedure TFOrderEntryCorrugated.btnCancelClick(Sender: TObject);
begin
FViewMain.ViewOrders('');
end;
procedure TFOrderEntryCorrugated.WebFormCreate(Sender: TObject);
begin begin
if not DMConnection.ApiConnection.Connected then if not DMConnection.ApiConnection.Connected then
begin begin
...@@ -449,7 +467,8 @@ begin ...@@ -449,7 +467,8 @@ begin
end; end;
end; end;
procedure TFOrderEntry.getOrder(Order_ID: string); procedure TFOrderEntryCorrugated.getOrder(Order_ID: string);
// retrieves an order from the server then loads the info into the page
var var
xdcResponse: TXDataClientResponse; xdcResponse: TXDataClientResponse;
orderList : TJSObject; orderList : TJSObject;
...@@ -464,6 +483,7 @@ var ...@@ -464,6 +483,7 @@ var
color: TJSObject; color: TJSObject;
colorJSON: TJSONObject; colorJSON: TJSONObject;
colorListJSON: TJSONArray; colorListJSON: TJSONArray;
items: TJSObject;
begin begin
xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GetOrder', xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GetOrder',
[Order_ID])); [Order_ID]));
...@@ -534,13 +554,9 @@ begin ...@@ -534,13 +554,9 @@ begin
else else
cbColorCopy.checked := false; cbColorCopy.checked := false;
console.log(XDataWebDataSet1supplied_by_customer_ftp.AsString);
if XDataWebDataSet1supplied_by_customer_ftp.AsString <> '' then if XDataWebDataSet1supplied_by_customer_ftp.AsString <> '' then
begin begin
console.log('hit');
cbFTP.Checked := true; cbFTP.Checked := true;
console.log(cbFTP.Checked);
end end
else else
cbFTP.Checked := false; cbFTP.Checked := false;
...@@ -589,11 +605,23 @@ begin ...@@ -589,11 +605,23 @@ begin
else else
cbStripMount.Checked := false; cbStripMount.Checked := false;
if mode = 'EDIT' then
begin
CustomerID := XDataWebDataSet1COMPANY_ID.AsString;
xdwdsShipTo.Close;
xdwdsShipTo.SetJSONData(order['ADDRESS_LIST']);
xdwdsShipTo.Open;
end;
xdwdsQBItem.Close;
items := TJSObject(order['ITEMS']);
xdwdsQBItem.SetJsonData(items['data']);
xdwdsQBITEM.Open;
end; end;
procedure TFOrderEntry.getCustomer(customerID: string); procedure TFOrderEntryCorrugated.getCustomer(customerID: string);
// gets a customer from the database then loads the appropiate fields
var var
xdcResponse: TXDataClientResponse; xdcResponse: TXDataClientResponse;
customer : TJSObject; customer : TJSObject;
...@@ -606,13 +634,15 @@ begin ...@@ -606,13 +634,15 @@ begin
XDataWebDataSet1.SetJsonData(customer); XDataWebDataSet1.SetJsonData(customer);
XDataWebDataSet1.Open; XDataWebDataSet1.Open;
xdwdsShipTo.Close; xdwdsShipTo.Close;
xdwdsShipTo.SetJSONData(customer['ADDRESS_LIST']); xdwdsShipTo.SetJSONData(customer['ADDRESS_LIST']);
xdwdsShipTo.Open; xdwdsShipTo.Open;
end; end;
procedure TFOrderEntry.WebFormShow(Sender: TObject); procedure TFOrderEntryCorrugated.WebFormShow(Sender: TObject);
begin begin
if mode <> 'ADD' then if mode <> 'ADD' then
getOrder(orderID) getOrder(orderID)
...@@ -621,12 +651,12 @@ begin ...@@ -621,12 +651,12 @@ begin
HideNotification(); HideNotification();
end; end;
procedure TFOrderEntry.HideNotification; procedure TFOrderEntryCorrugated.HideNotification;
begin begin
pnlMessage.ElementHandle.hidden := True; pnlMessage.ElementHandle.hidden := True;
end; end;
procedure TFOrderEntry.ShowNotification(Notification: string); procedure TFOrderEntryCorrugated.ShowNotification(Notification: string);
begin begin
if Notification <> '' then if Notification <> '' then
begin begin
...@@ -636,14 +666,14 @@ begin ...@@ -636,14 +666,14 @@ begin
end; end;
procedure TFOrderEntry.tmrScrollTopTimer(Sender: TObject); procedure TFOrderEntryCorrugated.tmrScrollTopTimer(Sender: TObject);
begin begin
tmrScrollTop.Enabled := False; tmrScrollTop.Enabled := False;
window.scrollTo(0, 0); window.scrollTo(0, 0);
end; end;
initialization initialization
RegisterClass(TFOrderEntry); RegisterClass(TFOrderEntryCorrugated);
end. end.
object FOrderEntryCuttingDie: TFOrderEntryCuttingDie
Width = 956
Height = 728
OnShow = WebFormShow
object WebLabel2: TWebLabel
Left = 26
Top = 72
Width = 52
Height = 15
Caption = 'Company'
HeightPercent = 100.000000000000000000
Visible = False
WidthPercent = 100.000000000000000000
end
object WebLabel1: TWebLabel
Left = 34
Top = 188
Width = 57
Height = 15
Caption = 'Staff Fields'
HeightPercent = 100.000000000000000000
Visible = False
WidthPercent = 100.000000000000000000
end
object WebLabel9: TWebLabel
Left = 862
Top = 147
Width = 40
Height = 15
Caption = 'General'
HeightPercent = 100.000000000000000000
Visible = False
WidthPercent = 100.000000000000000000
end
object edtCompanyAccountName: TWebDBEdit
Left = 24
Top = 120
Width = 121
Height = 23
AutoSize = True
ChildOrder = 79
ElementID = 'edtaccountcompanyname'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'SHORT_NAME'
DataSource = WebDataSource1
end
object edtInQuickBooks: TWebDBEdit
Left = 26
Top = 148
Width = 121
Height = 23
AutoSize = True
ChildOrder = 79
ElementID = 'edtinquickbooks'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'inQuickBooks'
DataSource = WebDataSource1
end
object dtpOrderDate: TWebDateTimePicker
Left = 22
Top = 218
Width = 170
Height = 22
ElementID = 'dtporderdate'
BorderStyle = bsSingle
ChildOrder = 4
Color = clWhite
Date = 45638.529943136570000000
Role = ''
Text = ''
end
object dtpProofDate: TWebDateTimePicker
Left = 22
Top = 250
Width = 170
Height = 22
ElementID = 'dtpproofdate'
BorderStyle = bsSingle
ChildOrder = 4
Color = clWhite
Date = 45638.529943136570000000
Role = ''
Text = ''
end
object dtpShipDate: TWebDateTimePicker
Left = 22
Top = 282
Width = 170
Height = 22
ElementID = 'dtpshipdate'
BorderStyle = bsSingle
ChildOrder = 4
Color = clWhite
Date = 45638.529943136570000000
Role = ''
Text = ''
end
object edtShipVia: TWebDBEdit
Left = 24
Top = 314
Width = 121
Height = 23
AutoSize = True
ChildOrder = 79
ElementID = 'edtshipvia'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'staff_fields_ship_via'
DataSource = WebDataSource1
end
object edtQuantity: TWebDBEdit
Left = 24
Top = 346
Width = 121
Height = 23
AutoSize = True
ChildOrder = 79
ElementID = 'edtquantity'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'staff_fields_quantity'
DataSource = WebDataSource1
end
object edtPrice: TWebDBEdit
Left = 24
Top = 374
Width = 121
Height = 22
ChildOrder = 79
ElementID = 'edtprice'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'staff_fields_price'
DataSource = WebDataSource1
end
object edtInvoiceTo: TWebDBEdit
Left = 26
Top = 402
Width = 121
Height = 23
AutoSize = True
ChildOrder = 79
ElementID = 'edtinvoiceto'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'staff_fields_invoice_to'
DataSource = WebDataSource1
end
object wdbcbShipTo: TWebDBComboBox
Left = 26
Top = 430
Width = 145
Height = 23
ElementID = 'wcbshipto'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
ItemIndex = -1
DataField = 'staff_fields_ship_to'
DataSource = WebDataSource1
ListField = 'ADDRESS'
ListSource = wdsShipTo
end
object edtPONumber: TWebDBEdit
Left = 26
Top = 458
Width = 121
Height = 23
AutoSize = True
ChildOrder = 79
ElementID = 'edtponumber'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'staff_fields_po_number'
DataSource = WebDataSource1
end
object edtJobName: TWebDBEdit
Left = 26
Top = 486
Width = 121
Height = 23
AutoSize = True
ChildOrder = 79
ElementID = 'edtjobname'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'staff_fields_job_name'
DataSource = WebDataSource1
end
object edtQuickBooksItem: TWebDBEdit
Left = 26
Top = 514
Width = 121
Height = 23
AutoSize = True
ChildOrder = 79
ElementID = 'edtquickbooksitem'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'staff_fields_quickbooks_item'
DataSource = WebDataSource1
end
object edtSpecialInstructions: TWebDBEdit
Left = 835
Top = 185
Width = 121
Height = 23
AutoSize = True
ChildOrder = 78
ElementID = 'edtspecialinstructions'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'general_special_instructions'
DataSource = WebDataSource1
end
object btnConfirm: TWebButton
Left = 652
Top = 560
Width = 96
Height = 25
Caption = 'Confirm'
ChildOrder = 79
ElementID = 'btnconfirm'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnClick = btnConfirmClick
end
object btnCancel: TWebButton
Left = 764
Top = 560
Width = 96
Height = 25
Caption = 'Cancel'
ChildOrder = 79
ElementID = 'btncancel'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnClick = btnCancelClick
end
object pnlMessage: TWebPanel
Left = 324
Top = 19
Width = 121
Height = 33
ElementID = 'pnl_message'
ChildOrder = 5
ElementPosition = epRelative
Role = 'alert'
TabOrder = 16
object lblMessage: TWebLabel
Left = 28
Top = 9
Width = 46
Height = 15
Caption = 'Message'
ElementID = 'view.login.message.label'
ElementPosition = epRelative
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object btnCloseNotification: TWebButton
Left = 96
Top = 3
Width = 22
Height = 25
ChildOrder = 1
ElementID = 'view.login.message.button'
ElementFont = efCSS
ElementPosition = epRelative
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
Role = 'button'
WidthStyle = ssAuto
WidthPercent = 100.000000000000000000
end
end
object edtCompanyName: TWebDBEdit
Left = 26
Top = 92
Width = 121
Height = 22
ChildOrder = 20
ElementID = 'edtcompanyname'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'NAME'
DataSource = WebDataSource1
end
object WebDataSource1: TWebDataSource
DataSet = XDataWebDataSet1
Left = 22
Top = 10
end
object XDataWebDataSet1: TXDataWebDataSet
Connection = DMConnection.ApiConnection
Left = 90
Top = 20
object XDataWebDataSet1COMPANY_ID: TIntegerField
FieldName = 'COMPANY_ID'
end
object XDataWebDataSet1USER_ID: TIntegerField
FieldName = 'USER_ID'
end
object XDataWebDataSet1ORDER_DATE: TDateField
FieldName = 'ORDER_DATE'
end
object XDataWebDataSet1ORDER_STATUS: TStringField
FieldName = 'ORDER_STATUS'
end
object XDataWebDataSet1SHORT_NAME: TStringField
FieldName = 'SHORT_NAME'
end
object XDataWebDataSet1staff_fields_ship_via: TStringField
FieldName = 'staff_fields_ship_via'
end
object XDataWebDataSet1staff_fields_price: TStringField
FieldName = 'staff_fields_price'
end
object XDataWebDataSet1staff_fields_invoice_to: TStringField
FieldName = 'staff_fields_invoice_to'
end
object XDataWebDataSet1staff_fields_invoice_attention: TStringField
FieldName = 'staff_fields_invoice_attention'
end
object XDataWebDataSet1staff_fields_ship_to: TStringField
FieldName = 'staff_fields_ship_to'
end
object XDataWebDataSet1staff_fields_ship_attention: TStringField
FieldName = 'staff_fields_ship_attention'
end
object XDataWebDataSet1staff_fields_po_number: TStringField
FieldName = 'staff_fields_po_number'
end
object XDataWebDataSet1staff_fields_job_name: TStringField
FieldName = 'staff_fields_job_name'
end
object XDataWebDataSet1staff_fields_order_date: TStringField
FieldName = 'staff_fields_order_date'
end
object XDataWebDataSet1staff_fields_proof_date: TStringField
FieldName = 'staff_fields_proof_date'
end
object XDataWebDataSet1staff_fields_ship_date: TStringField
FieldName = 'staff_fields_ship_date'
end
object XDataWebDataSet1ORDER_ID: TStringField
FieldName = 'ORDER_ID'
end
object XDataWebDataSet1NAME: TStringField
FieldName = 'NAME'
end
end
object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection
Left = 160
Top = 18
end
object tmrScrollTop: TWebTimer
Interval = 100
OnTimer = tmrScrollTopTimer
Left = 240
Top = 8
end
object wdsShipTo: TWebDataSource
DataSet = xdwdsShipTo
Left = 212
Top = 436
end
object xdwdsShipTo: TXDataWebDataSet
Left = 192
Top = 486
object xdwdsShipToADDRESS: TStringField
FieldName = 'ADDRESS'
end
end
end
<div class="col-12 col-md-8">
<div class="row">
<div class=col-sm>
<div id="pnl_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>
</div>
</div>
<h4 class="custom-h4 mt-3">Company</h4>
<hr class="custom-hr">
<div class="row">
<div class="col-auto">
<label for="wdbe_first_name" class="form-label mt-2">Company Name:</label>
<input id="edtcompanyname" type="text" class="form-control" style="width: 300px;"/>
</div>
<div class="col-auto">
<label for="wdbe_first_name" class="form-label mt-2">Account Company Name:</label>
<input id="edtaccountcompanyname"type="text" class="form-control" style="width: 150px"/>
</div>
<div class="col-auto">
<label for="wdbe_first_name" class="form-label mt-2">In Quickbooks?:</label>
<input id="edtinquickbooks"type="text" class="form-control" style="width: 150px"/>
</div>
</div>
<h4 class="custom-h4 mt-3">Staff Fields</h4>
<hr class="custom-hr">
<div class="row">
<div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Order Date:</label>
<input class="form-control input-sm" id="dtporderdate" type="date">
</div>
<div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Proof Date:</label>
<input class="form-control input-sm" id="dtpproofdate" type="date">
</div>
<div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Ship Date:</label>
<input class="form-control input-sm" id="dtpshipdate" type="date">
</div>
<div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Ship Via:</label>
<input id="edtshipvia" type="text" class="form-control"/>
</div>
<div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Quantity:</label>
<input id="edtquantity" class="form-control input-sm" style="width: 100px"/>
</div>
<div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Price:</label>
<input id="edtprice" class="form-control input-sm" style="width: 100px" type="number" min="0"/>
</div>
<div>
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Invoice To:</label>
<input id="edtinvoiceto" class="form-control input-sm"/>
</div>
<div>
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Ship To:</label>
<select id="wcbshipto" class='form-select'></select>
</div>
<div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">PO Number:</label>
<input id="edtponumber" class="form-control input-sm" width='50%'/>
</div>
<div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Job Name:</label>
<input id="edtjobname" class="form-control input-sm" width='50%'/>
</div>
<div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">QuickBooks Item:</label>
<input id="edtquickbooksitem" class="form-control input-sm" width='50%'/>
</div>
</div>
<h4 class="custom-h4 mt-3">General</h4>
<hr class="custom-hr">
<div class="row">
<div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label">Special Instructions</label>
<textarea id="edtspecialinstructions" class="form-control" style=" width: 500px; height: 150px;"></textarea>
</div>
</div>
<div class="row">
<div class="col-auto">
<button id="btnconfirm" class="btn btn-primary btn-sm float-end my-2">Confirm</button>
</div>
<div class="col-auto">
<button id="btncancel" class="btn btn-primary btn-sm float-end my-2">Cancel</button>
</div>
</div>
</div>
unit View.OrderEntryCuttingDie;
interface
uses
System.SysUtils, System.Generics.Collections, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,
WEBLib.Forms, WEBLib.Dialogs, WEBLib.Menus, WEBLib.ExtCtrls, WEBLib.StdCtrls,
WEBLib.JSON, Auth.Service, XData.Web.Client, WebLib.Storage,
ConnectionModule, App.Types, Vcl.StdCtrls, Vcl.Controls, WEBLib.DBCtrls,
Data.DB, XData.Web.JsonDataset, XData.Web.Dataset, WEBLib.DB;
type
TFOrderEntryCuttingDie = class(TWebForm)
WebDataSource1: TWebDataSource;
XDataWebDataSet1: TXDataWebDataSet;
XDataWebDataSet1COMPANY_ID: TIntegerField;
XDataWebDataSet1USER_ID: TIntegerField;
XDataWebDataSet1ORDER_DATE: TDateField;
XDataWebDataSet1ORDER_STATUS: TStringField;
XDataWebDataSet1SHORT_NAME: TStringField;
XDataWebDataSet1staff_fields_ship_via: TStringField;
XDataWebDataSet1staff_fields_price: TStringField;
XDataWebDataSet1staff_fields_invoice_to: TStringField;
XDataWebDataSet1staff_fields_invoice_attention: TStringField;
XDataWebDataSet1staff_fields_ship_to: TStringField;
XDataWebDataSet1staff_fields_ship_attention: TStringField;
XDataWebDataSet1staff_fields_po_number: TStringField;
XDataWebDataSet1staff_fields_job_name: TStringField;
XDataWebDataSet1staff_fields_order_date: TStringField;
XDataWebDataSet1staff_fields_proof_date: TStringField;
XDataWebDataSet1staff_fields_ship_date: TStringField;
XDataWebClient1: TXDataWebClient;
tmrScrollTop: TWebTimer;
WebLabel2: TWebLabel;
edtCompanyAccountName: TWebDBEdit;
edtInQuickBooks: TWebDBEdit;
WebLabel1: TWebLabel;
dtpOrderDate: TWebDateTimePicker;
dtpProofDate: TWebDateTimePicker;
dtpShipDate: TWebDateTimePicker;
edtShipVia: TWebDBEdit;
edtQuantity: TWebDBEdit;
edtPrice: TWebDBEdit;
edtInvoiceTo: TWebDBEdit;
wdbcbShipTo: TWebDBComboBox;
edtPONumber: TWebDBEdit;
edtJobName: TWebDBEdit;
edtQuickBooksItem: TWebDBEdit;
wdsShipTo: TWebDataSource;
xdwdsShipTo: TXDataWebDataSet;
xdwdsShipToADDRESS: TStringField;
WebLabel9: TWebLabel;
edtSpecialInstructions: TWebDBEdit;
btnConfirm: TWebButton;
btnCancel: TWebButton;
pnlMessage: TWebPanel;
lblMessage: TWebLabel;
btnCloseNotification: TWebButton;
edtCompanyName: TWebDBEdit;
XDataWebDataSet1ORDER_ID: TStringField;
XDataWebDataSet1NAME: TStringField;
procedure btnConfirmClick(Sender: TObject);
procedure btnCancelClick(Sender: TObject);
procedure WebFormCreate(Sender: TObject);
procedure HideNotification();
procedure ShowNotification(Notification: string);
procedure WebFormShow(Sender: TObject);
[async] procedure GetCuttingDieOrder(Order_ID: string);
[async] procedure GetCustomer(customerID: string);
procedure tmrScrollTopTimer(Sender: TObject);
[async] procedure AddCuttingDieOrder(orderJSON: TJSONObject);
private
FAgencyCode: string;
FCurrentReportType: string;
FSelectProc: TSelectProc;
orderID: string;
customerID: string;
mode: string;
public
class function CreateForm(AElementID, orderInfo, customerInfo, mode: string): TWebForm;
end;
var
FOrderEntryCuttingDie: TFOrderEntryCuttingDie;
implementation
{$R *.dfm}
uses
View.Home, View.Main;
procedure TFOrderEntryCuttingDie.btnConfirmClick(Sender: TObject);
// Converts all the information on the page into a JSON to then send to the server
var
I, J: integer;
orderJSON: TJSONObject;
fieldNames: TStringList;
itemList: TJSNodeList;
header, value: string;
Field: TField;
Response: TXDataClientResponse;
begin
orderJSON := TJSONObject.Create;
XDataWebDataSet1.Edit;
//Convert all dates to strings because I was having less issues with that data type.
XDataWebDataSet1staff_fields_proof_date.Value := DateTimeToStr(dtpProofDate.Date);
XDataWebDataSet1staff_fields_ship_date.Value := DateTimeToStr(dtpShipDate.Date);
XDataWebDataSet1staff_fields_order_date.Value := DateTimeToStr(dtpOrderDate.Date);
XDataWebDataSet1.Post;
XDataWebDataSet1.First;
while not XDataWebDataSet1.Eof do
begin
for Field in XDataWebDataSet1.Fields do
begin
if Field is TStringField then
begin
if Field.AsString = '' then
orderJSON.AddPair(Field.FieldName, '')
else
orderJSON.AddPair(Field.FieldName, Field.AsString); // Add all other fields
end
else if Field is TBooleanField then
begin
if Field.AsBoolean then
orderJSON.AddPair(Field.FieldName, 'T')
else
orderJSON.AddPair(Field.FieldName, '');
end;
end;
XDataWebDataSet1.Next;
end;
orderJSON.AddPair('COMPANY_ID', customerID);
orderJSON.AddPair('USER_ID', '1011');
orderJSON.AddPair('mode', mode);
if mode = 'EDIT' then
orderJSON.AddPair('ORDER_ID', orderID);
AddCuttingDieOrder(orderJSON);
FViewMain.ViewOrders('Success');
end;
procedure TFOrderEntryCuttingDie.AddCuttingDieOrder(orderJSON: TJSONObject);
// sends the order JSON object to the server
var
Response: TXDataClientResponse;
begin
Response := await(XDataWebClient1.RawInvokeAsync('ILookupService.AddCuttingDieOrder',
[orderJSON.ToString]));
end;
class function TFOrderEntryCuttingDie.CreateForm(AElementID, orderInfo, customerInfo, mode: string): TWebForm;
var
localMode: string;
begin
localMode := mode;
Application.CreateForm(TFOrderEntryCuttingDie, AElementID, Result,
procedure(AForm: TObject)
begin
with TFOrderEntryCuttingDie(AForm) do
begin
HideNotification;
TFOrderEntryCuttingDie(AForm).customerID := customerInfo;
TFOrderEntryCuttingDie(AForm).orderID := orderInfo;
TFOrderEntryCuttingDie(AForm).mode := localMode;
end;
end
);
end;
procedure TFOrderEntryCuttingDie.btnCancelClick(Sender: TObject);
begin
FViewMain.ViewOrders('');
end;
procedure TFOrderEntryCuttingDie.WebFormCreate(Sender: TObject);
begin
if not DMConnection.ApiConnection.Connected then
begin
DMConnection.ApiConnection.OpenAsync;
console.log('report requirements connection open')
end;
end;
procedure TFOrderEntryCuttingDie.getCuttingDieOrder(Order_ID: string);
// retrieves an order from the server then loads the info into the page
var
xdcResponse: TXDataClientResponse;
orderList : TJSObject;
i: integer;
data: TJSArray;
order: TJSObject;
begin
xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GetOrder',
[Order_ID]));
order := TJSObject(xdcResponse.Result);
data := TJSArray(order['data']);
XDataWebDataSet1.Close;
XDataWebDataSet1.SetJsonData(order);
XDataWebDataSet1.Open;
// Check boxes and dates need to be manually set
if not (XDataWebDataSet1staff_fields_order_date.AsString = '') then
dtpOrderDate.Date := StrToDateTime(XDataWebDataSet1staff_fields_order_date.Value)
else
dtpOrderDate.Date := 0;
if not (XDataWebDataSet1staff_fields_proof_date.AsString = '') then
dtpProofDate.Date := StrToDateTime(XDataWebDataSet1staff_fields_proof_date.AsString)
else
dtpProofDate.Date := 0;
if not (XDataWebDataSet1staff_fields_ship_date.AsString = '') then
dtpShipDate.Date := StrToDateTime(XDataWebDataSet1staff_fields_ship_date.AsString)
else
dtpShipDate.Date := 0;
console.log(mode);
console.log(XDataWebDataSet1COMPANY_ID.AsString);
if mode = 'EDIT' then
CustomerID := XDataWebDataSet1COMPANY_ID.AsString;
console.log(CustomerID);
end;
procedure TFOrderEntryCuttingDie.getCustomer(customerID: string);
// gets a customer from the database then loads the appropiate fields
var
xdcResponse: TXDataClientResponse;
customer : TJSObject;
address: string;
begin
xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GetCustomer',
[customerID]));
customer := TJSObject(xdcResponse.Result);
console.log(customer);
XDataWebDataSet1.Close;
XDataWebDataSet1.SetJsonData(customer);
XDataWebDataSet1.Open;
console.log(XDataWebDataSet1NAME.AsString);
xdwdsShipTo.Close;
xdwdsShipTo.SetJSONData(customer['ADDRESS_LIST']);
xdwdsShipTo.Open;
end;
procedure TFOrderEntryCuttingDie.WebFormShow(Sender: TObject);
begin
if mode <> 'ADD' then
getCuttingDieOrder(orderID)
else
getCustomer(customerID);
HideNotification();
end;
procedure TFOrderEntryCuttingDie.HideNotification;
begin
pnlMessage.ElementHandle.hidden := True;
end;
procedure TFOrderEntryCuttingDie.ShowNotification(Notification: string);
begin
if Notification <> '' then
begin
lblMessage.Caption := Notification;
pnlMessage.ElementHandle.hidden := False;
end;
end;
procedure TFOrderEntryCuttingDie.tmrScrollTopTimer(Sender: TObject);
begin
tmrScrollTop.Enabled := False;
window.scrollTo(0, 0);
end;
initialization
RegisterClass(TFOrderEntryCuttingDie);
end.
\ No newline at end of file
...@@ -56,50 +56,6 @@ object FViewOrders: TFViewOrders ...@@ -56,50 +56,6 @@ object FViewOrders: TFViewOrders
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
OnClick = btnSearchClick OnClick = btnSearchClick
end end
object pnlMessage: TWebPanel
Left = 82
Top = 352
Width = 125
Height = 33
ElementClassName = 'card'
ElementID = 'pnl_message'
ChildOrder = 5
ElementBodyClassName = 'card-body'
ElementFont = efCSS
ElementPosition = epRelative
Role = 'alert'
TabOrder = 2
object lblMessage: TWebLabel
Left = 32
Top = 11
Width = 42
Height = 13
Caption = 'Message'
ElementID = 'pnl_message'
ElementFont = efCSS
ElementPosition = epRelative
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object btnCloseNotification: TWebButton
Left = 96
Top = 3
Width = 22
Height = 25
ChildOrder = 1
ElementClassName = 'btn btn-light'
ElementID = 'view.login.message.button'
ElementFont = efCSS
ElementPosition = epRelative
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
Role = 'button'
WidthStyle = ssAuto
WidthPercent = 100.000000000000000000
OnClick = btnCloseNotificationClick
end
end
object WebButton1: TWebButton object WebButton1: TWebButton
Left = 188 Left = 188
Top = 79 Top = 79
...@@ -114,6 +70,7 @@ object FViewOrders: TFViewOrders ...@@ -114,6 +70,7 @@ object FViewOrders: TFViewOrders
TabOrder = 7 TabOrder = 7
TabStop = False TabStop = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
OnClick = WebButton1Click
end end
object btnPDF: TWebButton object btnPDF: TWebButton
Left = 332 Left = 332
...@@ -163,6 +120,8 @@ object FViewOrders: TFViewOrders ...@@ -163,6 +120,8 @@ object FViewOrders: TFViewOrders
Header.ListItemElementClassName = 'page-item' Header.ListItemElementClassName = 'page-item'
Header.ListLinkElementClassName = 'page-link' Header.ListLinkElementClassName = 'page-link'
WordWrap = True WordWrap = True
OnClickCell = wdbtcOrdersClickCell
OnDblClickCell = wdbtcOrdersDblClickCell
Columns = < Columns = <
item item
DataField = 'ID' DataField = 'ID'
...@@ -342,6 +301,36 @@ object FViewOrders: TFViewOrders ...@@ -342,6 +301,36 @@ object FViewOrders: TFViewOrders
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object pnlMessage: TWebPanel
Left = 12
Top = 16
Width = 121
Height = 33
ElementID = 'view.login.message'
ChildOrder = 17
TabOrder = 8
object lblMessage: TWebLabel
Left = 16
Top = 11
Width = 42
Height = 13
Caption = 'Message'
ElementID = 'view.login.message.label'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object btnCloseNotification: TWebButton
Left = 96
Top = 3
Width = 22
Height = 25
ChildOrder = 1
ElementID = 'view.login.message.button'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnClick = btnCloseNotificationClick
end
end
object XDataWebClient1: TXDataWebClient object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection Connection = DMConnection.ApiConnection
Left = 28 Left = 28
......
<div class="container h-100 d-flex flex-column mt-0" style="max-width: 100%; padding-bottom: 0;"> <div class="container h-100 d-flex flex-column mt-0" style="max-width: 100%; padding-bottom: 0;">
<!-- Alert Section --> <!-- Alert Section -->
<div class="row"> <div class="row">
<div class="col-sm"> <div class=col-sm>
<div id="pnl_message" class="alert alert-danger"> <div id="view.login.message" class="alert alert-danger">
<button id="view.login.message.button" type="button" class="btn-close" aria-label="Close"></button> <button id="view.login.message.button" type="button" class="btn-close" aria-label="Close"></button>
<span id="view.login.message.label"></span> <span id="view.login.message.label"></span>
</div> </div>
......
object FSearch: TFSearch object FSearch: TFSearch
Width = 1016 Width = 733
Height = 683 Height = 683
Font.Charset = ANSI_CHARSET Font.Charset = ANSI_CHARSET
Font.Color = clBlack Font.Color = clBlack
...@@ -468,7 +468,7 @@ object FSearch: TFSearch ...@@ -468,7 +468,7 @@ object FSearch: TFSearch
object TMSFNCGrid1: TTMSFNCGrid object TMSFNCGrid1: TTMSFNCGrid
Left = 20 Left = 20
Top = 112 Top = 112
Width = 620 Width = 699
Height = 233 Height = 233
ParentDoubleBuffered = False ParentDoubleBuffered = False
DoubleBuffered = True DoubleBuffered = True
...@@ -544,7 +544,7 @@ object FSearch: TFSearch ...@@ -544,7 +544,7 @@ object FSearch: TFSearch
Font.Name = 'Segoe UI' Font.Name = 'Segoe UI'
Font.Style = [] Font.Style = []
ID = '' ID = ''
Width = 241.000000000000000000 Width = 320.000000000000000000
end end
item item
BorderWidth = 1 BorderWidth = 1
...@@ -742,13 +742,13 @@ object FSearch: TFSearch ...@@ -742,13 +742,13 @@ object FSearch: TFSearch
end end
object XDataWebClient1: TXDataWebClient object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection Connection = DMConnection.ApiConnection
Left = 738 Left = 520
Top = 61 Top = 383
end end
object xdwdsCustomers: TXDataWebDataSet object xdwdsCustomers: TXDataWebDataSet
Connection = DMConnection.ApiConnection Connection = DMConnection.ApiConnection
Left = 666 Left = 418
Top = 73 Top = 393
object xdwdsCustomersID: TIntegerField object xdwdsCustomersID: TIntegerField
FieldName = 'ID' FieldName = 'ID'
end end
...@@ -764,7 +764,7 @@ object FSearch: TFSearch ...@@ -764,7 +764,7 @@ object FSearch: TFSearch
end end
object wdsCustomers: TWebDataSource object wdsCustomers: TWebDataSource
DataSet = xdwdsCustomers DataSet = xdwdsCustomers
Left = 650 Left = 594
Top = 23 Top = 387
end end
end end
// Search pop-up form used to filter the list.
// Author: Cameron Hayes
unit View.Search; unit View.Search;
interface interface
...@@ -105,6 +107,7 @@ begin ...@@ -105,6 +107,7 @@ begin
end; end;
procedure TFSearch.WebFormShow(Sender: TObject); procedure TFSearch.WebFormShow(Sender: TObject);
// Auto fills information based on previous search
var var
params: TStringList; params: TStringList;
DateFormatSettings: TFormatSettings; DateFormatSettings: TFormatSettings;
...@@ -241,6 +244,7 @@ begin ...@@ -241,6 +244,7 @@ begin
end; end;
[async] procedure TFSearch.getCustomers(); [async] procedure TFSearch.getCustomers();
// Gets a list of customers from the server
var var
xdcResponse: TXDataClientResponse; xdcResponse: TXDataClientResponse;
customerList: TJSObject; customerList: TJSObject;
......
object FSetStatus: TFSetStatus
Width = 640
Height = 361
OnShow = WebFormShow
object lblStatus1: TWebLabel
Left = 326
Top = 80
Width = 38
Height = 14
Caption = 'Status:'
Font.Charset = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'Arial'
Font.Style = [fsBold]
HeightPercent = 100.000000000000000000
ParentFont = False
WidthPercent = 100.000000000000000000
end
object WebLabel1: TWebLabel
Left = 484
Top = 80
Width = 91
Height = 14
Caption = 'Date Completed:'
Font.Charset = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'Arial'
Font.Style = [fsBold]
HeightPercent = 100.000000000000000000
ParentFont = False
WidthPercent = 100.000000000000000000
end
object WebLabel2: TWebLabel
Left = 14
Top = 80
Width = 48
Height = 14
Caption = 'Order ID:'
Font.Charset = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'Arial'
Font.Style = [fsBold]
HeightPercent = 100.000000000000000000
ParentFont = False
WidthPercent = 100.000000000000000000
end
object WebLabel3: TWebLabel
Left = 172
Top = 78
Width = 57
Height = 14
Caption = 'Job Name:'
Font.Charset = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'Arial'
Font.Style = [fsBold]
HeightPercent = 100.000000000000000000
ParentFont = False
WidthPercent = 100.000000000000000000
end
object WebLabel4: TWebLabel
Left = 11
Top = 142
Width = 51
Height = 14
Caption = 'Ship Due:'
Font.Charset = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'Arial'
Font.Style = [fsBold]
HeightPercent = 100.000000000000000000
ParentFont = False
WidthPercent = 100.000000000000000000
end
object WebLabel5: TWebLabel
Left = 169
Top = 142
Width = 78
Height = 14
Caption = 'New Due Date:'
Font.Charset = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'Arial'
Font.Style = [fsBold]
HeightPercent = 100.000000000000000000
ParentFont = False
WidthPercent = 100.000000000000000000
end
object WebLabel6: TWebLabel
Left = 326
Top = 140
Width = 62
Height = 14
Caption = 'Mount Due:'
Font.Charset = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'Arial'
Font.Style = [fsBold]
HeightPercent = 100.000000000000000000
ParentFont = False
WidthPercent = 100.000000000000000000
end
object WebLabel7: TWebLabel
Left = 484
Top = 140
Width = 78
Height = 14
Caption = 'New Due Date:'
Font.Charset = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'Arial'
Font.Style = [fsBold]
HeightPercent = 100.000000000000000000
ParentFont = False
WidthPercent = 100.000000000000000000
end
object WebLabel8: TWebLabel
Left = 11
Top = 200
Width = 54
Height = 14
Caption = 'Plate Due:'
Font.Charset = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'Arial'
Font.Style = [fsBold]
HeightPercent = 100.000000000000000000
ParentFont = False
WidthPercent = 100.000000000000000000
end
object WebLabel9: TWebLabel
Left = 169
Top = 200
Width = 78
Height = 14
Caption = 'New Due Date:'
Font.Charset = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'Arial'
Font.Style = [fsBold]
HeightPercent = 100.000000000000000000
ParentFont = False
WidthPercent = 100.000000000000000000
end
object WebLabel10: TWebLabel
Left = 324
Top = 200
Width = 44
Height = 14
Caption = 'Art Due:'
Font.Charset = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'Arial'
Font.Style = [fsBold]
HeightPercent = 100.000000000000000000
ParentFont = False
WidthPercent = 100.000000000000000000
end
object WebLabel11: TWebLabel
Left = 482
Top = 200
Width = 78
Height = 14
Caption = 'New Due Date:'
Font.Charset = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'Arial'
Font.Style = [fsBold]
HeightPercent = 100.000000000000000000
ParentFont = False
WidthPercent = 100.000000000000000000
end
object wlcbStatus: TWebLookupComboBox
Left = 326
Top = 100
Width = 145
Height = 22
ElementClassName = 'custom-select'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
ItemIndex = -1
LookupValues = <
item
Value = 'PROOF'
DisplayText = 'Proof Done'
end
item
Value = 'ART'
DisplayText = 'Art Done'
end
item
Value = 'PLATE'
DisplayText = 'Plate Done'
end
item
Value = 'MOUNT'
DisplayText = 'Mount Done'
end
item
Value = 'SHIP'
DisplayText = 'Ship Done'
end>
end
object dtpDate: TWebDateTimePicker
Left = 484
Top = 100
Width = 145
Height = 22
BorderStyle = bsSingle
ChildOrder = 1
Color = clWhite
Date = 45665.641243414350000000
Role = ''
Text = ''
end
object btnConfirm: TWebButton
Left = 11
Top = 271
Width = 96
Height = 25
Caption = 'Confirm'
ChildOrder = 7
ElementClassName = 'btn btn-secondary'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
TabOrder = 5
TabStop = False
WidthPercent = 100.000000000000000000
OnClick = btnConfirmClick
end
object btnCancel: TWebButton
Left = 133
Top = 271
Width = 96
Height = 25
Caption = 'Cancel'
ChildOrder = 7
ElementClassName = 'btn btn-secondary'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
TabOrder = 5
TabStop = False
WidthPercent = 100.000000000000000000
OnClick = btnCancelClick
end
object edtOrderID: TWebEdit
Left = 14
Top = 100
Width = 145
Height = 22
HelpType = htKeyword
TabStop = False
ChildOrder = 8
ElementClassName = 'form-control'
ElementFont = efCSS
Enabled = False
Font.Charset = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -8
Font.Name = 'Arial'
Font.Style = []
HeightPercent = 100.000000000000000000
HideSelection = False
ParentFont = False
TabOrder = 1
WidthPercent = 100.000000000000000000
end
object edtNotification: TWebEdit
Left = 14
Top = 24
Width = 303
Height = 22
HelpType = htKeyword
TabStop = False
ChildOrder = 8
ElementClassName = 'form-control'
ElementFont = efCSS
Enabled = False
Font.Charset = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -8
Font.Name = 'Arial'
Font.Style = []
HeightPercent = 100.000000000000000000
HideSelection = False
ParentFont = False
TabOrder = 1
WidthPercent = 100.000000000000000000
end
object edtJobName: TWebEdit
Left = 172
Top = 100
Width = 145
Height = 22
HelpType = htKeyword
TabStop = False
ChildOrder = 8
ElementClassName = 'form-control'
ElementFont = efCSS
Enabled = False
Font.Charset = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -8
Font.Name = 'Arial'
Font.Style = []
HeightPercent = 100.000000000000000000
HideSelection = False
ParentFont = False
TabOrder = 1
WidthPercent = 100.000000000000000000
end
object dtpShipDue: TWebDateTimePicker
Left = 11
Top = 162
Width = 145
Height = 22
BorderStyle = bsSingle
ChildOrder = 1
Color = clWhite
Date = 45665.641243414350000000
Enabled = False
Role = ''
Text = ''
end
object dtpNewShipDue: TWebDateTimePicker
Left = 169
Top = 162
Width = 145
Height = 22
BorderStyle = bsSingle
ChildOrder = 1
Color = clWhite
Date = 45665.641243414350000000
Role = ''
Text = ''
end
object dtpMountDue: TWebDateTimePicker
Left = 326
Top = 160
Width = 145
Height = 22
BorderStyle = bsSingle
ChildOrder = 1
Color = clWhite
Date = 45665.641243414350000000
Enabled = False
Role = ''
Text = ''
end
object dtpNewMountDue: TWebDateTimePicker
Left = 484
Top = 160
Width = 145
Height = 22
BorderStyle = bsSingle
ChildOrder = 1
Color = clWhite
Date = 45665.641243414350000000
Role = ''
Text = ''
end
object dtpPlateDue: TWebDateTimePicker
Left = 11
Top = 220
Width = 145
Height = 22
BorderStyle = bsSingle
ChildOrder = 1
Color = clWhite
Date = 45665.641243414350000000
Enabled = False
Role = ''
Text = ''
end
object dtpNewPlateDue: TWebDateTimePicker
Left = 169
Top = 220
Width = 145
Height = 22
BorderStyle = bsSingle
ChildOrder = 1
Color = clWhite
Date = 45665.641243414350000000
Role = ''
Text = ''
end
object dtpArtDue: TWebDateTimePicker
Left = 324
Top = 220
Width = 145
Height = 22
BorderStyle = bsSingle
ChildOrder = 1
Color = clWhite
Date = 45665.641243414350000000
Enabled = False
Role = ''
Text = ''
end
object dtpNewArtDue: TWebDateTimePicker
Left = 482
Top = 220
Width = 145
Height = 22
BorderStyle = bsSingle
ChildOrder = 1
Color = clWhite
Date = 45665.641243414350000000
Role = ''
Text = ''
end
end
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>TMS Web Project</title>
<style>
</style>
</head>
<body>
</body>
</html>
\ No newline at end of file
unit View.SetStatus;
interface
uses
System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,
WEBLib.Forms, WEBLib.Dialogs, Vcl.Controls, Vcl.StdCtrls, WEBLib.ExtCtrls,
WEBLib.StdCtrls;
type
TFSetStatus = class(TWebForm)
wlcbStatus: TWebLookupComboBox;
dtpDate: TWebDateTimePicker;
lblStatus1: TWebLabel;
WebLabel1: TWebLabel;
btnConfirm: TWebButton;
btnCancel: TWebButton;
WebLabel2: TWebLabel;
edtOrderID: TWebEdit;
edtNotification: TWebEdit;
edtJobName: TWebEdit;
WebLabel3: TWebLabel;
WebLabel4: TWebLabel;
dtpShipDue: TWebDateTimePicker;
WebLabel5: TWebLabel;
dtpNewShipDue: TWebDateTimePicker;
WebLabel6: TWebLabel;
dtpMountDue: TWebDateTimePicker;
WebLabel7: TWebLabel;
dtpNewMountDue: TWebDateTimePicker;
WebLabel8: TWebLabel;
dtpPlateDue: TWebDateTimePicker;
WebLabel9: TWebLabel;
dtpNewPlateDue: TWebDateTimePicker;
WebLabel10: TWebLabel;
dtpArtDue: TWebDateTimePicker;
WebLabel11: TWebLabel;
dtpNewArtDue: TWebDateTimePicker;
procedure WebFormShow(Sender: TObject);
procedure btnConfirmClick(Sender: TObject);
procedure btnCancelClick(Sender: TObject);
private
{ Private declarations }
procedure HideNotification;
procedure ShowNotification(Notification: string);
public
{ Public declarations }
confirm: boolean;
OrderID, JobName: string;
ShipDue, MountDue, PlateDue, ArtDue: TDateTime;
end;
var
FSetStatus: TFSetStatus;
implementation
{$R *.dfm}
procedure TFSetStatus.btnCancelClick(Sender: TObject);
begin
Close;
end;
procedure TFSetStatus.btnConfirmClick(Sender: TObject);
begin
if ( (dtpDate.Date = 0 ) or ( wlcbStatus.value = '' ) ) then
ShowNotification('Failure:Please fill in all information')
else
begin
confirm := true;
Close;
end;
end;
procedure TFSetStatus.WebFormShow(Sender: TObject);
begin
HideNotification();
edtOrderID.Text := OrderID;
dtpDate.Date := 0;
edtJobName.Text := JobName;
dtpShipDue.Date := ShipDue;
dtpMountDue.Date := MountDue;
dtpPlateDue.Date := PlateDue;
dtpArtDue.Date := ArtDue;
dtpNewShipDue.Date := 0;
dtpNewMountDue.Date := 0;
dtpNewPlateDue.Date := 0;
dtpNewArtDue.Date := 0;
end;
procedure TFSetStatus.HideNotification;
begin
//pnlMessage.ElementHandle.hidden := True;
end;
procedure TFSetStatus.ShowNotification(Notification: string);
begin
if Notification <> '' then
begin
edtNotification.Text := Notification;
end;
end;
end.
\ No newline at end of file
...@@ -57,6 +57,7 @@ input[type="text"] { ...@@ -57,6 +57,7 @@ input[type="text"] {
/* Navbar items - keep them aligned and spaced out */ /* Navbar items - keep them aligned and spaced out */
.navbar-nav .nav-item { .navbar-nav .nav-item {
padding: 0 15px; /* Adjust spacing between navbar items */ padding: 0 15px; /* Adjust spacing between navbar items */
z-index: 9999;
} }
/* Flexbox for the entire navbar */ /* Flexbox for the entire navbar */
......
...@@ -17,9 +17,12 @@ uses ...@@ -17,9 +17,12 @@ uses
View.Users in 'View.Users.pas' {FViewUsers: TWebForm} {*.html}, View.Users in 'View.Users.pas' {FViewUsers: TWebForm} {*.html},
View.EditUser in 'View.EditUser.pas' {FViewEditUser: TWebForm} {*.html}, View.EditUser in 'View.EditUser.pas' {FViewEditUser: TWebForm} {*.html},
View.Orders in 'View.Orders.pas' {FViewOrders: TWebForm} {*.html}, View.Orders in 'View.Orders.pas' {FViewOrders: TWebForm} {*.html},
View.OrderEntryCorrugated in 'View.OrderEntryCorrugated.pas' {FOrderEntry: TWebForm} {*.html}, View.OrderEntryCorrugated in 'View.OrderEntryCorrugated.pas' {FOrderEntryCorrugated: TWebForm} {*.html},
View.AddOrder in 'View.AddOrder.pas' {FAddOrder: TWebForm} {*.html}, View.AddOrder in 'View.AddOrder.pas' {FAddOrder: TWebForm} {*.html},
View.Search in 'View.Search.pas' {FSearch: TWebForm} {*.html}; View.Search in 'View.Search.pas' {FSearch: TWebForm} {*.html},
View.SetStatus in 'View.SetStatus.pas' {FSetStatus: TWebForm} {*.html},
View.OrderEntryCuttingDie in 'View.OrderEntryCuttingDie.pas' {FOrderEntryCuttingDie: TWebForm} {*.html},
View.OrderEntryWeb in 'View.OrderEntryWeb.pas' {FOrderEntryWeb: TWebForm} {*.html};
{$R *.res} {$R *.res}
......
...@@ -166,7 +166,7 @@ ...@@ -166,7 +166,7 @@
<DesignClass>TWebForm</DesignClass> <DesignClass>TWebForm</DesignClass>
</DCCReference> </DCCReference>
<DCCReference Include="View.OrderEntryCorrugated.pas"> <DCCReference Include="View.OrderEntryCorrugated.pas">
<Form>FOrderEntry</Form> <Form>FOrderEntryCorrugated</Form>
<FormType>dfm</FormType> <FormType>dfm</FormType>
<DesignClass>TWebForm</DesignClass> <DesignClass>TWebForm</DesignClass>
</DCCReference> </DCCReference>
...@@ -180,6 +180,21 @@ ...@@ -180,6 +180,21 @@
<FormType>dfm</FormType> <FormType>dfm</FormType>
<DesignClass>TWebForm</DesignClass> <DesignClass>TWebForm</DesignClass>
</DCCReference> </DCCReference>
<DCCReference Include="View.SetStatus.pas">
<Form>FSetStatus</Form>
<FormType>dfm</FormType>
<DesignClass>TWebForm</DesignClass>
</DCCReference>
<DCCReference Include="View.OrderEntryCuttingDie.pas">
<Form>FOrderEntryCuttingDie</Form>
<FormType>dfm</FormType>
<DesignClass>TWebForm</DesignClass>
</DCCReference>
<DCCReference Include="View.OrderEntryWeb.pas">
<Form>FOrderEntryWeb</Form>
<FormType>dfm</FormType>
<DesignClass>TWebForm</DesignClass>
</DCCReference>
<None Include="index.html"/> <None Include="index.html"/>
<None Include="css\app.css"/> <None Include="css\app.css"/>
<None Include="config\config.json"/> <None Include="config\config.json"/>
......
...@@ -22,9 +22,11 @@ type ...@@ -22,9 +22,11 @@ type
userName: string; userName: string;
userFullName: string; userFullName: string;
userId: string; userId: string;
userAdmin: boolean; userPerspectiveID: string;
userPhone: string; userQBID: string;
userAccessType: string;
userEmail: string; userEmail: string;
userStatus: string;
procedure AfterConstruction; override; procedure AfterConstruction; override;
procedure BeforeDestruction; override; procedure BeforeDestruction; override;
property Query: TUniQuery read GetQuery; property Query: TUniQuery read GetQuery;
...@@ -106,9 +108,12 @@ begin ...@@ -106,9 +108,12 @@ begin
JWT.Claims.SetClaimOfType<string>('user_name', userName); JWT.Claims.SetClaimOfType<string>('user_name', userName);
JWT.Claims.SetClaimOfType<string>('user_fullname', userFullName); JWT.Claims.SetClaimOfType<string>('user_fullname', userFullName);
JWT.Claims.SetClaimOfType<string>('user_id', userId); JWT.Claims.SetClaimOfType<string>('user_id', userId);
JWT.Claims.SetClaimOfType<boolean>('user_admin', userAdmin); JWT.Claims.SetClaimOfType<string>('user_perspective_id', userPerspectiveID);
JWT.Claims.SetClaimOfType<string>('user_phone', userPhone); JWT.Claims.SetClaimOfType<string>('user_status', userStatus);
JWT.Claims.SetClaimOfType<string>('user_email', userEmail); JWT.Claims.SetClaimOfType<string>('user_email', userEmail);
JWT.Claims.SetClaimOfType<string>('user_qb_id', userQBID);
JWT.Claims.SetClaimOfType<string>('user_access_type', userAccessType);
Result := TJOSE.SHA256CompactToken(serverConfig.jwtTokenSecret, JWT); Result := TJOSE.SHA256CompactToken(serverConfig.jwtTokenSecret, JWT);
finally finally
JWT.Free; JWT.Free;
...@@ -139,17 +144,15 @@ begin ...@@ -139,17 +144,15 @@ begin
//checkString := THashSHA2.GetHashString(date_created + password, THashSHA2.TSHA2Version.SHA512).ToUpper; //checkString := THashSHA2.GetHashString(date_created + password, THashSHA2.TSHA2Version.SHA512).ToUpper;
if password = authDB.uq.FieldByName('PASSWORD').AsString then if password = authDB.uq.FieldByName('PASSWORD').AsString then
begin begin
{userName := user; userName := user;
userFullName:= authDB.uq.FieldByName('full_name').AsString;; userFullName:= authDB.uq.FieldByName('NAME').AsString;;
userId := authDB.uq.FieldByName('user_id').AsString; userId := authDB.uq.FieldByName('USER_ID').AsString;
userAdmin := authDB.uq.FieldByName('admin').AsBoolean; userStatus := authDB.uq.FieldByName('STATUS').AsString;
userPhone := authDB.uq.FieldByName('phone_number').AsString; userPerspectiveID := authDB.uq.FieldByName('PERSPECTIVE_ID').AsString;
userEmail := authDB.uq.FieldByName('email').AsString; userEmail := authDB.uq.FieldByName('EMAIL').AsString;
userQBID := authDB.uq.FieldByName('QB_ID').AsString;
userStr := '?username=' + userName; userAccessType := authDB.uq.FieldByName('ACCESS_TYPE').AsString;
userStr := userStr + '&fullname=' + userFullName;
userStr := userStr + '&userid=' + userId;
userStr := userStr + '&useradmin=' + BoolToStr(userAdmin);}
//Logger.Log( 3, Format('AuthDB.SetLoginAuditEntry: "%s"', [user]) ); //Logger.Log( 3, Format('AuthDB.SetLoginAuditEntry: "%s"', [user]) );
//AuthDB.SetLoginAuditEntry( userStr ); //AuthDB.SetLoginAuditEntry( userStr );
Result := 3; // Succcess Result := 3; // Succcess
......
...@@ -125,12 +125,15 @@ type ...@@ -125,12 +125,15 @@ type
data: TList<TCustomerItem>; data: TList<TCustomerItem>;
end; end;
TFullOrder = class TFullOrder = class //TODO change name to TCorrugatedOrder
Public Public
//Company //Company
COMPANY_ID: integer;
NAME: string; NAME: string;
SHORT_NAME: string; SHORT_NAME: string;
inQuickBooks: string; inQuickBooks: string;
ADDRESS_LIST: TList<TAddressItem>;
ITEMS: TItemList;
// Staff Fields: // Staff Fields:
staff_fields_order_date: string; staff_fields_order_date: string;
...@@ -214,20 +217,126 @@ type ...@@ -214,20 +217,126 @@ type
// General // General
general_special_instructions: string; general_special_instructions: string;
end; end;
TWebOrder = class
Public
//Company
COMPANY_ID: integer;
NAME: string;
SHORT_NAME: string;
inQuickBooks: string;
ADDRESS_LIST: TList<TAddressItem>;
ITEMS: TItemList;
// Staff Fields:
staff_fields_order_date: string;
staff_fields_proof_date: string;
staff_fields_ship_date: string;
staff_fields_ship_via: string;
staff_fields_quantity: string;
staff_fields_price: string;
staff_fields_invoice_to: string;
staff_fields_ship_to: string;
staff_fields_po_number: string;
staff_fields_job_name: string;
staff_fields_quickbooks_item: string;
staff_fields_art_due: string;
staff_fields_plate_due: string;
staff_fields_mount_due: string;
staff_fields_art_location: string;
// Supplied by Customer:
supplied_by_customer_b_w_or_co: string;
supplied_by_customer_plates: string;
supplied_by_customer_sample: string;
supplied_by_customer_dimension: string;
supplied_by_customer_other: string;
supplied_by_customer_disk: string;
supplied_by_customer_e_mail: string;
supplied_by_customer_ftp: string;
supplied_by_customer_total_inc: string;
supplied_by_customer_sheets_us: string;
supplied_by_customer_initials: string;
// Proofing
proofing_pdf: boolean;
proofing_pdf_to: string;
proofing_pdf_date_1: string;
proofing_pdf_date_2: string;
proofing_pdf_date_3: string;
proofing_full_size_ink_jet_for: boolean;
proofing_ink_jet_to: string;
proofing_ink_jet_to_2: string;
proofing_ink_jet_date_1: string;
proofing_ink_jet_date_2: string;
proofing_color_contract: string;
proofing_color_contrac_to: string;
proofing_color_contrac_date_1: string;
proofing_color_contrac_date_2: string;
proofing_digital_color_key: string;
proofing_digital_color_to: string;
proofing_digital_color_date_1: string;
// Print Orientation
print_orientation_print_orient: string;
// Plate
plates_plate_material: string;
plates_thickness: string;
plates_job_number: string;
// Quantity and Color
quantity_and_colors_press_name: string;
quantity_and_colors_anilox_info: string;
quantity_and_colors_qty_colors: string;
// Plate Marks
plate_marks_microdots: string;
plate_marks_microdots_comments: string;
plate_marks_crosshairs: string;
plate_marks_crosshairs_comments: string;
plate_marks_color_bars: string;
plate_marks_color_bars_comments: string;
plate_marks_other: string;
plate_marks_other_comments: string;
// Layout
layout_around: string;
layout_accross: string;
layout_surface_print: string;
layout_reverse_print: string;
layout_cylinder_repeat: string;
layout_cutoff_dimension: string;
layout_pitch: string;
layout_teeth: string;
layout_bleed: string;
layout_cutback: string;
layout_minimum_trap_dim: string;
layout_maximum_trap_dim: string;
// UPC
upc_size: string;
upc_bar_width_reduction: string;
upc_distortion_percent: string;
upc_distortion_amount: string;
// General
general_comments: string;
end;
type type
[ServiceContract, Model(API_MODEL)] [ServiceContract, Model(API_MODEL)]
ILookupService = interface(IInvokable) ILookupService = interface(IInvokable)
['{F24E1468-5279-401F-A877-CD48B44F4416}'] ['{F24E1468-5279-401F-A877-CD48B44F4416}']
[HttpGet] function Search(phoneNum: string): TOrderList;
[HttpGet] function GetUsers(searchOptions: string): TUserList; [HttpGet] function GetUsers(searchOptions: string): TUserList;
[HttpGet] function GetItems(searchOptions: string): TItemList; [HttpGet] function GetItems(searchOptions: string): TItemList;
[HttpGet] function GetOrders(searchOptions: string): TOrderList; [HttpGet] function GetOrders(searchOptions: string): TOrderList;
[HttpGet] function GetOrder(orderInfo: string): TFullOrder; [HttpGet] function GetOrder(orderInfo: string): TFullOrder;
[HttpGet] function GetWebOrder(orderInfo: string): TWebOrder;
[HttpGet] function GetCustomers(): TCustomerList; [HttpGet] function GetCustomers(): TCustomerList;
[HttpGet] function GetCustomer(ID: string): TCustomerItem; [HttpGet] function GetCustomer(ID: string): TCustomerItem;
[HttpGet] function GenerateReportPDF(searchOptions: string): string; [HttpGet] function GenerateReportPDF(searchOptions: string): string;
...@@ -238,7 +347,9 @@ type ...@@ -238,7 +347,9 @@ type
function DelUser(username: string): string; function DelUser(username: string): string;
function EditUser(const editOptions: string): string; function EditUser(const editOptions: string): string;
function AddCorrugatedOrder(orderInfo: string): TJSONObject; function AddCorrugatedOrder(orderInfo: string): TJSONObject;
function AddWebOrder(orderInfo: string): TJSONObject;
function AddStatusSchedule(StatusType: string; order: TJSONObject; ORDER_ID: integer): string; function AddStatusSchedule(StatusType: string; order: TJSONObject; ORDER_ID: integer): string;
function SetStatus(statusOptions: string): string;
end; end;
implementation implementation
......
[Settings] [Settings]
MemoLogLevel=4 MemoLogLevel=4
FileLogLevel=5 FileLogLevel=5
LogFileNum=90 LogFileNum=146
webClientVersion=1.0.0 webClientVersion=1.0.0
[Database] [Database]
......
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