///
///
import { default as angular_2 } from 'angular';
import * as angular_3 from 'angular';
import { BubbleDataPoint } from 'chart.js';
import { ChartConfiguration } from 'chart.js';
import { ChartType } from 'chart.js';
import { ColumnDefinition } from 'tabulator-tables';
import { Editor } from 'tabulator-tables';
import { EventCallBackMethods } from 'tabulator-tables';
import { IQService } from 'angular';
import { ISCEService } from 'angular';
import { Options } from 'tabulator-tables';
import { ScatterDataPoint } from 'chart.js';
import { TabulatorFull } from 'tabulator-tables';
/** AbsenceCauseCode enumeration */
declare enum AbsenceCauseCode {
Undefined = "undefined",
UnpaidLeave = "unpaidLeave",
PersonalReason = "personalReason",
Illness = "illness",
PartTimeSickLeave = "partTimeSickLeave",
ParentalLeave = "parentalLeave",
SpecialMaternityLeave = "specialMaternityLeave",
Rehabilitation = "rehabilitation",
ChildIllness = "childIllness",
PartTimeChildCareLeave = "partTimeChildCareLeave",
Training = "training",
JobAlternationLeave = "jobAlternationLeave",
StudyLeave = "studyLeave",
IndustrialAction = "industrialAction",
InterruptionInWorkProvision = "interruptionInWorkProvision",
LeaveOfAbsence = "leaveOfAbsence",
MilitaryRefresherTraining = "militaryRefresherTraining",
MilitaryService = "militaryService",
LayOff = "layOff",
ChildCareLeave = "childCareLeave",
MidWeekHoliday = "midWeekHoliday",
AccruedHoliday = "accruedHoliday",
OccupationalAccident = "occupationalAccident",
AnnualLeave = "annualLeave",
PartTimeAbsenceDueToRehabilitation = "partTimeAbsenceDueToRehabilitation",
Other = "other"
}
/** Period of absence */
declare interface AbsencePeriod {
/** Identifies a single leave. */
id?: string | null;
/** Period for the absance. */
period?: DateRange_2 | null;
/** Cause / type of the absence */
causeCode?: AbsenceCauseCode | null;
/** If true, the absence is paid by the employer. */
isPaid?: boolean | null;
/** If true, annual leaves are accrued from the absence. If false, these days are deducted from the accrual.
By default, you may leave this null and it always follows the IsPaid. */
isHolidayAccrual?: boolean | null;
/** Amount of salary that is paid for the absense.
Currently not in use: Would be used in Incomes Register integration. */
amount?: number | null;
/** Additional information as recorded by the Employer. */
notes?: string | null;
/** Identifier in the source system is a key defined by a source system / partner system.
This is a pass-through string that is passed to the result calculations. */
sourceId?: string | null;
/** Number of Bonus days to be paid. This is applicable only for {Palkkaus.Model.Worktime.Absences.AbsenceCauseCode.AnnualLeave}AnnualLeave. */
bonusDaysCount?: number | null;
}
/**
* UI for the absences list (poissaolokirjanpito).
* @example
* ```html
*
* ```
*/
export declare class AbsencePeriods extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
condensed: string;
filterStart: string;
filterEnd: string;
/**
* UI for the absences list (poissaolokirjanpito).
* @example
* ```html
*
* ```
*/
parent: string;
onCommit: string;
onReset: string;
onStartEdit: string;
isInEdit: string;
mode: string;
};
/** Uses the AbsencePeriodsController */
controller: typeof AbsencePeriodsController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Controls the absences list (poissaolokirjanpito) for a selected holiday year.
*/
export declare class AbsencePeriodsController extends ListControllerBase {
/** Bindings for components that use this controller */
static bindings: AbsencePeriodsControllerBindings;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** If true, will format the table with class table-condensed. Later may add some other condensed formatting. */
condensed: boolean;
/** Date filter start value. Will be applied to period start dates. */
filterStart: string;
/** Date filter end value. Will be applied to period end dates. */
filterEnd: string;
constructor(uiHelpers: UiHelpers);
/** List of items */
get list(): AbsencePeriod[];
/** Maps WorkerAbsences to calendar series. */
mapToCalendar: (abs: WorkerAbsences_2) => CalendarSeries[];
/**
* Filter that is applied to the list
* @param value Item in the list
*/
filter: (value: AbsencePeriod) => boolean;
/** Creating of a new item. */
getBlank(): AbsencePeriod;
/** Template for edit UI that is shown in a modal dialog. */
getEditDialogTemplateUrl(): string;
/** Calendar is clicked => Show edit dialog accorging to calendar data. */
calendarClick(type: "event" | "day", date: string, event: CalendarUiEvent): void;
/** Gets the needed logic for Edit dialog */
getEditDialogLogic(): {
canSelectIsPaid: (current: AbsencePeriod) => boolean;
updateIsPaid: (current: AbsencePeriod) => void;
updateIsHolidayAccrual: (current: AbsencePeriod) => void;
updatePeriodDays: (current: AbsencePeriod) => void;
setDaysSelection: (period: AbsencePeriod) => void;
};
/** Gets a total days calculation for different types. */
getTotalDays(type?: "all" | "absencesPaid" | "absencesUnpaid" | "absencesHolidayAccrual" | "absencesNoHolidayAccrual"): number | null;
}
declare class AbsencePeriodsControllerBindings extends ListControllerBaseBindings {
/** If true, will format the table with class table-condensed. Later may add some other condensed formatting. */
condensed: string;
/** Date filter start value. Will be compared to period end date. */
filterStart: string;
/** Date filter end value. Will be compared to period start date. */
filterEnd: string;
}
/**
* Provides CRUD access for Absences of a Worker
*/
declare class Absences extends CrudApiBase {
/**
* For NG1-dependency injection
* @ignore
*/
static $inject: string[];
/** Base URL for details etc. */
protected baseUrl: string;
constructor(ajax: Ajax);
/** Client-side (synchronous) method for getting a new blank item as bases for UI binding. */
getBlank(employmentId?: string, workerId?: string): WorkerAbsences_2;
/**
* Gets all the Worker absences objects of specified year.
* @returns A Promise with result data: The full absences objects.
*/
getLatest(): Promise;
/**
* Gets the Absences for a specific employment relation.
* @param employmentId Identifier for the Employment relation.
* @returns A Promise with Absences.
*/
getForEmployment(employmentId: string): Promise;
/**
* Gets the Absences for the given employment relations.
* @param employmentIds Identifiers for the Employment relations.
* @returns A Promise with result data array.
*/
getForEmployments(employmentIds: string[]): Promise;
}
/**
* Payment Settings
* @example
* ```html
*
* ```
*/
export declare class Accountant extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/** If true, removing accountant is disabled */
removalDisabled: string;
};
/** Uses the AccountController */
controller: typeof AccountantController;
/** Default template is the view */
defaultTemplate: string;
}
/**
* Controller for the accountant settings.
*/
export declare class AccountantController implements angular_2.IController {
private ajax;
private settingsService;
private uiHelpers;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** if true, removing accountant is disabled */
removalDisabled: boolean;
constructor(ajax: Ajax, settingsService: SettingsService, uiHelpers: UiHelpers);
/**
* Returns current accountant.
*/
get accountant(): PrimaryPartnerSettings;
/** Returns accountant main type */
get accountantMainType(): "company" | "none";
/** Shows the edit dialog */
showEdit(removalDisabled?: boolean): Promise;
/** Removes pricing partner using confirmation dialog. */
showConfirmPartnerRemoval(): void;
/** Save current accountant. This mainly for email address. */
save(): Promise;
private getAccountantMainType;
}
/** Accountant details. */
declare interface AccountantInfo {
/** Avatar for the account */
avatar?: Avatar_2 | null;
/** Official id of the person or company. */
officialId?: string | null;
/** Email address. */
email?: string | null;
/** Telephone number. */
telephone?: string | null;
/** Bank account number (IBAN) */
ibanNumber?: string | null;
}
/** AccountantType enumeration */
declare enum AccountantType {
Unknown = "unknown",
UnlinkedPrimaryPartner = "unlinkedPrimaryPartner",
UnlinkedAccountingOnly = "unlinkedAccountingOnly",
PendingPrimaryPartner = "pendingPrimaryPartner",
PrimaryPartner = "primaryPartner",
None = "none"
}
/**
* Base controller for accountant wizard management.
*/
export declare class AccountantWizardController implements angular_2.IController {
private ajax;
private onboardingService;
private sessionService;
private uiHelpers;
private $location;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
constructor(ajax: Ajax, onboardingService: OnboardingService, sessionService: SessionService, uiHelpers: UiHelpers, $location: angular_2.ILocationService);
/** Opens wizard as modal dialog */
openAccountantWizardDialog(): Promise;
/** Launches company wizard. */
launchAccountantWizard(): Promise | undefined;
private readTokenFromUrl;
}
/**
* Handles user interaction for viewing and modifying authorized and authorizing accounts.
*/
export declare class AccountAuthorizationController extends CrudControllerBase {
private authorizedAccountService;
private sessionService;
private ajax;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** If true, the switch will be disabled and its value cannot be changed by clicking/toggling it */
disabled: boolean;
constructor(authorizedAccountService: AuthorizedAccountService, $location: angular.ILocationService, $attrs: angular.IAttributes, uiHelpers: UiHelpers, sessionService: SessionService, ajax: Ajax);
/**
* Returns the list of Integration partner sites available and the status of each partner.
*/
get partnerIntegrationSites(): any;
/**
* Gets a specific partner site for the current user
* @param id Identifier of the site
*/
getPartnerSite(id: string): any;
/**
* Returns the current partner site
*/
get currentPartnerSite(): any;
/**
* Shows a dialog for adding / removing authorizations from known partners that
* frequently require authorizations. These are typically integrated software
* that are added without Primary Partner flag.
* @param id - The id of the partner site for which the dialog is shown.
*/
showPartnerSiteDialog(id: string): void;
/** Toggles the authorization option and makes the corresponding api call. */
switchAuthorization(): void;
/**
* Returns the authorizing accounts for the current account
*/
get authorizingAccounts(): (PersonAccount | CompanyAccount)[];
/** Deletes the account. Only in test. */
deleteAccount(accountId: string): void;
/**
* Shows a dialog for adding any new authorized account.
*/
showAuthorizedAccountAddDialog(): void;
/** Adds authorized account */
saveCurrent(callback?: (avatar: AuthorizedAvatar) => void): Promise;
/**
* Adds access token to url.
* @param accountId - Account id to login as.
*/
getLoginAsUrl(accountId: any): string;
/**
* Checks whether the user is in a given role
* @param role - One of the known roles
*/
isInRole(role: any): boolean;
}
/**
* Shows account authorization and Credentials information including
* a link to Authorization document (digitally signed pdf) and
* type and UID (typically e-mail) of the current credentials.
* @example
* ```html
*
* ```
*/
export declare class AccountAuthorizationPerson extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to controller implementation
*/
bindings: {};
/** Uses the SessionController */
controller: typeof SessionController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Edit the avatar information: Picture upload, Initials + color or Gravatar.
* @example
* ```html
*
* ```
*/
export declare class AccountAvatarEdit extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {};
/** Uses the SessionController */
controller: typeof SessionController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Edit the avatar information: Picture upload, Initials + color or Gravatar.
* Currently used only in Personal accounts, but this could potentially be also
* used in Company side to edit Avatar?
* @example
* ```html
*
* ```
*/
export declare class AccountAvatarEditPerson extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/** Current person account. Optional */
current: string;
};
/** Uses the PersonAccountController */
controller: typeof PersonAccountController;
/** The default template for the component. */
defaultTemplate: string;
}
/** Account - either Person or Company - is a juridical entity Paying or receiving salaries, making contracts etc. It may be related to zero, one or multiple UserAccounts/Credentials. */
declare interface AccountBase {
/** Entity type of the account.
Type PersonCreatedByEmployer means that the Worker has not yet signed into the system and there may be multiple instances of the same logical person (Official ID) - one for each employer. */
entityType?: LegalEntityType | null;
/** If true the object Account is and Employer account - it has the EmployerInfo object */
isEmployer?: boolean | null;
/** If true the object Account is and Worker account - it has the WorkerInfo object */
isWorker?: boolean | null;
/** If true, the account has been verified. Typically this means a digitally signed contract.
This means that the account also has an Identity object.
However, as the Identity object contains confidential information, it is not necessarily present in all method calls. */
isVerified?: boolean | null;
/** Avatar is the visual representation of the Account. */
avatar?: Avatar_2 | null;
/** Contact information for the Account. */
contact?: Contact | null;
/** Language of the person/company. */
language?: Language | null;
/** Service model for the account. */
serviceModelId?: string | null;
/** Workflow data, which is exposed to API. */
workflowData?: WorkflowData | null;
/** Identifier of the object. */
id?: string | null;
/** The date when the object was created. */
createdAt?: string | null;
/** The time when the object was last updated.
Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */
updatedAt?: string | null;
/** Owner ID for this data */
owner?: string | null;
/** Indication that for the currently logged-in account, the data is generally read-only. */
isReadOnly?: boolean | null;
/** Primary partner information. Automatically updated from the storage container Partner. */
partner?: string | null;
}
/**
* Editing UI of Contact information for account.
* @example
* ```html
*
* ```
*/
export declare class AccountContactEdit extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {};
/** Uses the SessionController */
controller: typeof SessionController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Editing UI of Contact information for Personal account.
* @example
* ```html
*
* ```
*/
export declare class AccountContactEditPerson extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/** Current person account. Optional */
current: string;
};
/** Uses the PersonAccountController */
controller: typeof PersonAccountController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Editor for main identity data of Personal account: Names (currently opens a wizard),
* Personal ID (read-only) or IBAN (should require strong authentication).
* @example
* ```html
*
* ```
*/
export declare class AccountDetailsEditPerson extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/** Current person account. Optional */
current: string;
};
/** Uses the PersonAccountController */
controller: typeof PersonAccountController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Editor view for Person's contact and payment information,
* for example avatar, phone number and bank account number.
* @example
* ```html
*
* ```
*/
export declare class AccountDetailsPerson extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/** Current tab in initialization. If not set, will be fetched from url hash. */
currentTab: string;
};
/** Uses the PersonAccountController */
controller: typeof PersonAccountController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Simple presentation of Salaxy account info: employer and/or worker data
* @example
* ```html
*
* ```
*/
export declare class AccountInfo extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to controller implementation
*/
bindings: {};
/** Uses the SessionController */
controller: typeof SessionController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Quick basic information about the Person account: Avatar, name, phone and e-mail.
* The component may be bound with ng-model or if omitted binds to session current account.
* The component is currently for Personal acocunt only, but it could be generalized
* for companies as well.
* @example
* ```html
*
* ```
*/
export declare class AccountInfoPerson extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {};
/** ngModel may be used */
require: {
model: string;
};
/** Uses the SessionController */
controller: typeof SessionController;
/** The default template for the component. */
defaultTemplate: string;
}
/** AccountingChannel enumeration */
declare enum AccountingChannel {
Undefined = "undefined",
Procountor = "procountor",
VismaNetvisor = "vismaNetvisor",
VismaFivaldi = "vismaFivaldi"
}
/**
* Handles user interfaces for specifying settings for Payment Channels (and other payment related settings).
*/
export declare class AccountingChannelSettingsController implements angular_2.IController {
private settingsService;
private uiHelpers;
private sessionService;
private $http;
private ajax;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
private closeFn;
private static channelPaths;
constructor(settingsService: SettingsService, uiHelpers: UiHelpers, sessionService: SessionService, $http: angular_2.IHttpService, ajax: Ajax);
/**
* Controller initializations
*/
$onInit: () => void;
/**
* Returns true if the given accounting target item is an API integration type acccounting
* target.
* @param item The accounting target item
* @returns True or false.
*/
isApiIntegration(item: any): boolean;
/** Opens the channel setup dialog in a new window. */
openChannelSetupDialog(target: AccountingTargetSettings_2, closeFn: (string: any) => any): void;
/**
* Loads the chart of accounts from the channel.
* @param target Accounting target.
* @param closeFn $close function to call.
*/
configureCoa(target: AccountingTargetSettings_2, closeFn: (string: any) => any): Promise;
private loadCoaFromChannel;
private getAccountingTargetSettingsUrl;
private getExternalDialogConfigByTarget;
private getCoaUrl;
private handleExternalDialogReturnData;
private saveSettings;
private findAccountingTargetFromCompanySettings;
private isAdmin;
}
/** Accounting data for reports. */
declare interface AccountingData {
/** All ledgers. */
ledgerAccounts?: LedgerAccount[] | null;
/** Basic information and visualization for the accounting target.
Avatar provides the visualization and the name for the target.
E-mail may be used in sending of the material and telephone in contacting the accounting target.
IBAN number has no use. */
target?: AccountInIndex | null;
/** The default export format for tabular (csv, excel) data. */
format?: string | null;
/** Finnish Business Identifier (Y-tunnus) for the company. */
officialId?: string | null;
/** Employer avatar */
employer?: Avatar_2 | null;
/** Contact information for the report. Typically the employer, but may be something else. */
contact?: Contact | null;
/** Period for the report. */
period?: DateRange_2 | null;
/** Summary containing relevant numbers for the report. For example,
number of calculations, gross and net amounts, payment amounts and Palkkaus fee. */
summary?: AccountingDataSummary | null;
}
/** Summary of the accounting data. Contains main figures: totals and workers and employer total figures. */
declare interface AccountingDataSummary {
/** The total number of calculations included in the report. */
calculationCount?: number | null;
/** The total number of distinct workers included in the report. */
workerCount?: number | null;
/** Total gross salary of the calculations included in the report. */
readonly totalGrossSalary?: number | null;
/** Total payment of the calculations included in the report. */
readonly totalPayment?: number | null;
/** Calculation totals that are common to both Worker and Employer. */
totals?: TotalCalculationDTO | null;
/** The calculation from the Employer point-of-view */
employerCalc?: EmployerCalculationDTO | null;
/** The calculation from the Worker point-of-view */
workerCalc?: WorkerCalculationDTO | null;
/** Calculation totals of accrued total holiday pay and related sidecosts. */
holidayCalc?: HolidayCalculationDTO | null;
/** Validation messages for the accounting data. */
validation?: ApiValidation | null;
}
/** The holiday pay debt data report based on given holiday years. */
declare interface AccountingHolidayPayDebtReportData {
/** Finnish Business Identifier (Y-tunnus) for the company. */
officialId?: string | null;
/** Employer avatar */
employer?: Avatar_2 | null;
/** Contact information for the report. Typically the employer, but may be something else. */
contact?: Contact | null;
/** Period for the report. */
period?: DateRange_2 | null;
/** Calculated totals of accrued total holiday pay and related sidecosts. */
holidayCalc?: HolidayCalculationDTO | null;
/** Individual holiday years and their debt data included in the report. */
holidayYears?: AccountingHolidayPayDebtReportDataYear[] | null;
}
/** Individual holiday year with the debt data. */
declare interface AccountingHolidayPayDebtReportDataYear {
/** Holiday year for which the debt is calculated. */
holidayYear?: HolidayYear | null;
/** Calculation totals of accrued total holiday pay and related sidecosts. */
holidayCalc?: HolidayCalculationDTO | null;
}
/**
* Shows the accounting holiday debt report builder for ad hoc reporting queries.
* @example
* ```html
*
* ```
*/
export declare class AccountingHolidayPayDebtReportQuery extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/**
* Report view table only (partial) or pdf preview (full)
* Defaults to 'partial'
*/
view: string;
/** The language for report*/
lang: string;
};
/** Uses the AccountingReportQueryController */
controller: typeof AccountingHolidayPayDebtReportQueryController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Provides functionality for building ad hoc accounting holiday pay debt reports.
*/
export declare class AccountingHolidayPayDebtReportQueryController implements angular_2.IController {
private reportsApi;
private uiHelpers;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/**
* Report view table only (partial) or pdf preview (full)
* Defaults to 'partial'
*/
view: "partial" | "full";
/** Ref date to which the debt is calculated. */
refDate: string;
/** Accounting data */
data: AccountingData;
/**Selected report language */
lang: string;
/** Data reader for the control. */
dataReader: {
/**
* Function to read data into given array
*/
read: (target: string, ruleSet: string, arr: AccountingData[], message: string) => Promise;
/** Optional label for data export */
exportLabel: null;
/** Indicates if the export is not possible */
disabled: () => boolean;
showExpand: boolean;
hasRows: () => boolean;
};
constructor(reportsApi: Reports, uiHelpers: UiHelpers);
/**
* Initialize controller values.
*/
$onInit(): void;
/** Queries the report data. */
queryData(target?: string): void;
}
/** AccountingPeriodClosingOption enumeration */
declare enum AccountingPeriodClosingOption {
Default = "default",
Accounting = "accounting",
PeriodicInvoices = "periodicInvoices",
AccountingAndPeriodicInvoices = "accountingAndPeriodicInvoices",
IrReports = "irReports",
AccountingAndIrReports = "accountingAndIrReports",
PeriodicInvoicesAndIrReports = "periodicInvoicesAndIrReports",
AccountingAndPeriodicInvoicesAndIrReports = "accountingAndPeriodicInvoicesAndIrReports"
}
/** First version of the product that integrates the Palkkaus.fi-salary payments to employers accounting. */
declare interface AccountingProduct {
readonly status?: string | null;
accountantName?: string | null;
accountantEmail?: string | null;
accountantPhone?: string | null;
/** Enabled property set automatically by AccountantName, AccountantEmail and AccountantPhone. */
enabled?: boolean | null;
/** Identifier for the product */
readonly id?: string | null;
/** The main short title for the product / service */
readonly title?: string | null;
/** One paragraph description text */
readonly description?: string | null;
/** The logo image for the product. */
readonly img?: string | null;
/** Identifier for the main product desription article in the Palkkaus.fi CMS */
readonly articleId?: string | null;
/** If false, it is not bossible to enable this product for the current account / environment.
Typically, this means that the UI should not show this product. */
visible?: boolean | null;
/** Indicates (true-value) if the end user has confirmed the product options.
If false, the end user has not confirmed the option. */
visited?: boolean | null;
}
/**
* The new ApiCrudObject type of CRUD controller for the BlobFile of the accounting report.
*/
export declare class AccountingReportCrudController extends ApiCrudObjectController {
private filesApi;
private reportsApi;
private $timeout;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** Default query options for panel */
panelQueryOptions: {
$filter: string;
$orderby: string;
$top: number;
};
/** Data reader for selected items. */
selectionDataReader: {
/** Function to read data into given array */
read: (target: string, ruleSet: string, arr: AccountingData[], message: string) => Promise;
/** Optional label for data export */
exportLabel: string;
/** Indicates if the export is not possible */
disabled: () => boolean;
showExpand: boolean;
hasRows: () => boolean;
};
/** Data reader for the current loaded data. */
currentDataReader: {
/** Function to read data into given array */
read: (target: string, ruleSet: string, arr: AccountingData[], message: string) => Promise;
/** Optional label for data export */
exportLabel: null;
/** Indicates if the export is not possible */
disabled: () => boolean;
showExpand: boolean;
hasRows: () => boolean;
};
/** Status for current data . */
private currentDataStatus;
private _currentData;
private logicalDate;
constructor(filesApi: Files, reportsApi: Reports, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any, $timeout: angular_2.ITimeoutService);
/**
* Initialization code.
*/
$onInit(): void;
/** Implements the getDefaults of ApiCrudObjectController */
getDefaults(): {
listUrl: string;
detailsUrl: string;
oDataTemplateUrl: string;
oDataOptions: {};
};
/** Returns OData filter. */
getODataFilter: () => string;
/** Data reader for one item. */
getItemDataReader: (item: {
/** List item id */
id: string;
/** List item owner */
owner: string;
}) => {
/** Function to read data into given array */
read: (target: string, ruleSet: string, arr: AccountingData[], message: string) => Promise;
/** Optional label for data export */
exportLabel: null;
/** Indicates if the export is not possible */
disabled: () => boolean;
showExpand: boolean;
hasRows: boolean;
};
/** Event handler for logical date. */
logicalDateChanged(): void;
/** Unselect all */
unselectAll(): void;
/** Select all */
selectAll(): void;
/** Accounting data of the current item. */
get currentData(): AccountingData;
/** Load current data */
loadCurrentData(targetId?: string): void;
private setWorkflowEvent;
}
/** Settings for Accounting report delivery. */
declare interface AccountingReportDelivery {
/** If true, the delivery is active. */
isEnabled?: boolean | null;
/** Address for delivery. Currently only email supported. */
address?: string | null;
}
/**
* Handles user interaction for displaying accounting report
*/
export declare class AccountingReportDisplayController implements angular_2.IController {
private uiHelpers;
private reports;
static $inject: string[];
/**
* Creates a new instance of AccountingReportDisplayController
* @param uiHelpers - Salaxy ui helpers service.
*/
constructor(uiHelpers: UiHelpers, reports: Reports);
/**
* Display accounting report
* @param refDate date
*/
display(refDate: string): void;
}
/**
* Shows a list of accounting reports.
* @example
* ```html
*
* ```
*/
export declare class AccountingReportList extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/**
* list view 'mode'.
* If undefined, defaults to full list.
* Use panel for dashboards etc.
*/
mode: string;
};
/** Uses the AccountingReportCrudController */
controller: typeof AccountingReportCrudController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Shows the accounting report builder for ad hoc reporting queries.
* @example
* ```html
*
* ```
*/
export declare class AccountingReportQuery extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/**
* Specify the calculations that should be reported.
* If null, will show a user interface to select calculations or period.
*/
calcs: string;
/**
* Report view table only (partial) or pdf preview (full)
* Defaults to 'partial'
*/
view: string;
/** The language for report*/
lang: string;
};
/** Uses the AccountingReportQueryController */
controller: typeof AccountingReportQueryController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Provides functionality for building ad hoc accounting reports.
*/
export declare class AccountingReportQueryController implements angular_2.IController {
private reportsApi;
private uiHelpers;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/**
* Report view table only (partial) or pdf preview (full)
* Defaults to 'partial'
*/
view: "partial" | "full";
/** Query type: Query period or set of id's from database or calcs to specify the calculations. */
queryType: "periodQuery" | "selectionQuery" | "calcs";
/** Period type for the query. */
periodType: PeriodType;
/** Period date kind for the query. */
periodDateKind: PeriodDateKind;
/** Ref date for the period. */
refDate?: string;
/** End date for the custom period. */
endDate?: string;
/** Accounting data */
data: AccountingData;
/**Selected report language */
lang: string;
/**
* Calculations that are selected by used to show be fetched and shown in reports.
* Only the ID is really used: the rest of the calculation data is fetched from database.
*/
calculations: CalculationListItem[];
/**
* Calculations that are shown in the database directly.
* If set, will hide the query interface and set queryType accordingly (only in init).
*/
calcs: Calculation[];
/** Data reader for the control. */
dataReader: {
/**
* Function to read data into given array
* TODO: Should make interface for this or otherwise go-through.
*/
read: (target: string, ruleSet: string, arr: AccountingData[], message: string) => Promise;
/** Optional label for data export */
exportLabel: null;
/** Indicates if the export is not possible */
disabled: () => boolean;
showExpand: boolean;
hasRows: () => boolean;
};
constructor(reportsApi: Reports, uiHelpers: UiHelpers);
/**
* Initialize controller values.
*/
$onInit(): void;
/**
* Opens the list of calculations into a dialog window for selection and then adds them to the selected calculations
* @param category Either "paid" or "draft".
*/
addCalcs(category?: "paid" | "draft"): void;
/** Removes the selected calculation from the calculations list. */
removeCalc(calculation: any): void;
/** Queries the report data. */
queryData(target?: string): void;
}
/** Accounting report table row. */
declare interface AccountingReportRow {
/** Row type. Default is the Booking. */
rowType?: AccountingReportRowType | null;
/** Amount for the row: May be positive or negative(depending on the depet/credit and account type). */
amount?: number | null;
/** Percentage of the value added tax that is included in the amount. */
vatPercent?: number | null;
/** Proposed account number for the row. */
accountNumber?: string | null;
/** Proposed account text for the row. */
accountText?: string | null;
/** Returns product code. */
productCode?: string | null;
/** Returns product name. (Code or ResultCode in this order). */
productName?: string | null;
/** Text for the booking entry / header. */
text?: string | null;
/** Space separated set of class names for CSS styling purposes. */
styles?: string | null;
/** Count of units. Default is 1. */
count?: number | null;
/** Price for the unit. */
price?: number | null;
/** Unit identifier; */
unit?: string | null;
/** Additional information for the row. */
additionalInformation?: string | null;
}
/**
* Shows the rows of the accounting report.
* @example
* ```html
*
* ```
*/
export declare class AccountingReportRows extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/** Accounting data */
data: string;
/**
* Report view table only (partial) or pdf preview (full)
* Defaults to 'partial'
*/
view: string;
/** The language for report*/
lang: string;
};
/** Uses the AccountingReportRowsController */
controller: typeof AccountingReportRowsController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Provides functionality to show report rows.
*/
export declare class AccountingReportRowsController implements angular_2.IController {
private templates;
private $sce;
private settingsService;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/**
* Report view table only (partial) or pdf preview (full)
* Defaults to 'partial'
*/
view: "partial" | "full";
/** Accounting data */
data: AccountingData;
/** Boolean indicating if the refresh is in progress. */
refreshInprogress: boolean;
/**Selected report language */
lang: string;
/** Trusted language used in html */
calcLang: string;
private renderedData;
private reportOptions;
private renderedLang;
private reportData;
private htmlData;
constructor(templates: Templates, $sce: angular_2.ISCEService, settingsService: SettingsService);
/**
* Initialize controller values.
*/
$onInit(): void;
/** Expand/close all nodes */
expand(close?: boolean): void;
/** Returns true if at least one account is toggled */
get anyExpanded(): boolean;
/** Bindable and trusted html. */
get html(): any;
/**
* Refresh calculation report data.
*/
private refresh;
private getDefaultReportOptions;
}
/** AccountingReportRowType enumeration */
declare enum AccountingReportRowType {
Debit = "debit",
Credit = "credit",
Total = "total",
GroupHeader = "groupHeader",
GroupTotal = "groupTotal",
ChildRow = "childRow"
}
/** Contains accounting rows for one or many calculations. */
declare interface AccountingReportTable {
/** All rows in the report table. */
rows?: AccountingReportRow[] | null;
/** Accounting report table type. */
tableType?: AccountingReportTableType | null;
/** Finnish Business Identifier (Y-tunnus) for the company. */
businessId?: string | null;
/** Employer avatar */
employer?: Avatar_2 | null;
/** Contact information for the report. Typically the employer, but may be something else. */
contact?: Contact | null;
/** Period for the report. */
period?: DateRange_2 | null;
/** Summary containing relevant numbers for the report. For example,
number of calculations, gross and net amounts, payment amounts and Palkkaus fee. */
summary?: AccountingReportTableSummary | null;
}
/** Summary of the accounting report. Contains main figures: totals and workers and employer total figures. */
declare interface AccountingReportTableSummary {
/** The total number of calculations included in the report. */
count?: number | null;
/** Calculation totals that are common to both Worker and Employer. */
totals?: TotalCalculationDTO | null;
/** The calculation from the Employer point-of-view */
employerCalc?: EmployerCalculationDTO | null;
/** The calculation from the Worker point-of-view */
workerCalc?: WorkerCalculationDTO | null;
}
/** AccountingReportTableType enumeration */
declare enum AccountingReportTableType {
Classic = "classic",
Simple = "simple",
Mapped = "mapped"
}
/**
* Shows the export tools for the accounting report.
* @example
* ```html
*
* ```
*/
export declare class AccountingReportTools extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/** Reference to the data reader object. */
reader: string;
/** Called when the target has been changed. */
onTargetChange: string;
/** Called when the expand button state changed */
onExpandChange: string;
/** Binded expand state*/
anyExpanded: string;
/**
* Report view table only (partial) or pdf preview (full)
* Defaults to 'partial'
*/
view: string;
};
/** Uses the AccountingReportToolsController */
controller: typeof AccountingReportToolsController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Provides functionality to export accounting data in various formats.
*/
export declare class AccountingReportToolsController implements angular_2.IController {
private uiHelpers;
private $timeout;
private settingsService;
private sessionService;
private $location;
private $http;
private ajax;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** Locale for exports */
localeId: string;
/**
* Supported locales for exports
* TODO: This could be replaced with Culture enum directly in the UI.
*/
locales: {
/** Locale id */
id: string;
/** Locale label */
label: string;
/** Local description */
description: string;
}[];
/** Size of the data export */
schemeId: string;
/** Export format */
exportMethod: string;
/** Supported export formats */
private _exportMethods;
/** Export target */
targetId: string;
/** Targets */
targets: any[];
/**
* Object with read function to call for retrieving the accounting data.
* Function has the following argument: arr, which is an array of accounting data into which the result will be appended.
*/
reader: {
/** Function for reading data into given array. */
read: (
/** Target for accounting data */
target: string,
/** RuleSet for accounting data */
ruleSet: string,
/** Array for accounting data read results */
arr: AccountingData[],
/** Message for workflow (loading) */
message: string) => Promise;
/** Optional label for data export */
exportLabel?: string;
/** Indicates if the export is not possible */
disabled: () => boolean;
showExpand: boolean;
hasRows: boolean;
};
/**
* Indicator for any expanded row
*/
anyExpanded: boolean;
/**
* Report view table only (partial) or pdf preview (full)
* Defaults to 'partial'
*/
view: "partial" | "full";
/**
* Function that is called when the target has been changed
* Function has the following locals: targetId: the selected accounting target id.
*/
onTargetChange: (params: {
/** Selected target id */
targetId: any;
}) => void;
/**
* Function that is called when row expand change
*/
onExpandChange: (params: {
/** Selected target id */
close: boolean;
}) => void;
/** Supported targets */
private targetOptions;
private defaultOption;
private static channelBasePaths;
constructor(uiHelpers: UiHelpers, $timeout: angular_2.ITimeoutService, settingsService: SettingsService, sessionService: SessionService, $location: angular_2.ILocationService, $http: angular_2.IHttpService, ajax: Ajax);
/**
* Initialize controller values.
*/
$onInit(): void;
/** Exports data in defined format. */
export(reader?: {
/** Function for reading data into given array. */
read: (
/** Target for accounting data */
target: string,
/** RuleSet for accounting data */
ruleSet: string,
/** Array for accounting data read results */
arr: AccountingData[],
/** Workflow loading message */
message: string) => Promise;
/** Optional label for data export */
exportLabel?: string;
/** Indicates if the export is not possible */
disabled: () => boolean;
showExpand: boolean;
hasRows: boolean;
},
/** If true, does not show loading indicator. Default is false. */
hideLoading?: boolean): Promise;
/** Navigates to given path and closes possible open modal dialogs. */
navigate(path: string): void;
/**
* Change target and call event handler.
* @param targetId - New target id.
*/
changeTarget(targetId: string): void;
/**
* Returns the export methods that are available for the accounting target.
*/
get exportMethods(): {
/** File type id */
id: string;
/** File type label */
label: string;
/** Boolean indicating if the file type supports different locales */
hasLocales: boolean;
/** Workflow message after export */
workflowMessage: any;
}[];
/**
* Returns the export method type definition
* @param exportMethodId export method id
*/
getExportMethod(exportMethodId: string): {
/** File type id */
id: string;
/** File type label */
label: string;
/** Boolean indicating if the file type supports different locales */
hasLocales: boolean;
/** Workflow message after export */
workflowMessage: any;
} | undefined;
/**
* Returns the target definition
* @param targetId Target id.
*/
getTarget(targetId: string): any;
/**
* Returns the locale definition
* @param localeId Locale id.
*/
getLocale(localeId: string): {
/** Locale id */
id: string;
/** Locale label */
label: string;
/** Local description */
description: string;
} | undefined;
/**
* Returns the scheme definition.
* @param schemeId Scheme id.
*/
getScheme(schemeId: string): any;
private setExportMethod;
/**
* Method for calling onExpandChange event
* @param close If true, closes the expanding component.
*/
expand(close?: boolean): void;
private getFileName;
private getZipName;
private getWorkflowMessage;
private getCsv;
private getText;
private getPdf;
private getTabbed;
private formatRow;
private formatField;
private copyToClipboard;
private sendToApi;
private getAccountingDataUrl;
private getAccountingDataError;
private getAccountingDataResult;
private getAccountingDataPreviewTemplate;
}
/**
* Shows the accounting report viewer for the pre-built reports.
* @example
* ```html
*
* ```
*/
export declare class AccountingReportViewer extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: ApiCrudObjectControllerBindings;
/** Uses the AccountingReportCrudController */
controller: typeof AccountingReportCrudController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Shows the rows report builder for ad hoc accounting row based reports.
* @example
* ```html
*
* ```
*/
export declare class AccountingRowReport extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/** Template for the report */
templateId: string;
};
/** Uses the AccountngRowReportController */
controller: typeof AccountingRowReportController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Controller for accounting row based reports.
*/
export declare class AccountingRowReportController extends ConfigurableGridReportControllerBase {
private reports;
private $timeout;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** Usecase uri for report templates */
usecaseUri: string;
/** Current grid options. */
gridOptions: any;
/** ID for the element containing grid. */
gridElmentId: string;
/** Default templates */
defaultTemplates: ({
id: string;
owner: null;
label: string;
config: null;
isReadOnly: boolean;
avatar: {
initials: string;
entityType: LegalEntityType;
color: string;
};
} | {
id: string;
owner: null;
label: string;
config: {
isPivotMode: boolean;
};
isReadOnly: boolean;
avatar: {
initials: string;
entityType: LegalEntityType;
color: string;
};
})[];
private entryCodeGroups;
private entryCodes;
constructor(datasets: Datasets, uiHelpers: UiHelpers, sessionService: SessionService, reports: Reports, $timeout: angular_2.ITimeoutService);
/**
* Initialize controller values.
*/
$onInit(): void;
/**
* Processes and sets the data.
*/
setData(result: AccountingRowReportData): void;
private getEntryCodeGroupName;
private getEntryCodeName;
/**
* Gets the monthly / quarterly / yearly accounitng row data for the current account.
* @param refDate Reference date for the period. Please note that even if the date is not the first day of the given period, the entire period is returned.
* @param periodType Month, quarter, year or a custom period. The custom period requires endDate. Default value is the month.
* @param endDate End date for the period. Required only for the custom period.
* @param periodDateKind Period date type: paid at date, salary date or work date.
* @param workers List of worker official ids.
* @returns A Promise with result data.
*/
queryDataForPeriod(refDate: string, periodType?: PeriodType | "all", endDate?: string, periodDateKind?: PeriodDateKind, workers?: string[]): Promise;
/**
* Gets the accounting row data based on given set of calculations.
* @param calculationIds - Calculations that are the bases for the report.
* @returns A Promise with result data.
*/
queryDataForCalculationIds(calculationIds: string[]): Promise;
private createHolidaysPreset;
private createPresetCol;
}
/** Container for accounting based report data. */
declare interface AccountingRowReportData {
/** Report row created from accounting base rows. */
rows?: AccountingRowReportDataRow[] | null;
/** Finnish Business Identifier (Y-tunnus) for the company. */
officialId?: string | null;
/** Employer avatar */
employer?: Avatar_2 | null;
/** Contact information for the report. Typically the employer, but may be something else. */
contact?: Contact | null;
/** Period for the report. */
period?: DateRange_2 | null;
/** Summary containing relevant numbers for the report. For example,
number of calculations, gross and net amounts, payment amounts and Palkkaus fee. */
summary?: AccountingDataSummary | null;
}
/** Report row created from accounting base row data. */
declare interface AccountingRowReportDataRow {
/** Entry group: income type or total type */
entryCodeGroup?: string | null;
/** A single code in the code group: single income type code or total row. */
entryCode?: string | null;
/** Entry date. */
entryDate?: string | null;
/** Entry description. */
message?: string | null;
/** Posted amount. Includes VAT. */
amount?: number | null;
/** VAT percent. */
vatPercent?: number | null;
/** VAT amount of specific VAT rate. */
vatAmount?: number | null;
/** Applied VAT rate. This is always mandatory. */
vatRate?: VatRate | null;
/** Dimension data. */
dimension?: {
[key: string]: any;
} | null;
/** Additional flags for directing the logic for creating accounting entry based on given entries. */
flags?: string[] | null;
}
/** Ruleset containing required tabular logic (rules) and accounts for creating accounting entries. */
declare interface AccountingRuleSet {
/** Template to which this ruleset is based on. */
templateId?: string | null;
/** Accounts which are used in the tabular logic for creating accounting entries. */
accounts?: AccountingRuleSetAccount[] | null;
/** Optional target Chart of Accounts: All the accounts in the target system, not just the ones in use. */
targetCoA?: AccountingRuleSetAccount[] | null;
/** Tabular logic for creating accounting entries. */
rows?: AccountingRuleSetRow[] | null;
}
/** Single account with number, grouping and default text. */
declare interface AccountingRuleSetAccount {
/** Id for the account. */
id?: string | null;
/** Boolean indicating if the account is non-removable template. */
isReadOnly?: boolean | null;
/** Account number. */
account?: string | null;
/** Text for the account. */
text?: string | null;
}
/** Contains a single row of the tabular logic for creating accounting entries. */
declare interface AccountingRuleSetRow {
/** Id for the row. */
id?: string | null;
/** Entry group: income type or total type. */
entryCodeGroup?: string | null;
/** A single code in the code group: single income type code or total row type. */
entryCode?: string | null;
/** Boolean indicating if the row is non-removable template. */
isReadOnly?: boolean | null;
/** Boolean indicating if the row is in use. */
enabled?: boolean | null;
/** Boolean indicating whether the system should make an accounting entry based on this row. */
isIncluded?: boolean | null;
/** Id of the debit account. */
debitId?: string | null;
/** Grouping text for the account.
If the account has a grouping defined, it will be listed as a separate row group. */
debitGrouping?: string | null;
/** Id of the credit account. */
creditId?: string | null;
/** Grouping text for the account.
If the account has a grouping defined, it will be listed as a separate row group. */
creditGrouping?: string | null;
/** Additional flags for directing the logic for creating accounting entry based on given entries. */
flags?: string[] | null;
}
/**
* Accounting settings.
* @example
* ```html
*
* ```
*/
export declare class AccountingSettings extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {};
/** Uses the CompanySettingsController */
controller: typeof CompanySettingsController;
/** Default template is the view */
defaultTemplate: string;
}
/** Settings related to Accounting */
declare interface AccountingSettings_2 {
/** If true, the service model is not applied to this feature. */
denyServiceModel?: boolean | null;
/** Default accounting target. */
defaultTargetId?: string | null;
/** Accounting target systems and the rulesets assigned to them. */
targets?: AccountingTargetSettings_2[] | null;
/** Default period selection method: PaidAt date (paid by employer), Salary date (paid to worker) or Work date (work done). The default is PaidAt date. */
defaultPeriodDateKind?: PeriodDateKind | null;
/** Options for accounting report delivery for the company.
These are not affected by the service model. */
reportDelivery?: AccountingReportDelivery | null;
/** Options for accounting report delivery for the Accountant.
These are not affected by the service model. */
accountantReportDelivery?: AccountingReportDelivery | null;
}
/** Defines an accounting target (system), CoA and ruleset that maps the calculation to the CoA (Chart of Accounts). */
declare interface AccountingTarget {
/** Information and configuration related to the system where the accounting data is to be sent. */
info?: AccountingTargetInfo | null;
/** The rule set that defines the Chart of Accounts and the mapping of salary payment to it. */
ruleSet?: AccountingRuleSet | null;
/** Readonly workflow data, which is exposed to API. */
workflowData?: WorkflowData | null;
/** Identifier of the object. */
id?: string | null;
/** The date when the object was created. */
createdAt?: string | null;
/** The time when the object was last updated.
Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */
updatedAt?: string | null;
/** Owner ID for this data */
owner?: string | null;
/** Indication that for the currently logged-in account, the data is generally read-only. */
isReadOnly?: boolean | null;
/** Primary partner information. Automatically updated from the storage container Partner. */
partner?: string | null;
}
/**
* UI logic for viewing and adding new (modifying) accounting targets.
* Accounting targets define where the accounting data is sent and how it is mapped to a Chart of Accounts (CoA)
*/
export declare class AccountingTargetCrudController extends ApiCrudObjectController {
private fullApi;
private sessionService;
private $timeout;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** If the current item is based on template, it should be here once loaded from server. */
template: AccountingTarget;
/** import data */
rawData: string | null;
fileExtension: string | null;
accountFilter: string;
showDistinct: boolean;
optionTypes: never[];
private entryCodeGroups;
private totalTypes;
private incomeTypes;
constructor(fullApi: AccountingTargets, sessionService: SessionService, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any, $timeout: angular_2.ITimeoutService);
/**
* Implement IController
*/
$onInit(): void;
/** Implements the getDefaults of ApiCrudObjectController */
getDefaults(): {
listUrl: string;
detailsUrl: string;
oDataTemplateUrl: string;
oDataOptions: {};
};
/**
* Additional setup after the item has been loaded.
* @param item Item that has been loaded
*/
setCurrentRef(item: AccountingTarget): void;
/**
* Shows the detail view for the item.
* Supports viewing public items from other users as read-only.
* @param item Item may be either Container or list item.
*/
showDetails(item: AccountingTargetListItem | AccountingTarget): angular_2.ILocationService;
/** Gets entry description */
getEntryDescription(row: AccountingRuleSetRow): string;
/** Selects entry */
selectEntry(row: AccountingRuleSetRow): void;
/**
* Shows the detail view with a new item that is a copy of the given item.
* Please note that this method supports copying public items from other users. Override is required because the default cannoty copy from other users
* @param item Item may be either Container or list item.
*/
showCopyAsNew(item: AccountingTargetListItem | AccountingTarget): angular_2.ILocationService;
/**
* Creates a copy of the current set
* Changes the settings so that the accounting target becomes a new item
* @param copySource Item (container item) to copy as new.
*/
copyItem(copySource: AccountingTarget): AccountingTarget;
/** Selects the account */
selectAccount(row: AccountingRuleSetRow, isCredit: boolean): void;
/**
* Sets selectedAccount
* @param selectedAccount selectedAccount
*/
selectTargetAccount(selectedAccount: AccountingRuleSetAccount): void;
/** Return targetCoA */
get hasTargetCoA(): boolean;
private groupBy;
/** Gets the ruleset rouws grouped by account and grouping */
get groupedRows(): {
[key: string]: AccountingRuleSetRow[];
};
/**
* Get rows based on current ruleSet, account and isDebet
* @param account iterated account from current.ruleSet.accounts
* @param isDebet indicates if debet or credit account
*/
getRulesetByAccount(account: AccountingRuleSetAccount, isDebet: boolean): AccountingRuleSetRow[];
/** Returns account details */
getAccount(id: string): AccountingRuleSetAccount | undefined;
/** Adds new account */
addAccount(addToEnd?: boolean): void;
/**
* Add new account to TargetCoA
* @param addToEnd tells if adds to end of array or not
*/
addTargetCoaAccount(addToEnd?: boolean): void;
/** Removes the account */
removeAccount(row: AccountingRuleSetAccount, removeFromTargetCoa?: boolean): void;
/**
* Validated row input
* @param row Row to be validated
*/
isValidAccount(row: AccountingRuleSetAccount): boolean;
/** Adds a new row */
addRow(row: AccountingRuleSetRow, addToStart?: boolean): void;
/** Removes the row */
removeRow(row: AccountingRuleSetRow): void;
/** Selects flags */
selectFlags(row: AccountingRuleSetRow): void;
/** Paste data from clipboard. */
pasteFromClipboard(): Promise;
/**
* Reads the file
* @param file Selected file
*/
readFile(file: File): Promise;
/**
* Import data
*/
import(): void;
/**
* Sort accounts
*/
sortRulesetAccounts(): void;
/**
* Updates ruleSet account with provided targetCoA account
* @param targetCoaAccount targetCoA account
*/
updateRuleSetAccount(targetCoaAccount: AccountingRuleSetAccount): void;
/**
* Updates provided account text to match targetCoa account
* @param rulesetAccount ruleSet account
*/
updateAccountToMatchTargetCoa(rulesetAccount: AccountingRuleSetAccount): void;
/**
* Return account text to ui
*/
get accountFilterText(): "SALAXY.NG1.AccountingTargetDetailsComponent.filters.all" | "SALAXY.NG1.AccountingTargetDetailsComponent.filters.includedAndEnabled" | "SALAXY.NG1.AccountingTargetDetailsComponent.filters.error" | undefined;
/**
* Filter accounts
*/
get filteredAccounts(): AccountingRuleSetAccount[];
/**
* Get accounting rules acount for distinct view
* @param account account id
* @returns rules count as number
*/
getRulesCount(account: string): number;
/** Returns flag text */
getFlagText(flag: string): {
found: boolean;
text: string;
};
/**
* Created distinct object array with account key
*/
get distinctAccounts(): AccountingRuleSetAccount[];
/**
* Acount number of digits in account candidate
*/
private countDigits;
/**
* Validated generated Tables data
* @returns is TableData valid
*/
private validateTableData;
private newGuid;
private legacyFlags;
private getCalculationRowTypeLabel;
}
/** Accounting Target specific business data for index. */
declare interface AccountingTargetData {
/** Contains the email or id of the responsible for the partner workflow event. */
partnerMessageAssignedTo?: string | null;
/** Channel is the technical transport mechanism to accounting software */
channel?: AccountingChannel | null;
/** The default export method for exports: whether automatic or manual. */
method?: ExportMethod | null;
/** Available methods in manual exports (comma separated string). */
availableMethods?: string | null;
/** The default export format for tabular (csv, excel) data. */
format?: string | null;
/** Template to which this is based on. */
templateId?: string | null;
}
/**
* Provides UI for viewing and adding new (modifying) accounting targets.
* Accounting targets define where the accounting data is sent and how it is mapped to a Chart of Accounts (CoA)
* @example
* ```html
*
* ```
*/
export declare class AccountingTargetDetails extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: ApiCrudObjectControllerBindings;
/** Uses the AccountController */
controller: typeof AccountingTargetCrudController;
/** Default template is the view */
defaultTemplate: string;
}
/** Specifies the general information of the behavior of Accounting target: Especially the channel and the related properties. */
declare interface AccountingTargetInfo {
/** Basic information and visualization for the accounting target.
Avatar provides the visualization and the name for the target.
E-mail may be used in sending of the material and telephone in contacting the accounting target.
IBAN number has no use. */
target?: AccountInIndex | null;
/** Channel is the technical transport mechanism to accounting software */
channel?: AccountingChannel | null;
/** The default export method for exports: whether automatic or manual. */
method?: ExportMethod | null;
/** If specified, defines the available methods in manual exports. */
availableMethods?: ExportMethod[] | null;
/** The default export format for tabular (csv, excel) data. */
format?: string | null;
/** Accounting channel specific data (default settings) for the accounting target setup. */
data?: {
[key: string]: any;
} | null;
}
/** Represents a single item in a list of Accounting targets. */
declare interface AccountingTargetListItem {
/** The date when the object was created. */
createdAt?: string | null;
/** The time when the object was last updated.
Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */
updatedAt?: string | null;
/** Last date of modification of the object. The modification can be produced by the end user or by the system. */
timestamp?: string | null;
/** Person GUID for the owner of the object. */
ownerId?: string | null;
/** Metadata for the owner */
ownerInfo?: AccountInIndex | null;
/** The main status depending on the type of the object. */
status?: AccountingTargetStatus | null;
/** The back office status depending on the type of the object. */
backOfficeStatus?: string | null;
/** When the event started. Typically, this is the CreatedAt date, but it may be something else. */
startAt?: string | null;
/** This is the end date of the event.
Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */
endAt?: string | null;
/** Gross salary if that is relevant to the transaction. */
grossSalary?: number | null;
/** This is the payment from the Owner point-of-view:
Total payment for the Employer and Net salary for the Worker in the case of a calculation.
Only add here the payment, if the payment is really made. */
payment?: number | null;
/** Estimated fee of the transaction to Palkkaus.fi. */
fee?: number | null;
/** The GUID for the other party. Currently, this is always the PersonID. */
otherId?: string | null;
/** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */
otherPartyInfo?: AccountInIndex | null;
/** A very short description describing the object as an event. E.g. "Paid salary" */
shortText?: string | null;
/** Business object ids related to this object. E.g. calculations and payrolls in the payment. */
businessObjects?: string[] | null;
/** This is valid for calculations only. The estimated date of salary in worker. */
salaryDate?: string | null;
/** Business data to include further information of the object. */
data?: AccountingTargetData | null;
/** Version number. May be used in conflicts */
versionNumber?: number | null;
/** Salaxy uri of the resource. */
uri?: string | null;
/** Workflow flags for the object.
Only workflow events with API supported message types are listed. */
flags?: string[] | null;
/** Workflow messages for the object.
Only workflow events with API supported message types are listed.
Shown in format "[MessageType]:[Message] ([User] at [UTC-time])" */
messages?: string[] | null;
/** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */
entityType?: string | null;
/** The date for the actual period for which this object is done. */
logicalDate?: string | null;
/** Reference information. E.g. Payment or MoneyTransfer reference number. */
reference?: string | null;
/** External id for the object in 3rd party system. */
externalId?: string | null;
/** Identifier of the object. */
id?: string | null;
/** Owner ID for this data */
owner?: string | null;
/** Indication that for the currently logged-in account, the data is generally read-only. */
isReadOnly?: boolean | null;
/** Primary partner information. Automatically updated from the storage container Partner. */
partner?: string | null;
}
/**
* Provides CRUD access for Accounting Targets
*/
declare class AccountingTargets extends CrudApiBase {
/**
* For NG1-dependency injection
* @ignore
*/
static $inject: string[];
/** Base URL for details etc. */
protected baseUrl: string;
constructor(ajax: Ajax);
/** Client-side (synchronous) method for getting a new blank item as bases for UI binding. */
getBlank(): AccountingTarget;
}
/**
* Accounting target settings.
* @example
* ```html
*
* ```
*/
export declare class AccountingTargetSettings extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/** Forced read only state */
isReadOnlyForced: string;
};
/** Uses the CompanySettingsController */
controller: typeof CompanySettingsController;
/** Default template is the view */
defaultTemplate: string;
}
/** Specifies thee properties that are set for this accounting target in relation to the accounting channel. */
declare interface AccountingTargetSettings_2 {
/** Id of the target definition. */
id?: string | null;
/** Channel is the technical transport mechanism to accounting software */
channel?: AccountingChannel | null;
/** The default export method for exports: whether automatic or manual. */
method?: ExportMethod | null;
/** If specified, defines the available methods in manual exports. */
availableMethods?: ExportMethod[] | null;
/** The default export format for tabular (csv, excel) data. */
format?: string | null;
/** Web hook url for notifications.
If any calculation changes in some past month, this url is called by the system to notify the company about the change.
The month of change ("month") is added as query parameter to the url automatically by the system. */
webHookUrl?: string | null;
/** Name and visualization for selection lists. */
avatar?: Avatar_2 | null;
/** Usecase specific data */
data?: {
[key: string]: any;
} | null;
}
/** AccountingTargetStatus enumeration */
declare enum AccountingTargetStatus {
Undefined = "undefined",
OwnedTarget = "ownedTarget",
ProductTarget = "productTarget",
SharedTarget = "sharedTarget"
}
/** Object that represents a Salaxy account. */
declare interface AccountInIndex {
/** Avatar for the account */
avatar?: Avatar_2 | null;
/** Official id of the person or company. */
officialId?: string | null;
/** Email address. */
email?: string | null;
/** Telephone number. */
telephone?: string | null;
/** Bank account number (IBAN) */
ibanNumber?: string | null;
}
/**
* Edit UI for Household's own insurance information including Pension and Unemployment insurance.
* Designed for Person Employer only, should not be shown in Worker scenarios as it may be confusing.
* @example
* ```html
*
* ```
*/
export declare class AccountInsuranceEditPerson extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {};
/** Uses the CompanySettingsController */
controller: typeof CompanySettingsController;
/** The default template for the component. */
defaultTemplate: string;
}
/** Provides an overview and the possibility to edit products that are enabled to this account */
declare interface AccountProducts {
/** The basic services for Salary payment. */
baseService?: BaseSalaryProduct | null;
/** Reports and payments to tax authorities. */
tax?: TaxProduct | null;
/** Reports and payments to TVR (the unemployment insurance fund of Finland) */
unemployment?: UnemploymentProduct | null;
/** Reports ant payments to Pension companies. */
pension?: PensionProduct | null;
/** Reports and payments for mandatory employment insurances. */
insurance?: InsuranceProduct | null;
/** Bookkeeping reports for salarypayments */
accounting?: AccountingProduct | null;
/** Employer health care from the company Heltti */
healthCareHeltti?: HealthCareHelttiProduct | null;
/** Pension payments for an entrepreneur */
pensionEntrepreneur?: PensionEntrepreneurProduct | null;
/** Defines the pricing partner, service model and pricing model. */
pricing?: PricingProduct | null;
}
/**
* Methods for editing test account
* @example
* ```html
*
* ```
*/
export declare class AccountReset extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to controller implementation
*/
bindings: {};
/** Uses the SessionController */
controller: typeof AccountResetController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Controller for resetting account data in the test environment.
*/
export declare class AccountResetController implements angular_2.IController {
private testApi;
private uiHelpers;
private ajax;
private sessionService;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/**
* Creates a new AccountResetController.
* @param testApi - Api methods for resetting account data.
* @param uiHelpers - Salaxy UI Helpers.
* @param ajax - Salaxy ajax component.
*/
constructor(testApi: Test, uiHelpers: UiHelpers, ajax: Ajax, sessionService: SessionService);
/**
* Delete the current account data and credentials (including Auth0 user).
* Can be called only in a test environment.
*/
deleteCurrent(): void;
/**
* Remove all calculations, workers etc. user objects except products and signature from the account.
* Can be called only in a test environment.
*/
deleteData(): void;
/**
* Remove all calculations, payrolls and payments from the account.
* Can be called only in a test environment.
*/
deleteCalculations(): void;
/**
* Remove workers including calculations, employment contracts and tax cards from the account.
* Can be called only in a test environment.
*/
deleteWorkers(): void;
/**
* Remove all holiday year from all workers. Does not touch the default values of holidays in Worker Employment relation.
* Can be called only in a test environment.
*/
deleteHolidays(): void;
/**
* Delete all empty accounts (company or worker) created by this account.
* Can be called only in a test environment.
*/
deleteAuthorizingAccounts(): void;
/**
* Remove pension and insurance from the account.
* Can be called only in a test environment.
*/
deletePensionAndInsurance(): void;
/**
* Remove the signature from the account.
* Can be called only in a test environment.
*/
deleteSignature(): void;
/**
* Checks if the KYC (Know Your Customer) process is done for the current account.
* @returns A boolean value indicating whether the KYC process is done.
*/
isKycMissing(): boolean;
/**
* Handles the KYC (Know Your Customer) process.
* If KYC is missing, it activates the KYC.
* Otherwise, it deletes the KYC.
*/
handleKyc(): void;
/**
* Deletes the KYC (Know Your Customer) information for the current account.
* Shows a confirmation dialog before deleting the KYC.
* If the user confirms, it makes an API call to delete the KYC and logs out the user.
*/
private deleteKyc;
/**
* Activates the KYC for the account.
* Displays a confirmation dialog and proceeds with the activation if confirmed.
* Deletes the current account signature and logs out after successful activation.
*/
private activateKyc;
private logout;
}
/**
* Methods for updating account information
*/
declare class Accounts {
private ajax;
/**
* For NG1-dependency injection
* @ignore
*/
static $inject: string[];
constructor(ajax: Ajax);
/**
* Gets the current company account if the current account is a company.
* NOTE: Typically the account data is fetched in Session check => You do not need to fetch it separately.
*
* @returns A Promise with result data (Company account or null).
*/
getCompany(): Promise;
/**
* Gets the current Person account:
* Either the current account or the Primary contact person account if the current account is a company.
* NOTE: Typically the current account data is fetched in Session check => You do not need to fetch it separately.
* => Only use this to fetch the Primary contact person account if the current account is a company.
*
* @returns A Promise with result data (Personal account).
*/
getPerson(): Promise;
/**
* Saves the avatar and contact for the current Person account:
* Either the current account or the Primary contact person account if the current account is a company.
*
* @returns A Promise with result data (Personal account).
*/
savePerson(personAccount: PersonAccount): Promise;
/**
* Returns the url where to post the avatar file
*/
getAvatarUploadUrl(): string;
/**
* Switches the current web site usage role.
*
* @param role - household or worker. You cannot change to company at the moment using this method.
*
* @returns A Promise with result data (new role).
*/
switchRole(role: "worker" | "household"): Promise<"worker" | "household">;
/**
* Adds/updates the workflow event for the item.
*
* @param item - Item for which to set the workflow event.
* @param wfEvent - Event to add or update.
* @returns Workflow data for the item.
*/
saveWorkflowEvent(item: PersonAccount | CompanyAccount, wfEvent: WorkflowEvent): Promise;
/**
* Deletes the workflow item or items from the item.
* @param item - Item for which to delete workflow events.
* @param wfIdOrType - Event id or type.
* @returns A Promise with result data "Object deleted".
*/
deleteWorkflowEvent(item: PersonAccount | CompanyAccount, wfIdOrType: string): Promise;
/**
* Gets a single workflow event for the item.
* @param item - Item for which to get the single event.
* @param wfId - Event id.
* @returns A Promise with event data.
*/
getWorkflowEvent(item: PersonAccount | CompanyAccount, wfId: string): Promise;
}
/**
* Provides read / update functionality for main account settings (employer/company)
*/
declare class AccountSettings extends SingleItemApiBase {
/**
* For NG1-dependency injection
* @ignore
*/
static $inject: string[];
/** Base URL for details etc. */
protected baseUrl: string;
constructor(ajax: Ajax);
/**
* Creates a new IR certificate.
* @param transferId Transfer ID for the IR certificate.
* @param transferPassword One time transfer password for the IR certificate.
* @returns Information about the created IR certificate.
*/
createIrCertificate(transferId: string, transferPassword: string): Promise;
/**
* Renews an existing IR certificate.
* @returns Information about the created IR certificate.
*/
renewIrCertificate(): Promise;
/**
* Gets the detials of the existing IR certificate or null if no certificate exists.
* @returns Information about the current IR certificate.
*/
getIrCertificate(): Promise;
}
/** Read-only account settings in Session: These are the settings that should be immediately available in the regular UI without separate loading. */
declare interface AccountSettingsInSession {
/** Pension contracts for optional selection of cotnract in Worker / Calc UI's */
pensionContracts?: PensionContract[] | null;
/** Insurance contracts for optional selection of cotnract in Worker / Calc UI's */
insuranceContracts?: InsuranceContract[] | null;
/** If true, the reporting layout is customized and should be loadded from the server in preview and reporting. */
hasCustomReport?: boolean | null;
/** The default accounting target for accounting reports. */
accountingTarget?: AccountingTargetSettings_2 | null;
/** Partner and service model */
partner?: PrimaryPartnerSettings | null;
/** The payment channels that are enabled for the current user. */
paymentChannels?: PaymentChannel[] | null;
/** Current default payment channel */
defaultPaymentChannel?: PaymentChannel | null;
/** Available usecases for the current user. */
usecases?: UsecaseInSettings[] | null;
/** Basic information about the avialable integrations: Server URL and supported behaviors in the future. */
integration?: IntegrationInSession | null;
/** Partner messages enabled. */
partnerMessages?: boolean | null;
/** Cost accounting model. */
costAccounting?: CostAccountingInSession | null;
/** Forms settings for session. */
forms?: FormsInSession | null;
/** Customer specific preferences. */
preferences?: Preference[] | null;
}
/** Validation errors for the onboarding process */
declare interface AccountValidation {
/** If true the official ID is technically valid.
Official ID is either Finnish Personal ID (HETU, Henkilötunnus) or Business ID (Y-tunnus). */
isOfficialIdValid?: boolean | null;
/** If false, none of the accounts in ExistingAccounts cannot be accessed by the current user. */
isAuthorized?: boolean | null;
/** TODO: NOt implemented yet - should be implemented
If true, the onboarding object has sufficient data to start the Digital Signature process (Visma Sign).
Depending on the use case this may or may not be required for committing the data as account data. */
canStartSign?: boolean | null;
/** If true, the validation process has been completed. The IsValid may be true or false. */
isCompleted?: boolean | null;
/** Existing account based on official id (Personal ID / Business ID). */
existingAccount?: Avatar_2 | null;
/** If true, the data is valid - no errors. */
readonly isValid?: boolean | null;
/** If true, has required fields missing data. */
readonly hasAllRequiredFields?: boolean | null;
/** Validation errors on invalid field values.
Note that required fields missing error messages are not here. Only the invalid values. */
readonly errors?: ApiValidationError[] | null;
}
/**
* Helper component to generate buttons with known actions such as creating a new worker, new calculation etc.
* @example
* ```html
*
* ```
*/
export declare class ActionButton extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/** Text for the button */
label: string;
/** Additional Bootstrap or custom style classes. Bootstrap I.e. btn-danger, btn-sm, my-btn. Defaults to btn-primary */
buttonClass: string;
/** Disabled but visible */
disabled: string;
/** Options for button. */
options: string;
/**
* Action to be executed.
* newCalc: starts a new blank calculation.
* newCalcForEmployment: starts a new calculation for the given employment id.
* newPayroll: starts a new blank payroll.
* newWorker: opens workerWizard for creating a new worker.
* newMessage: starts a new message thread with partner.
* payment: Not supported at the moment. opens the payment dialog for the current calculation.
* newTaxcard: Links to taxcards page. Currently supported only when role is Worker.
* newRepair: Starts a repair process for a calculation.
*/
action: string;
/**
* Function that is called after the function. This is typically used for navigation or a list reload.
*/
onAfterAction: string;
};
/** Uses the NaviController */
controller: typeof ActionButtonController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Controller for action button
*/
export declare class ActionButtonController implements angular_2.IController {
/**
* For NG-dependency injection
* @ignore
*/
static $inject: never[];
/** Text for the button */
label: string;
/** Additional Bootstrap or custom style classes. I.e. btn-danger, btn-sm, my-btn. Defaults to btn-primary. */
buttonClass: string;
/**
* Action to be executed.
* newCalc: starts a new blank calculation.
* newCalcForEmployment: starts a new calculation for the given employment ID.
* newPayroll: starts a new blank payroll.
* newWorker: opens workerWizard for creating a new worker.
* newMessage: starts a new message thread with partner.
* payment: opens the payment dialog for the current calculation.
* newTaxcard: Links to taxcards page. Currently supported only when role is Worker.
* newRepair: starts a new repair process for a calculation.
*/
action: "newCalc" | "newCalcForEmployment" | "newPayroll" | "newWorker" | "newMessage" | "payment" | "newTaxcard" | "newRepair";
/** Disabled but visible */
disabled?: boolean;
/** Optional options for button. */
options?: {
/**
* id: id of current item such as Employment or Calculation. Currently used only in newCalcForEmployment action.
*/
id: string;
};
/**
* Function that is called after the function. This is typically used for navigation or a list reload.
*/
onAfterAction: () => Promise;
/**
* Creates a new InputController
* @ignore
*/
constructor();
/**
* Implement IController
*/
$onInit: () => void;
/**
* Returns environment based on config.
* TODO: Replace this with ConfigsLogic
*/
getEnv(): "local" | "test" | "demo" | "prod" | "rc";
}
/**
* Helper class for executing usecase actions.
*/
declare class ActionExecutor {
/** The action that is being executed. */
action: UsecaseAction;
/** Result from the last execution of the current action. */
result: any;
/** Status of the result */
status: BootstrapStyle;
constructor(action: UsecaseAction);
/** Returns true if the execution is asynchronous. Only asynchronous calls may make http requests to external resources. */
get isAsync(): boolean;
/**
* Executes the current action.
* !! IMPORTANT !! As of now, the method only supports client-side browser execution. Server-side / Node execution is not yet supported.
* @param item The current item that the script processes.
* @param session The current user session.
* @param ajax Ajax object for HTTP calls.
*/
execute(item: any, session: UserSession, ajax: Ajax): Promise;
/**
* Executes the current action as synchronous client-side (browser) code.
* !! IMPORTANT !! As of now, the method only supports client-side browser execution. Server-side / Node execution is not yet supported.
* @param item The current item that the script processes.
* @param session The current user session.
*/
executeSync(item: any, session: UserSession): boolean;
/**
* Executes the current action as asynchronous client-side (browser) code.
* !! IMPORTANT !! As of now, the method only supports client-side browser execution. Server-side / Node execution is not yet supported.
* @param item The current item that the script processes.
* @param session The current user session.
* @param ajax Ajax object for HTTP calls.
*/
executeAsync(item: any, session: UserSession, ajax: Ajax): Promise;
}
/** AgeGroupCode enumeration */
declare enum AgeGroupCode {
A = "a",
B = "b",
C = "c",
U = "u"
}
/** AgeRange enumeration */
declare enum AgeRange {
Unknown = "unknown",
Age_15 = "age_15",
Age16 = "age16",
Age17 = "age17",
Age18_52 = "age18_52",
Age53_62 = "age53_62",
Age63_64 = "age63_64",
Age65_67 = "age65_67",
Age68AndOVer = "age68AndOVer"
}
/**
* Abstracts the interface for Http / Ajax functionality that is required by Salaxy core classes.
* This interface is implemented in this project for jQuery and Node.
* Additional implementations exists for Angular.js (salaxy-lib-ng1) and Angular.io / ngx (salaxy-lib-ng).
* You may also create your own implementation for the framework or http component that you want to support.
*/
declare interface Ajax {
/**
* The server address - root of the server. This is settable field.
* Will probably be changed to a configuration object in the final version.
*/
serverAddress: string;
/**
* By default credentials are not used in http-calls.
* Enable credentials with this flag (force disabled when the token is set).
*/
useCredentials: boolean;
/**
* Sets Salaxy Bearer token for this http context.
*
* @param token - Salaxy JWT token or null to clear the token.
*/
setCurrentToken(token: string | null): any;
/** Gets the current Salaxy Bearer token */
getCurrentToken(): string | null;
/** Gets the Server address that is used as bases to the HTML queries. E.g. 'https://test-api.salaxy.com' */
getServerAddress(): string;
/** Gets the API address with version information. E.g. 'https://test-api.salaxy.com/v03/api' */
getApiAddress(): string;
/**
* Gets a JSON-message from server using the API
*
* @param method - The API method is the url path after the api version segments (e.g. '/v03/api')
* and starts with a forward slash, e.g. '/calculator/new', or a full URL address.
*
* @returns A Promise with result data. Standard Promise rejection to be used for error handling.
*/
getJSON(method: string): Promise;
/**
* Gets a HTML-message from server using the API
*
* @param method - The API method is the url path after the api version segments (e.g. '/v03/api')
* and starts with a forward slash, e.g. '/calculator/new', or a full URL address.
*
* @returns A Promise with result html. Standard Promise rejection to be used for error handling.
*/
getHTML(method: string): Promise;
/**
* Gets a blob (binary data) from the server using the API.
* @param method - The API method is the url path after the api version segments (e.g. '/v03/api')
* and starts with a forward slash, e.g. '/calculator/new'.
* @returns A Promise that resolves to an object containing:
* - data: The blob data from the response
* - headers: An object containing the response headers as key-value pairs
*/
getBlob(method: string): Promise<{
data: Blob;
headers: {
[key: string]: string;
};
}>;
/**
* POSTS data to server and receives back a JSON-message.
*
* @param method - The API method is the url path after the api version segments (e.g. '/v03/api')
* and starts with a forward slash, e.g. '/calculator/new', or a full URL address.
* @param data - The data that is posted to the server.
*
* @returns A Promise with result data. Standard Promise rejection to be used for error handling.
*/
postJSON(method: string, data: any): Promise;
/**
* POSTS data to server and receives back HTML.
*
* @param method - The API method is the url path after the api version segments (e.g. '/v03/api')
* and starts with a forward slash, e.g. '/calculator/new', or a full URL address.
* @param data - The data that is posted to the server.
*
* @returns A Promise with result data. Standard Promise rejection to be used for error handling.
*/
postHTML(method: string, data: any): Promise;
/**
* POSTS data to server and receives back a blob (binary data).
*
* @param method - The API method is the url path after the api version segments (e.g. '/v03/api')
* and starts with a forward slash, e.g. '/calculator/new', or a full URL address.
* @param data - The data that is posted to the server.
* @returns A Promise that resolves to an object containing:
* - data: The blob data from the response
* - headers: An object containing the response headers as key-value pairs
*/
postBlob(method: string, data: any): Promise<{
data: Blob;
headers: {
[key: string]: string;
};
}>;
/**
* Sends a DELETE-message to server using the API
*
* @param method - The API method is the url path after the api version segments (e.g. '/v03/api')
* and starts with a forward slash, e.g. '/calculator/new', or a full URL address.
*
* @returns A Promise with result data. Standard Promise rejection to be used for error handling.
*/
remove(method: string): Promise;
}
/**
* The $http access to the server methods: GET, POST and DELETE
* with different return types and authentication / error events.
*/
export declare class AjaxNg1 implements Ajax {
private $http;
private $q;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** Alert service for ajax. */
static alertService: any;
/**
* By default (true) the token is set to salaxy-token -cookie.
* Disable cookies with this flag.
*/
useCookie: boolean;
/**
* By default credentials are not used in http-calls.
* Enable credentials with this flag.
*/
useCredentials: boolean;
/**
* The server address - root of the server
* This is settable field. Will probably be changed to a configuration object in the final version.
*/
serverAddress: string;
private token;
/**
* Creates a new instance of AjaxNg1
* @param $http - Angular http
* @param $q - Angular q
* @param config - Optional config containing keys which override the corresponding global Config keys.
*/
constructor($http: angular.IHttpService, $q: IQService, config?: Config);
/**
* Gets the API address with version information. E.g. 'https://test-api.salaxy.com/v03/api'.
* Default version, as of writing 2.0
*/
getApiAddress(): string;
/** Gets the Server address that is used as bases to the HTML queries. E.g. 'https://test-api.salaxy.com' */
getServerAddress(): string;
/**
* Gets a JSON-message from server using the API
* @param method The API method is the url path after the api version segments (e.g. '/v03/api')
* and starts with a forward slash, e.g. '/calculator/new'.
* @returns A Promise with result data. Standard Promise rejection to be used for error handling.
*/
getJSON(method: string): Promise;
/**
* Gets a HTML-message from server using the API
* @param method - The API method is the url path after the api version segments (e.g. '/v03/api')
* and starts with a forward slash, e.g. '/calculator/new'.
* @returns A Promise with result data. Standard Promise rejection to be used for error handling.
*/
getHTML(method: string): Promise;
/**
* Gets a blob (binary data) from the server using the API.
* @param method - The API method is the url path after the api version segments (e.g. '/v03/api')
* and starts with a forward slash, e.g. '/calculator/new'.
* @returns A Promise that resolves to an object containing:
* - data: The blob data from the response
* - headers: An object containing the response headers as key-value pairs
*/
getBlob(method: string): Promise<{
data: Blob;
headers: {
[key: string]: string;
};
}>;
/**
* POSTS data to server and receives back a blob (binary data).
* @param method - The API method is the url path after the api version segments (e.g. '/v03/api')
* and starts with a forward slash, e.g. '/calculator/new'.
* @param data - The data that is posted to the server.
* @returns A Promise that resolves to an object containing:
* - data: The blob data from the response
* - headers: An object containing the response headers as key-value pairs
*/
postBlob(method: string, data: any): Promise<{
data: Blob;
headers: {
[key: string]: string;
};
}>;
/**
* POSTS data to server and receives back a JSON-message.
* @param method - The API method is the url path after the api version segments (e.g. '/v03/api')
* and starts with a forward slash, e.g. '/calculator/new'.
* @param data - The data that is posted to the server.
* @returns A Promise with result data. Standard Promise rejection to be used for error handling.
*/
postJSON(method: string, data: any): Promise;
/**
* POSTS data to server and receives back HTML.
* @param method - The API method is the url path after the api version segments (e.g. '/v03/api')
* and starts with a forward slash, e.g. '/calculator/new'.
* @param data - The data that is posted to the server.
* @returns A Promise with result data. Standard Promise rejection to be used for error handling.
*/
postHTML(method: string, data: any): Promise;
/**
* Sends a DELETE-message to server using the API
* @param method - The API method is the url path after the api version segments (e.g. '/v03/api')
* and starts with a forward slash, e.g. '/calculator/new'.
* @returns A Promise with result data. Standard Promise rejection to be used for error handling.
*/
remove(method: string): Promise;
/**
* Gets the current token.
* Will check the salaxy-token cookie if the token is persisted there
*/
getCurrentToken(): string;
/** Gets the status of the current token. */
getTokenStatus(): "noToken" | "ok" | "expired" | "invalid";
/**
* Sets the current token. Persists it to cookie until the browser window
* @param token - the authentication token to persist.
*/
setCurrentToken(token: string | null): void;
/** If missing, append the API server address to the given url method string */
private getUrl;
private handleError;
}
/**
* Shows an alert box with styling.
*
* Based on Bootstrap alert, but has the following additional functionality:
*
* - primary style (in addition to success, info, warning and danger) for banner type of advertising
* - Icon for better visuality
* - Optional "Read more" area
* @example
* ```html
*
* ```
*/
export declare class Alert extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/**
* Possibility to speicfy a font-awesome icon.
* Setting "none", will show no icon.
* If not set, it is determined by type.
*/
icon: string;
/** Type of the alert is the Bootstrap style: Note that also "primary" and "default" are supported. */
type: string;
/**
* Alert main content as simple text.
* You can alternatively provide html as main element.
*/
text: string;
/** If true, the aside part is shown immidiately. Also hides "read more"- button. */
forceMoreInfo: string;
};
/**
* Transclusion slots
*/
transclude: {
/**
* The main content of the alert.
* You can alternatively provide a simple text in "text" property.
*/
main: string;
/**
* Optional Details part of the alert.
* Will automatically show "Read more" button.
*/
aside: string;
};
/** Uses the AlertController */
controller: typeof AlertController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Controller rendering an Alert box in the page area.
*/
export declare class AlertController implements angular_2.IController {
private $transclude;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** Type of the alert is the Bootstrap style: Note that also "primary" and "default" are supported. */
type: "default" | "primary" | "success" | "info" | "warning" | "danger";
/**
* Alert main content as simple text.
* You can alternatively provide html as main element.
* NOTE: If necessary we could provide a html property to bind from JavaScript and to allow HTML in the binded content.
*/
text: string;
/**
* Possibility to speicfy a font-awesome icon.
* Setting "none", will show no icon.
* If not set, it is determined by type.
*/
icon: "none" | string;
/** If true (and hasMoreInfo is true), the more info html is shown. */
showMoreInfo: boolean;
/** If true, the aside part is shown immidiately. Also hides "read more"- button. */
forceMoreInfo: boolean;
/**
* Creates a new AlertController
* @ignore
*/
constructor($transclude: angular_2.ITranscludeFunction);
/**
* Implement IController
*/
$onInit: () => void;
/** Returns true if details part (aside element) is filled / "More info" button should be shown. */
get hasMoreInfo(): any;
/** Returns the icon based on the type. */
getIcon(): string | null;
}
/**
* Handles error, warning and debug alerts and other such error handling situations.
* Default functionality is to find #salaxy-alert-container and insert a bootstrap alert box into that container.
*/
export declare class AlertService {
private $rootScope;
private $timeout;
private $sce;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** Default duration for alerts to be visible */
duration: number;
/** Service level counter of alerts. Used for identifier. */
private alertCounter;
private alerts;
private eventPrefix;
/** Dependency injection etc. */
constructor($rootScope: angular.IRootScopeService, $timeout: angular.ITimeoutService, $sce: angular.ISCEService);
/**
* Adds an error message
* @param message Message to add
*/
addError(message: string): void;
/**
* Adds a warning message
* @param message Message to add
*/
addWarning(message: string): void;
/**
* Adds a success message
* @param message Message to add
*/
addSuccess(message: string): void;
/**
* Adds an info message
* @param message Message to add
*/
addInfo(message: string): void;
/**
* Last message - consider this a temporary implementation of the custom alert handling
* @returns Last message
*/
getLastMessage(): string;
/**
* Last alertType is bootstrap type: info (default), success, warning or danger.
* Consider this a temporary implementation of the custom alert handling
* @returns Last alert type
*/
getLastAlertType(): string;
/**
* INTERNAL ONLY: This functionality is under consideration.
* We may not support it in the future and we may remove it without it being a breaking change.
*
* Controllers can subscribe to changes in service data using this method.
* Read more about the pattern in: http://www.codelord.net/2015/05/04/angularjs-notifying-about-changes-from-services-to-controllers/
* @ignore
* @param scope - Controller scope for the subscribing controller (or directive etc.)
* @param callback - The event listener function. See $on documentation for details
*/
onChange(scope: angular.IScope, callback: (event: angular.IAngularEvent, ...args: any[]) => any): void;
/**
* Attaches the alert service to AjaxNg1.
* The init is currently called automatically in constructor, but here you can make an explicit call.
*/
init(): void;
/**
* Adds an alert message
* @param message - A message text for the Alert. Preferably a short text so that it fits to the pull-righ box.
* @param alertType - Bootstrap color code for the alert info (default), success, warning or danger
*/
private addAlert;
private renderAlerts;
private notify;
}
/** AllowanceCode enumeration */
declare enum AllowanceCode {
MealAllowance = "mealAllowance",
PartialDailyAllowance = "partialDailyAllowance",
FullDailyAllowance = "fullDailyAllowance",
InternationalDailyAllowance = "internationalDailyAllowance",
TaxExemptReimbursementsAbroad = "taxExemptReimbursementsAbroad"
}
/** A planned annual Leave - not sure whether it will kept or is it just planned */
declare interface AnnualLeave {
/** Identifies a single leave. */
id?: string | null;
/** The planned holiday period. */
period?: DateRange_2 | null;
/** Additional information as recorded by the Employer. */
notes?: string | null;
}
/** Payment related to annual leave: holiday salary, bonus and compensation */
declare interface AnnualLeavePayment {
/** Type of the payment entry */
kind?: AnnualLeavePaymentKind | null;
/** The reference date: Typically the Paid at date.
The items are typically sorted based on this. */
date?: string | null;
/** Days of holidays that are paid or compensated */
holidayDays?: number | null;
/** Salary that is paid for holidays */
holidaySalary?: number | null;
/** Compensation that is paid for holidays not kept. */
holidayCompensation?: number | null;
/** Bonus for either Holiday Salary or Compensation. */
holidayBonus?: number | null;
/** If the payment is defined by a calculation, stores the calculation ID. */
calcId?: string | null;
/** If true, the payment can be ignored. */
isDisabled?: boolean | null;
/** Identifies a single leave. */
id?: string | null;
/** The planned holiday period. */
period?: DateRange_2 | null;
/** Additional information as recorded by the Employer. */
notes?: string | null;
}
/** AnnualLeavePaymentKind enumeration */
declare enum AnnualLeavePaymentKind {
Undefined = "undefined",
Planned = "planned",
ManualSalary = "manualSalary",
ManualCompensation = "manualCompensation",
ManualBonus = "manualBonus",
PaidCalc = "paidCalc",
DraftCalc = "draftCalc"
}
declare type AnnualLeavePaymentWithAvatar = AnnualLeavePayment & {
avatar: Avatar_2;
};
/** Data about the annual leaves planned and used during the holiday year. */
declare interface AnnualLeaves {
/** Planned annual leaves. */
planned?: AnnualLeave[] | null;
/** Paid or otherwise handled annual leaves.
PRELIMINARY: This property is under revision - it may be moved or renamed without being a breaking change. */
paid?: AnnualLeavePayment[] | null;
}
/** Result of the check. Both status and possible item are returned. */
declare interface ApiCheckResultOfInvoiceSettings {
/** Status of the check */
status?: ApiCheckStatus | null;
/** Result object of the check. Defaults to null. */
item?: InvoiceSettings | null;
}
/** Result of the check. Both status and possible item are returned. */
declare interface ApiCheckResultOfWorkerAccountOf {
/** Status of the check */
status?: ApiCheckStatus | null;
/** Result object of the check. Defaults to null. */
item?: WorkerAccount[] | null;
}
/** ApiCheckStatus enumeration */
declare enum ApiCheckStatus {
Ignored = "ignored",
Success = "success",
Warning = "warning",
Error = "error"
}
/** Abstract base class for implementing CRUD objects in the Salaxy API. */
declare interface ApiCrudObject {
/** Identifier of the object. */
id?: string | null;
/** The date when the object was created. */
createdAt?: string | null;
/** The time when the object was last updated.
Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */
updatedAt?: string | null;
/** Owner ID for this data */
owner?: string | null;
/** Indication that for the currently logged-in account, the data is generally read-only. */
isReadOnly?: boolean | null;
/** Primary partner information. Automatically updated from the storage container Partner. */
partner?: string | null;
}
/**
* Base class for version 03 CRUD controllers where OData list functionality has been
* separated from the item editing CRUD functionality.
* This version also shifts away from the old Service-infrastructure.
*/
export declare abstract class ApiCrudObjectController implements angular_2.IController {
protected api: CrudApiBase;
protected uiHelpers: UiHelpers;
protected $location: angular_2.ILocationService;
protected $routeParams: any;
/**
* Defines the binding mode of the component.
*
* - "model" takes the model directly from the model parameter.
* - "parentCtrl" takes the model from the given parent controller. Main actions (like Save, reload) are delegated to that controller.
* - "id" fetches the item from the server using the current-id attribute (currentId property).
* - "url" like "id", but the id is fetched from route parameters.
* - "new" Creates a new item as current.
* - "null": Current item is null
*
* The mode is set in the model property setter.
*/
bindingMode: "id" | "url" | "model" | "parentCtrl" | "new" | "null";
/** Action for the controller */
action: "default" | "copy-as-new" | string;
/**
* For list-controls, this is the URL for item select event
* as well as the URL where a new item is edited. Basically showing the Details view.
* Id is added directly to the string and this is an angular route.
* I.e. use "/calc/details/" (not "#/calc/details/" or "/calc/details")
* For more control, use onListSelect or onCreateNew events.
* @example
*/
detailsUrl: string;
/**
* URL for the list view. At the moment, if specified, the browser is redirected here after delete.
* @example
*
*
*/
listUrl: string;
/** If the Crud controller is used from within a ODataQueryController, this is the containing controller. */
odataController: ODataQueryController;
/** If the controller is bound to parent controller, the controller is set here. */
parentController: ApiCrudObjectController;
/**
* Contains the inner value currentId if stored by this controller and not the parent.
*/
protected _currentId: string;
/**
* The status of the data loading for the current controller.
*/
private _status;
private _current;
private _original;
private _model;
/** If true, current item is read only */
private _isReadOnlyForced;
private _versions;
private _versionsId;
private _version;
private _versionId;
/** The status of the initialization process $onInit */
protected initStatus: {
isInitDone: boolean;
isReloadRequested: boolean;
};
/**
* Creates a new CrudControllerBase.
* @param api Api module typically defined in @salaxy/core used for communicating to server.
* @param uiHelpers - Salaxy ui helpers service.
* @param $location Angular.js Location service that is used for navigation. Especially the list views.
* @param $routeParams - Angular.js routing component
*/
constructor(api: CrudApiBase, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any);
/**
* Implement IController by providing onInit method.
* We currently do nothing here, but if you override this function,
* you should call this method in base class for future compatibility.
*/
$onInit(): void;
/** URL for the OData list service */
get odataServiceUrl(): string;
/**
* Set the Current selected item (the model).
* The model may be:
*
* - TItem: A bound item (default), which can also be null.
* - ApiCrudObjectController: Parent controller of the same type. Model is fetched from its current and all methods are delegated.
* - "new": A new item is created.
* - "url": Fetches the item from the server using the id query string (crudItemId in routeParams).
* - string: Any other string is interpreted as id which is used to fetch the item from the server.
*/
set model(value: "new" | "url" | string | TItem | ApiCrudObjectController);
/** Gets the Current selected item (the model). */
get model(): "new" | "url" | string | TItem | ApiCrudObjectController;
/** Gets the Current selected item. */
get current(): TItem;
/** The current Id for the controller. */
get currentId(): string;
/** Gets the Original item before changes. */
get original(): TItem;
/** Gets the isReadOnlyForced status. */
get isReadOnlyForced(): boolean;
/** Sets the isReadOnlyForced status. */
set isReadOnlyForced(value: boolean);
/**
* Gets the defaults for service-specific URLs, options etc.
* This method must be implemented when implementing ApiCrudObjectController.
*/
abstract getDefaults(): {
/**
* URL for the list view. This is list-url attribute with controller-specific default value (e.g. "/articles").
* At the moment, if specified, the browser is redirected here after delete.
*/
listUrl: string;
/**
* For lists, this is the URL for item select event as well as the URL where a new item is edited.
* Basically showing the Details view. For more control, use onListSelect or onCreateNew events.
* This is details-url attribute with controller-specific default value.
* Id is added directly to the string and this is an angular route.
* I.e. use "/calc/details/" (not "#/calc/details/" or "/calc/details")
*/
detailsUrl: string;
/** Template for displaying the items as list. */
oDataTemplateUrl: string;
/** The OData options for default query. */
oDataOptions: ODataQueryOptions;
};
/** If true, this is a new unsaved object */
isNew(): boolean;
/** If true, the component is in the middle of loading data. */
get isLoading(): boolean;
/**
* If true, the form controls should be disabled.
*/
get isDisabled(): boolean;
/**
* If true, the form controls should be read-only (no input control at all).
*/
get isReadOnly(): boolean;
/** Returns true, if the current object has changes. */
get hasChanges(): boolean;
/**
* Gets the status of the data if it is being loaded from a remote server.
*/
get status(): "noInit" | "initialLoading" | "loaded" | "reloading" | "loadError";
/** Makes an OData query */
getOData(options: ODataQueryOptions, result?: ODataResult): Promise>;
/** Returns base url of the underlying api. */
getBaseUrl(): string;
/** Gets the data transmitted in the route / url */
getRouteData(): {
/** id parameter in the route */
id: string;
/** Action parameter in the route. */
action: "default" | "copy-as-new" | string;
};
/** Save changes to the current item */
save(options?: any): Promise;
/** Reset the changes in the current element */
reset(): TItem;
/**
* Shows the detail view for the item.
* Typically, this takes the user to a new page with the ID.
* @param item Item may be either Container or list item.
*/
showDetails(item: TItem | IUserObjectIndex): angular_2.ILocationService;
/**
* Shows the detail view with a new item that is a copy of the given item.
* Typically, this takes the user to a new page with the ID with action "copy-as-new".
* @param item Item may be either Container or list item.
*/
showCopyAsNew(item: TItem | IUserObjectIndex): angular_2.ILocationService;
/**
* Shows the "Are you sure?" dialog and if user clicks OK, deletes the item.
* Cancels the started payment for the payroll too.
* @param item Item to be deleted.
* If not specified, the current item.
* @param confirmMessage Optional custom message for the confirm dialog.
* If not specified, a generic message is shown.
* If set to boolean false, the confirm message is not shown at all.
* @returns Promise that resolves to true if the item is deleted.
* False, if user cancels and fails if the deletion fails.
*/
delete: (item?: TItem, confirmMessage?: string) => Promise;
/**
* Gets the id for the object regardless of whther the object is Container or list item.
* Error is thrown if the item does not exist.
* The method is an extension point for future item types that may have other ID's in the future.
* @param item The item for which to fetch the ID.
*/
getId(item: TItem | IUserObjectIndex): string | null | undefined;
/**
* Deletes an item without showing the confirm dialog.
* The method shows the "Please wait..." loader, but does not refresh the
* list or move the browser to listUrl. The caller should take care
* of the UX actions after delete if necessary.
* @param item Item to be deleted.
* @returns Promise that resolves to true (never false). Fails if the deletion fails.
*/
deleteNoConfirm(item: TItem | IUserObjectIndex): Promise;
/**
* Creates a copy of a given item.
* This is a synchronous method that should basically convert a saved item to a new item.
* @param copySource Item (container item) to copy as new.
*/
copyItem(copySource: TItem): TItem;
/**
* Starts the reload process depending on the bindingMode:
*/
reload(): Promise;
/**
* Sets the current item as the given object (reference to a new object).
* This also resets the original item. This method is typically used when the object is first loaded,
* when object that is being edited is changed or when object is reloaded from server after saving.
* @param item The new current item.
*/
setCurrentRef(item: TItem): any;
/**
* Sets the current item value:
* The object reference remains the same, but all its properties are copied using angular.copy().
* Original object remains as-is by default. This method is typically used at the end of modifyinjg user interfaces.
* @param item The new current item.
* @param resetOriginal If true, also resets the orginal value.
*/
setCurrentValue(item: TItem, resetOriginal?: boolean): any;
/**
* Sets the current item. This also resets the original item.
* @param item The new current item.
* @param keepOriginalAsIs If true, will not update the original.
*/
setCurrent(item: TItem, keepOriginalAsIs?: boolean): void;
/**
* Calls a promise updating the status on the controller.
* @param loadAction The promise that executes the loading from server.
* If action is null, the status is directly set as "loaded".
*/
setStatus(loadAction: Promise): Promise;
/**
* Adds/updates the workflow event for the current using API.
* @param wfEvent - Workflow event to add/update.
* @returns - Reloaded item.
*/
saveWorkflowEvent(wfEvent: WorkflowEvent): Promise;
/**
* Deletes the given event or all events with given type using API.
* @param wfIdOrType Id or type of the workflow event.
* @returns - Reloaded item.
*/
deleteWorkflowEvent(wfIdOrType: string): Promise;
/**
* Gets a single workflow event for the item.
* @param wfId Id of the workflow event.
* @returns - Single workflow event
*/
getWorkflowEvent(wfId: string): Promise;
/** Returns the current api */
getApi(): CrudApiBase;
/**
* Returns the versions for the current item.
*/
get versions(): VersionInfo[];
/**
* Gets a version of the current item.
* @param version VersionInfo of the item.
*/
getVersion(version: VersionInfo): {
version: VersionInfo;
item?: TItem;
};
}
/**
* Bindings for the components that use ApiCrudObjectController.
*/
export declare class ApiCrudObjectControllerBindings {
[boundProperty: string]: string;
/**
* URL to which the component navigates when an item is clicked.
* The "id" or "rowIndex" property of the selected item is added to the URL.
* URL is ignored if onListSelect is set. In this case, you may navigate yourself in that method.
* Id is added directly to the string and this is an angular route.
* I.e. use "/calc/details/" (not "#/calc/details/" or "#/calc/details")
* @example
*/
detailsUrl: string;
/**
* URL for the list view. At the moment, if specified, the browser is redirected here after delete.
* @example
*
*
*/
listUrl: string;
/**
* Set the Current selected item (the model).
* The model may be:
*
* - TItem: A bound item (default), which can also be null.
* - "new": A new item is created.
* - "url": Fetches the item from the server using the id query string (crudItemId in routeParams).
* - string: Any other string is interpreted as id which is used to fetch the item from the server.
*/
model: string;
/** If true, current item is read only */
isReadOnlyForced: string;
}
/** Result of the import. Both status and possible item are returned. */
declare interface ApiImportResultOfInvoiceOf {
/** Status of the import */
status?: ApiImportStatus | null;
/** Result object of the import. Defaults to id of the imported object. */
item?: Invoice[] | null;
}
/** Result of the import. Both status and possible item are returned. */
declare interface ApiImportResultOfObject {
/** Status of the import */
status?: ApiImportStatus | null;
/** Result object of the import. Defaults to id of the imported object. */
item?: any | null;
}
/** Result of the import. Both status and possible item are returned. */
declare interface ApiImportResultOfPartnerCompanyAccountInfo {
/** Status of the import */
status?: ApiImportStatus | null;
/** Result object of the import. Defaults to id of the imported object. */
item?: PartnerCompanyAccountInfo | null;
}
/** Result of the import. Both status and possible item are returned. */
declare interface ApiImportResultOfString {
/** Status of the import */
status?: ApiImportStatus | null;
/** Result object of the import. Defaults to id of the imported object. */
item?: string | null;
}
/** ApiImportStatus enumeration */
declare enum ApiImportStatus {
Ignored = "ignored",
Success = "success",
Warning = "warning",
Error = "error"
}
/** ApiItemType enumeration */
declare enum ApiItemType {
Undefined = "undefined",
Calculation = "calculation",
CalculationPaid = "calculationPaid",
Dataset = "dataset",
PayrollDetails = "payrollDetails",
Invoice = "invoice",
EarningsPaymentReport = "earningsPaymentReport",
PayerSummaryReport = "payerSummaryReport",
Employment = "employment",
MessageThread = "messageThread",
CalendarEvent = "calendarEvent",
ListItems = "listItems"
}
/** The line item class for search and listing results. Use this class for building user interfaces. */
declare interface ApiListItem {
/** The payload type of the item. */
type?: ApiListItemType | null;
/** List item type of the item if the item supports a custom OData interface. */
listType?: string | null;
/** The date when the object was created. */
createdAt?: string | null;
/** The time when the object was last updated.
Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */
updatedAt?: string | null;
/** Last date of modification of the object. The modification can be produced by the end user or by the system. */
timestamp?: string | null;
/** Person GUID for the owner of the object. */
ownerId?: string | null;
/** Metadata for the owner */
ownerInfo?: AccountInIndex | null;
/** The main status depending on the type of the object. */
status?: string | null;
/** The back office status depending on the type of the object. */
backOfficeStatus?: string | null;
/** When the event started. Typically, this is the CreatedAt date, but it may be something else. */
startAt?: string | null;
/** This is the end date of the event.
Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */
endAt?: string | null;
/** Gross salary if that is relevant to the transaction. */
grossSalary?: number | null;
/** This is the payment from the Owner point-of-view:
Total payment for the Employer and Net salary for the Worker in the case of a calculation.
Only add here the payment, if the payment is really made. */
payment?: number | null;
/** Estimated fee of the transaction to Palkkaus.fi. */
fee?: number | null;
/** The GUID for the other party. Currently, this is always the PersonID. */
otherId?: string | null;
/** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */
otherPartyInfo?: AccountInIndex | null;
/** A very short description describing the object as an event. E.g. "Paid salary" */
shortText?: string | null;
/** Business object ids related to this object. E.g. calculations and payrolls in the payment. */
businessObjects?: string[] | null;
/** This is valid for calculations only. The estimated date of salary in worker. */
salaryDate?: string | null;
/** Business data to include further information of the object. */
data?: {
[key: string]: any;
} | null;
/** Version number. May be used in conflicts */
versionNumber?: number | null;
/** Salaxy uri of the resource. */
uri?: string | null;
/** Workflow flags for the object.
Only workflow events with API supported message types are listed. */
flags?: string[] | null;
/** Workflow messages for the object.
Only workflow events with API supported message types are listed.
Shown in format "[MessageType]:[Message] ([User] at [UTC-time])" */
messages?: string[] | null;
/** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */
entityType?: string | null;
/** The date for the actual period for which this object is done. */
logicalDate?: string | null;
/** Reference information. E.g. Payment or MoneyTransfer reference number. */
reference?: string | null;
/** External id for the object in 3rd party system. */
externalId?: string | null;
/** Identifier of the object. */
id?: string | null;
/** Owner ID for this data */
owner?: string | null;
/** Indication that for the currently logged-in account, the data is generally read-only. */
isReadOnly?: boolean | null;
/** Primary partner information. Automatically updated from the storage container Partner. */
partner?: string | null;
}
/** ApiListItemType enumeration */
declare enum ApiListItemType {
Unknown = "unknown",
AccountBase = "accountBase",
CompanyAccount = "companyAccount",
PersonAccount = "personAccount",
WorkerAccount = "workerAccount",
Certificate = "certificate",
SessionUserCredential = "sessionUserCredential",
Onboarding = "onboarding",
Profile = "profile",
Calculation = "calculation",
CalculationPaid = "calculationPaid",
ESalaryPayment = "eSalaryPayment",
Payment = "payment",
EarningsPayment = "earningsPayment",
Employment = "employment",
WorkerAbsences = "workerAbsences",
HolidayYear = "holidayYear",
Taxcard = "taxcard",
PayrollDetails = "payrollDetails",
Invoice = "invoice",
Report = "report",
BlobFile = "blobFile",
PayerSummary = "payerSummary",
CalendarEvent = "calendarEvent",
Usecase = "usecase",
Dataset = "dataset",
Article = "article",
MessageThread = "messageThread",
EmailMessage = "emailMessage",
AccountProducts = "accountProducts",
VarmaPensionOrder = "varmaPensionOrder",
IfInsuranceOrder = "ifInsuranceOrder",
Historical = "historical"
}
/** ApiValidation object that is specialized for list items. Provides if and index properties for connecting a validation to a specific item in the list */
declare interface ApiListItemValidation {
/** Identifier of the item this validation is for.
Identifiers are not always available (if the item has not been saved), so index is a more generic approach. */
id?: string | null;
/** Zero based index of the item this validation is for. */
index?: number | null;
/** If true, the data is valid - no errors. */
readonly isValid?: boolean | null;
/** If true, has required fields missing data. */
readonly hasAllRequiredFields?: boolean | null;
/** Validation errors on invalid field values.
Note that required fields missing error messages are not here. Only the invalid values. */
readonly errors?: ApiValidationError[] | null;
}
/** ApiTestErrorType enumeration */
declare enum ApiTestErrorType {
Default = "default",
UserFriendly = "userFriendly"
}
/** Common base class / interface for data validation. */
declare interface ApiValidation {
/** If true, the data is valid - no errors. */
readonly isValid?: boolean | null;
/** If true, has required fields missing data. */
readonly hasAllRequiredFields?: boolean | null;
/** Validation errors on invalid field values.
Note that required fields missing error messages are not here. Only the invalid values. */
readonly errors?: ApiValidationError[] | null;
}
/** Validation errors used in API output. */
declare interface ApiValidationError {
/** Full path to Name of the property / field (Member name in JSON).
This may be null/empty for type General. */
key?: string | null;
/** High level type: Specifies the relation to object and its Member. */
type: ApiValidationErrorType;
/** Validation error message in the requested language. */
msg: string;
/** Validation error long description in the requested language. */
description?: string | null;
/** Some error providers may have a unique technical code for error or validator */
code?: string | null;
}
/** ApiValidationErrorType enumeration */
declare enum ApiValidationErrorType {
General = "general",
Required = "required",
Invalid = "invalid",
Warning = "warning"
}
/**
* Appends the given element to the current element.
* The existing element will be removed from the source parent element.
* The attribute value should resolve to an existing DOM node or string.
* @example
* ```html
*
* ```
*/
export declare class AppendNodeDirective implements angular_2.IDirective {
/**
* Factory for directive registration.
* @ignore
*/
static salaxyAppendNode(): {
(): AppendNodeDirective;
$inject: any[];
};
/**
* Applies to attributes only.
* @ignore
*/
restrict: string;
/**
* Creates a new instance of the directive.
*/
constructor();
/**
* Evaluates the attribute value (DOM node or default string), and appends it to the current element.
* @ignore
*/
link(scope: any, element: any, attrs: any): void;
}
/** Exception tracking with AppInsight */
export declare class AppInsightExceptionTracking {
/**
* For NG-dependency injection
* @ignore
*/
protected static $inject: string[];
constructor($provide: angular_2.auto.IProvideService);
}
/**
* Supports the UserSession object by providing additional information about the status
* of fetching the session, data, expiration etc.
*/
declare interface AppStatus {
/** If true, the session check from server is in progress */
sessionCheckInProgress: boolean;
/**
* Indicates that we are running in test environment with test data.
* This information is typically available already before the session is available and may be used in login / register.
* Null indicates that the information is not available. This should typically be considered false for security.
*/
isTestData: boolean | null;
/**
* PLACEHOLDER: Indicates that the session has expired (as opposed to not checked yet).
* This property has not yet been implemented.
*/
sessionExpired?: boolean;
/**
* Application specific roles that are set on the client (browser code)
* as opposed to normal server-side defined roles.
*/
clientRoles: string[];
}
/** Request to assure that a company account exists: Either an account is returned or an account stub (non-verified) will be created. */
declare interface AssureCompanyAccountRequest {
/** Company number in the the trade register (Y-tunnus).
Format is "1234567-8" - 7 numbers, one control character, with or without the dash.
Also, the international VAT format is allowed: FI12345678 */
officialId: string;
/** The account identifier at the partner site.
If present, this ID is used to restrict the authorization to one account at partner site only. */
partnerAccountId?: string | null;
/** Contact e-mail */
email?: string | null;
/** Telephone number for the contact person */
telephone?: string | null;
/** First name of the contact person */
contactFirstName?: string | null;
/** Last name of the contact person */
contactLastName?: string | null;
/** The primary partner account for the new company to create.
If the company already exists and has given authorization to the primary partner, and does not have any primary partner, the primary partner will be set.
Please note, that the calling account must have the authorization to the primary partner account, or
be the primary partner itself. */
proxyPartner?: string | null;
/** Language preference. */
language?: Language | null;
}
/**
* Component that assures that customer has specified a partner.
* @example
* ```html
* This content is shown if partner selected!
* ```
*/
export declare class AssurePartner extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {};
/**
* The "main" element contents is shown if the partner has been selected. Defaults to current partner info.
* The "header" element is shown before the "main" Defaults to "Service provided by" + an actions drop-down.
*/
transclude: {
main: string;
header: string;
};
/** Uses the AccountAuthorizationController */
controller: typeof PartnerController;
/** The default template for the component. */
defaultTemplate: string;
}
/** Attachment. */
declare interface Attachment {
/** Name of the attachment. E.g. monthly-details-2018-01.pdf */
fileName?: string | null;
/** Content for data. */
contentId?: string | null;
}
/**
* Shows a card for granting authorization
* @example
* ```html
*
* ```
*/
export declare class AuthCard extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/** Id that specifies what auth card to be shown */
authId: string;
/** If set to true, the switch is not shown on the card. */
hideSwitch: string;
};
/** Uses the AccountAuthorizationController */
controller: typeof AccountAuthorizationController;
/** The default template for the component. */
defaultTemplate: string;
}
/** AuthenticationMethod enumeration */
declare enum AuthenticationMethod {
Undefined = "undefined",
EmailPwdLocal = "emailPwdLocal",
Facebook = "facebook",
Google = "google",
Microsoft = "microsoft",
LinkedIn = "linkedIn",
Auth0Database = "auth0Database",
X509 = "x509",
Salaxy = "salaxy",
Test = "test",
WebAuthn = "webAuthn",
MicrosoftOAuth = "microsoftOAuth",
GoogleOAuth = "googleOAuth",
InternalLocalhost = "internalLocalhost"
}
/** A person or other party that authorized the current person. */
declare interface Authority {
/** Name of the authority. */
name?: string | null;
/** Telephone number of the person. This is currently optional.
Idea is to send SMS invitations in some scenarios. */
telephone?: string | null;
/** E-mail of the person. This is currently not used, but is expected to be used in the future.
So fill it in as it was required unless you have very compelling reasons. */
email?: string | null;
/** Finnish Person ID is the key to signature. This is currently always required. */
personalId?: string | null;
/** The Palkkaus.fi Account ID. This is optional and should not be set if the ID is the same as the target account / Person. */
accountId?: string | null;
/** Date for the authorization. */
authorizedAt?: string | null;
}
/** Contract / authorization document that is the bases for Salaxy acting in behalf of this account */
declare interface AuthorizationContract {
/** Time when the contract was signed */
signedAt?: string | null;
/** If true, there is a valid authorization - the account has been validated. */
isSigned?: boolean | null;
/** Type of the authorization */
authorizationType?: AuthorizationType | null;
/** A person or other party that authorized the current person. */
authorizedBy?: Authority | null;
}
/** AuthorizationStatus enumeration */
declare enum AuthorizationStatus {
Undefined = "undefined",
OK = "oK",
AccessDenied = "accessDenied",
ExpiredOauthToken = "expiredOauthToken",
InvalidOAuthToken = "invalidOAuthToken",
NoOauthToken = "noOauthToken"
}
/** AuthorizationType enumeration */
declare enum AuthorizationType {
None = "none",
EmployerAuthorization = "employerAuthorization",
WorkerContract = "workerContract",
CompanyContract = "companyContract",
PartnerContract = "partnerContract",
Manual = "manual",
Temporary = "temporary"
}
/**
* Shows a list of all authorized accounts which can act on behalf of this account.
* @example
* ```html
*
* ```
*/
export declare class AuthorizedAccounts extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
onListSelect: string;
onDelete: string;
onCreateNew: string;
detailsUrl: string;
listUrl: string;
};
/**
* Header is mainly meant for buttons (Usually at least "Add new").
* These are positioned to the right side of the table header (thead).
*/
transclude: {
header: string;
};
/** Uses the AccountAuthorizationController */
controller: typeof AccountAuthorizationController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Provides CRUD access for authenticated user to access a his/her own authorized accounts
*/
declare class AuthorizedAccounts_2 extends CrudApiBase {
/**
* For NG1-dependency injection
* @ignore
*/
static $inject: string[];
/** Base URL for details etc. */
protected baseUrl: string;
constructor(ajax: Ajax);
/**
* Returns an empty avatar without any values.
*/
getBlank(): AuthorizedAvatar;
/**
* Lists all accounts on behalf of which this account has been authorized to act.
*
* @returns A Promise with result data (list of account objects).
*/
getAuthorizingAccounts(): Promise<(PersonAccount | CompanyAccount)[]>;
/**
* Lists all accounts that have authorized the current account to act on their behalf.
* Makes a GET request to the API base URL using the configured Ajax instance.
* @returns A Promise that resolves to an array of PersonAccount and CompanyAccount objects
*/
getAll(): Promise<(PersonAccount | CompanyAccount)[]>;
/**
* OData query is not supported for authorized accounts.
* @param _query OData query parameters (not used)
* @throws Error indicating operation is not supported
*/
getOData(_query: any): any;
/**
* Getting a single authorized account is not supported.
* @param _id Identifier of the account (not used)
* @throws Error indicating operation is not supported
*/
getSingle(_id: any): any;
}
/**
* CRUD functionality for the authorized accounts.
* Additionally listing of authorizing accounts.
*/
export declare class AuthorizedAccountService extends BaseService {
private authorizedAccountsApi;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/**
* String that identifies the service event (onChange/notify).
* Must be unique for the service class.
*/
protected eventPrefix: string;
private authorizingAccounts;
/** Intial data owner */
private initialAuthorizingAccountsOwner;
private currentPartnerSite;
/**
* List of Software/Integration partner sites
*/
private partnerIntegrationSiteList;
constructor($rootScope: angular_2.IRootScopeService, sessionService: SessionService, authorizedAccountsApi: AuthorizedAccounts_2);
/**
* Refreshes existing authorizing accounts.
* @returns A Promise with result data (PersonAccount|CompanyAccount)[]
*/
reloadAuthorizingAccounts(): Promise<(PersonAccount | CompanyAccount)[]>;
/**
* Lists all accounts on behalf of which this account has been authorized to act.
* @returns A Promise with result data (PersonAccount|CompanyAccount)[]
*/
getAuthorizingAccounts(): (PersonAccount | CompanyAccount)[];
/**
* Sets the current partner site
* @param partnerSite A partner site to be set as current
*/
setCurrentPartnerSite(partnerSite: any): void;
/**
* Returns the current partner site
*/
getCurrentPartnerSite(): any;
/**
* Return a list of all possible Integration partner sites
*
* Partner sites are services that have Salaxy or Palkkaus functionality in them. Others are services that have a different sign-in method,
* and these services need an authorization to access user's Salaxy/Palkkaus account. Others use the Salaxy/Palkkaus sign-in method, so they don't
* need separate authorization. Due to some services needing an authorization and others not needing it, all partner services need to be stored in a
* separate property, simply listing authorizations does not suffice.
*
* Partner services that need an authorization have a property accountId, that is the IBAN for their Salaxy acccount
* @returns List of partner site objects.
*/
getPartnerIntegrationSiteList(): any;
/**
* Returns the partner site with given id
* @param id The name of the partner site
* @returns Partner site object with the given id, or undefined.
*/
getPartnerSite(id: any): any;
private refreshAuthorizingAccounts;
}
/** Avatar for authorized account. */
declare interface AuthorizedAvatar {
/** Optional ID for partner authorization.
Used to restrict the authorization based on Partner data (typically user account, role etc.).
Current implementation compares this to partnerAccountId and allows acces only if the two match. */
partnerKey?: string | null;
/** The time when the authorization was done */
authorizedAt?: string | null;
/** Scope for the account authorization.
The value of the scope is expressed as a list of space-delimited, case-sensitive strings. */
scope?: string | null;
/** Entity type: person/company */
entityType?: LegalEntityType | null;
/** First name or company name */
firstName?: string | null;
/** Last name, for companies, this should be null */
lastName?: string | null;
/** Display name. For a person this is 'FirstName LastName' (auto-created). */
displayName?: string | null;
/** Sortable name for ordered lists etc. For a person this is 'LastName, FirstName' (auto-created).
Depending on the data storage, this may be all-lowercase for easier sorting and search. */
sortableName?: string | null;
/** Type of the Avatar picture. */
pictureType?: AvatarPictureType | null;
/** Color - currently only used by type Icon */
color?: string | null;
/** Initials - currently only used by type Icon */
initials?: string | null;
/** URL of the picture if specified as picture (null in a case of type Icon) */
url?: string | null;
/** Short description of the user.
This may be overriden by a context specific value by the business logic. */
description?: string | null;
/** Identifier of the object. */
id?: string | null;
/** The date when the object was created. */
createdAt?: string | null;
/** The time when the object was last updated.
Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */
updatedAt?: string | null;
/** Owner ID for this data */
owner?: string | null;
/** Indication that for the currently logged-in account, the data is generally read-only. */
isReadOnly?: boolean | null;
/** Primary partner information. Automatically updated from the storage container Partner. */
partner?: string | null;
}
/**
* Shows a list of all authorizing accounts on behalf of which this account can act.
* @example
* ```html
*
* ```
*/
export declare class AuthorizingAccounts extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {};
/**
* Header is mainly meant for buttons (Usually at least "Add new").
* These are positioned to the right side of the table header (thead).
*/
transclude: {
header: string;
};
/** Uses the AccountAuthorizationController */
controller: typeof AccountAuthorizationController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Shows the Palkkaus Avatar image: This is either an image or a font-icon with a user specific color/initilas combination.
* @example
* ```html
*
* ```
*/
export declare class Avatar extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/** The Avatar object that should be rendered */
avatar: string;
};
/** Uses the AvatarController */
controller: typeof AvatarController;
/** The default template for the component. */
defaultTemplate: string;
/** Rendered HTML replaces the original element */
replace: true;
}
/** Defines an avatar for an account, profile etc. - mainly the image that should be shown, names and short description */
declare interface Avatar_2 {
/** Entity type: person/company */
entityType?: LegalEntityType | null;
/** First name or company name */
firstName?: string | null;
/** Last name, for companies, this should be null */
lastName?: string | null;
/** Display name. For a person this is 'FirstName LastName' (auto-created). */
displayName?: string | null;
/** Sortable name for ordered lists etc. For a person this is 'LastName, FirstName' (auto-created).
Depending on the data storage, this may be all-lowercase for easier sorting and search. */
sortableName?: string | null;
/** Type of the Avatar picture. */
pictureType?: AvatarPictureType | null;
/** Color - currently only used by type Icon */
color?: string | null;
/** Initials - currently only used by type Icon */
initials?: string | null;
/** URL of the picture if specified as picture (null in a case of type Icon) */
url?: string | null;
/** Short description of the user.
This may be overriden by a context specific value by the business logic. */
description?: string | null;
/** Identifier of the object. */
id?: string | null;
/** The date when the object was created. */
createdAt?: string | null;
/** The time when the object was last updated.
Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */
updatedAt?: string | null;
/** Owner ID for this data */
owner?: string | null;
/** Indication that for the currently logged-in account, the data is generally read-only. */
isReadOnly?: boolean | null;
/** Primary partner information. Automatically updated from the storage container Partner. */
partner?: string | null;
}
/**
* Controller rendering a Salaxy account Avatar (image for the person / company).
*/
export declare class AvatarController implements angular_2.IController {
/**
* For NG-dependency injection
* @ignore
*/
static $inject: never[];
/** The Avatar object which the controller is rendering */
avatar: any;
/**
* Creates a new AvatarController
* @ignore
*/
constructor();
/**
* Implement IController
*/
$onInit: () => void;
/** Returns true if the avatar is an image url (as opposed to icon rendering) */
get isImage(): boolean;
/** Returns true if the avatar should be rendered as a person icon */
get isPersonIcon(): boolean;
/** Returns true if the avatar should be rendered as a company icon */
get isCompanyIcon(): boolean;
/** Returns the avatar color or 'gray' if nothing is defined. */
get color(): string;
/** Returns the initials for rendering the avatar */
get initials(): string;
/**
* Return the color for the avatar icon and line strokes.
* If some colors require adjustments due to accessibility reasons, they can be implemented here.
*/
private getColor;
}
/** AvatarPictureType enumeration */
declare enum AvatarPictureType {
Icon = "icon",
Uploaded = "uploaded",
Gravatar = "gravatar"
}
/** First version of the product that integrates the Palkkaus.fi-salary payments to employers accounting. */
declare interface BaseSalaryProduct {
/** If true, worker salary and expense payments are paid directly by the employer. */
isWorkerSelfHandling?: boolean | null;
/** Receiver's address for the e-invoice. */
eInvoiceReceiver?: string | null;
/** Receiver's operator for the e-invoice. */
eInvoiceIntermediator?: string | null;
/** SEPA maksatustunnus */
sepaBankPartyId?: string | null;
/** Identifier for the product */
readonly id?: string | null;
/** The main short title for the product / service */
readonly title?: string | null;
/** The status text that should give the user.
Restrict the length to 56 characters. */
readonly status?: string | null;
/** One paragraph description text */
readonly description?: string | null;
/** The logo image for the product. */
readonly img?: string | null;
/** Identifier for the main product desription article in the Palkkaus.fi CMS */
readonly articleId?: string | null;
/** If true, the product is enabled for the current user */
enabled?: boolean | null;
/** If false, it is not bossible to enable this product for the current account / environment.
Typically, this means that the UI should not show this product. */
visible?: boolean | null;
/** Indicates (true-value) if the end user has confirmed the product options.
If false, the end user has not confirmed the option. */
visited?: boolean | null;
}
/**
* Legacy service model: Stores the edited items in browser session context.
* Most new implementations should use the new API CRUD model instead.
* However, this service model may still be the right choice in certain circumstances where the editable data should be
* cached or is already in session (like account data).
*/
declare abstract class BaseService implements IService {
private $rootScope;
protected sessionService: SessionService;
private api;
/**
* List of items loaded to the service.
* Empty list if items are still been loaded.
*/
list: T[];
/** Currently selected item. */
current: T;
/** Set to true when the initial data hase been loaded from the server (not the anonymous dummy data). */
isInitialDataLoaded: boolean;
/** Intial data owner */
private initialOwner;
/**
* String that identifies the service event (onChange/notify).
* Must be unique for the service class.
*/
protected abstract eventPrefix: any;
constructor($rootScope: angular_2.IRootScopeService, sessionService: SessionService, api: CrudApiBase);
/**
* Gets all items from the service's base URL endpoint.
* Makes a GET request to the API base URL using the configured Ajax instance.
* @returns A Promise that resolves to an array of items of type T.
*/
getAll(): Promise;
/**
* Reloads the list from the server - called in init and e.g. after Delete and Add new
* @returns A Promise with result data
*/
reloadList(): Promise;
/**
* Client-side (synchronous) method for getting a new blank item as bases for UI binding.
* @returns A Blank item with default values.
*/
getBlank(): T;
/**
* Get the identifier of the current item, null if none is selected.
* @returns The identifier of current item, or null if not set
*/
getCurrentId(): string | null;
/**
* Set the current item by id.
* If id parameter is "new", the item is set to a new blank item.
* If id paramter is null, the current item is set to null.
* @param id - The Identifier for the item to set as current
*/
setCurrentId(id: "new" | string): void;
/**
* Set the current item to given item
* @param item - The item to set as current
*/
setCurrent(item: T): void;
/**
* Sets the current item to a new blank item.
*/
newCurrent(): void;
/**
* Saves the current item to database.
* @returns A Promise with result data: The current object after round-trip to server.
*/
saveCurrent(): Promise;
/**
* Saves the given item to database.
* @param item - Item to be saved
* @returns A Promise with the item after the round-trip to server.
*/
save(item: T): Promise;
/**
* Deletes the specified item.
* @param id - The identifier for the item to be deleted
* @returns A Promise with result data ("Object deleted")
*/
delete(id: string): Promise;
/**
* Creates a copy of a given item.
* This method does not yet set the item as current.
* @param copySource Item to copy as new.
*/
copyAsNew(copySource: T): T;
/**
* INTERNAL ONLY: This functionality is under consideration.
* We may not support it in the future and we may remove it without it being a breaking change.
*
* Controllers can subscribe to changes in service data using this method.
* Read more about the pattern in: http://www.codelord.net/2015/05/04/angularjs-notifying-about-changes-from-services-to-controllers/
* @param scope - Controller scope for the subscribing controller (or directive etc.)
* @param callback - The event listener function. See $on documentation for details
* @ignore
*/
onChange(scope: angular_2.IScope, callback: (event: angular_2.IAngularEvent, ...args: any[]) => any): void;
/** INTERNAL ONLY: Emits the service event (typically list reload). This functionality may be dropped in future versions without warning. */
protected notify(): void;
private init;
}
/**
* Client-side logic for Usecase.
*/
declare abstract class BaseUsecaseLogic {
/**
* Updates the usecase values based on user input without going to the server.
* @param _row Row to update.
* @param _date The reference date for which the logic is done.
* Typically the salary date of a calculation and the typically, the information needed is just the year for which the yearly changing numbers are fetched, but may later have more extended features.
* @param _calcData The calculation related data that is required by the more complex calculations:
* This data is available only after first round-trip to the server (results object exists) and not all user interfaces may provide this.
*/
updateUsecase(_row: UserDefinedRow, _date: DatelyObject, _calcData: RowUsecaseCalcData | undefined): void;
/**
* Gets validation message for the usecase.
* @param row Row to validate
* @returns A message that is either an error or OK (default). Warnings, info etc. may later be supported.
*/
getValidation(row: UserDefinedRow): UsecaseValidationMessage | undefined;
/** Internal validation method that deriving classes should implement. */
protected abstract getUcValidation?(row: UserDefinedRow): UsecaseValidationMessage | undefined;
/**
* Returns true if the row type supports negative values.
* Typically, this means that the sum of all rows must still be zero or positive.
* @param rowType Row type to check
*/
private canHaveNegativeRow;
}
/**
* Used for running batch processes to the server.
* At the time of writing, the controller isonly used in Modal dialogs, but may�be used for something else later.
*/
export declare class BatchProcessController implements angular_2.IController {
protected $uibModalInstance: any;
private $timeout;
private jsonSchemaService;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** Counter and status for the processing of the items */
processCounter: {
/** If true, the processing is in progress (started and not yet done). */
isProcessing: boolean;
/** If true, the processing is done. Note that this may also mean that the processing has been canceled by the user. */
isDone: boolean;
/** Total count of items that should be processed. */
totalCount: number;
/** Count of items that have been processed. Note that also errors are counted as processed. */
processedCount: number;
/** Errors that occured. */
errorsCount: number;
/** If true, the process has been canceled by the user. If also isDone is true, the canceling has completed. */
canceling: boolean;
};
/** Options for the modal dialog */
dialogHeader: string;
/** Columns that are shown in the grid. Leave empty use default columns */
columns: string | (string | ColumnDefinition)[];
/** List of items that should be processed. */
list: any[];
/** Usecase specific data for the dialog. */
data: any;
/**
* Method that is called by the process.
* ItemOrArray is the item/array that is processed, Data is the controller data that may be edited in the form.
* The promise may return a message that is shown after text "OK".
* Promise rejection is cached.
*/
method: (itemOrArray: any | any[], data: any) => Promise<({
message: string;
result: any[];
}[])>;
/**
* Optional chunk size for the batch process. This is used if the method supports arrays.
*/
chunkSize: number;
/** Start process right after opening the invoice. */
autoStart: boolean;
/** Close dialog after process. */
autoClose: boolean;
/** Options that are bound to the grid. */
tableOptions: SxyTableOptions;
/** Inner template that is included for usecase specific form and other UI. */
batchTemplateUrl: string;
/** Binding for start button, which launches the processing. */
isProcessStarted: boolean;
/** The table controller after it has been initialized. */
$table: SxyTableController;
/** References a schema document directly: the schema document is not fetched from the UI */
openApiDoc: any;
/**
* URL for the Open API document that contains the definition for the type.
* The url can be an absolute url, relative url or an url with salaxy-secure/ -prefix.
* The salaxy-secure/ -prefix will be replaced in runtime with the salaxy api server url of the curren environment.
*/
openApi: string;
/** The schema model */
schemaModel: OpenAPIV3.SchemaObject;
/** If true, the schema loading is ready. */
isReady: boolean;
/**
* Constructor for dependency instance.
* @param $uibModalInstance Modal instance supports functions such as close(result), dismiss(reason) and promises result, opened, closed and rendered.
* @param data Rest of the data injected from the caller.
*/
constructor($uibModalInstance: any, data: any, $sce: angular_2.ISCEService, $timeout: angular_2.ITimeoutService, jsonSchemaService: JsonSchemaService);
/** Initialization */
$onInit: () => void;
/** Starts the processing */
startProcess(): void;
/** Processes next items in the queue */
processNextItems(): void;
private processNextItemsInternal;
/** Closes the dialog. */
close(): void;
/** Resets the processed status column(s) */
resetProcessed(): void;
/** Cancels the process: Waits for the next response, but does not start a new one. */
cancelProcess(): void;
private getColumns;
/**
* Gets a column definition for avatar column: Renders an avatar with sortable name and second info line.
* @param party The party to render: either "owner" (ownerInfo) or "other" (otherPartyInfo).
* @param title The title of the column.
* @param props Other properties that should be set on the column.
*/
getAvatarCols(party: "owner" | "other", title: string, props?: any): any[];
/**
* Gets a column definition for enumerations column
* @param field The field name / path in the data model.
* @param title The title of the column.
* @param enumType The type name of the enumeration.
* @param props Other properties that should be set on the column.
*/
getEnumColumn(field: string, title: string, enumType: string, props?: any): any;
/** Gets the options for the UI grid */
private getGridOptions;
}
/** Name and ids of the owner and the number/percent of shares. */
declare interface BeneficialOwner {
/** Owned number of shares. */
numberOfShares?: number | null;
/** Owned percent of shares. */
percentOfShares?: number | null;
/** Address. */
address?: string | null;
/** Avatar for the account */
avatar?: Avatar_2 | null;
/** Official id of the person or company. */
officialId?: string | null;
/** Email address. */
email?: string | null;
/** Telephone number. */
telephone?: string | null;
/** Bank account number (IBAN) */
ibanNumber?: string | null;
}
/** Contains lists of beneficial owners and other beneficiaries of the company. */
declare interface BeneficialOwners {
/** Additional info about the owned company, e.g. the total number of shares. */
ownedCompanyDetails?: OwnedCompanyInfo | null;
/** List of beneficial owners of the company. */
owners?: BeneficialOwner[] | null;
/** List of other beneficiaries than beneficial owners of the company */
beneficiaries?: Beneficiary[] | null;
/** The workflow data for manual editing and approval purposes. */
workflowData?: WorkflowData | null;
/** Identifier of the object. */
id?: string | null;
/** The date when the object was created. */
createdAt?: string | null;
/** The time when the object was last updated.
Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */
updatedAt?: string | null;
/** Owner ID for this data */
owner?: string | null;
/** Indication that for the currently logged-in account, the data is generally read-only. */
isReadOnly?: boolean | null;
/** Primary partner information. Automatically updated from the storage container Partner. */
partner?: string | null;
}
/**
* Provides CRUD access for beneficiary owners
*/
declare class BeneficialOwnersApi extends SingleItemApiBase {
/**
* For NG1-dependency injection
* @ignore
*/
static $inject: string[];
/** Base URL for details etc. */
protected baseUrl: string;
constructor(ajax: Ajax);
}
/** Other beneficiary of the company than beneficial owner. */
declare interface Beneficiary {
/** Nationality of the beneficiary. */
nationality?: string | null;
/** Avatar for the account */
avatar?: Avatar_2 | null;
/** Official id of the person or company. */
officialId?: string | null;
/** Email address. */
email?: string | null;
/** Telephone number. */
telephone?: string | null;
/** Bank account number (IBAN) */
ibanNumber?: string | null;
}
/** Customer specific business configuration. */
declare interface BizConfig {
/** Flag for disabling the configuration without deleting it. */
disabled?: boolean | null;
/** If specified, defines the start date for the settings.
If in the future, the the settings is inactive. Null (default) means the settings is valid indefinetely from the past. */
startDate?: string | null;
/** If specified, defines the end date for the settings.
Date is inclusive meaning that if EndDate is 31.12., settings is valid until end-of-year: Valid on 31.12. and invalid 1.1.
If in the past, the the settings is inactive. Null (default) means the settings is valid indefinetely to future. */
endDate?: string | null;
/** Name for the configuration. */
name?: string | null;
/** Applicable collective agreement */
cbaCode?: number | null;
/** Employee group. */
employeeGroup?: string | null;
/** Type of the configuration data. It can be a value type or object type. */
dataType?: string | null;
/** Configuration data. */
data?: any | null;
/** Last time the configuration was created/updated. */
updatedAt?: string | null;
/** User who last updated the configuration. */
updatedBy?: string | null;
}
/** The BlobFile stores metadata about miscellaneous BLOB-files that are stored to the system. For example Receipts and Authorizations. */
declare interface BlobFile {
id?: string | null;
/** The logical container - first level folder for the file. */
container?: BlobRepository | null;
/** Strongly typed logical type of the file. For user files, this is a sub folder. */
type?: BlobFileType | null;
/** File type (mime type etc.) based on the ending of the file name.
Null for folders. */
readonly fileType?: FileType | null;
/** A user friendly name that can be used in listings.
In the upload scenarios this is usually the original file name when uploaded.
It is not necessarily unique. No path information */
userFriendlyName?: string | null;
/** Technical file name in storage. In practical terms, this is the relative path
excluding the container part "/[container]/".
I.e. this property is without the starting slash "/".
It must be unique and is used for Uri.
For user files this is constructed "[Username]/[Type]/[UniqueFileName].[xxx]" */
filePath?: string | null;
/** Full unique URI in the storage */
blobUri?: string | null;
/** If created, contains uri to a PNG image for preview purposes. */
previewUri?: string | null;
updatedAt?: string | null;
/** The length of the file in bytes. */
length?: number | null;
/** If true, this is a collection (folder in file system) */
isCollection?: boolean | null;
metadata?: BlobFileMetadata | null;
/** The workflow data for manual editing and approval purposes. */
workflowData?: WorkflowData | null;
}
/** Metadata related to blob files as a strongly typed object. */
declare interface BlobFileMetadata {
/** Whether the document is digitally signed (or manually checked as being signed).
At the time of writing, this is used only for AuthorizationPdf documents. */
isSigned?: boolean | null;
/** Logical date for the file. E.g. first of the month for a monthly report. */
logicalDate?: string | null;
/** Subtype is internal typing within a BlobFileType. This may or may not be a sub-folder.
There is no enumeration on File level - there may be one under services specific to one BlobFileType. */
subType?: string | null;
/** Avatar object related to the report.
For example for the salary payments this is the other party (employer or worker) */
avatar?: Avatar_2 | null;
/** Identifier of the original calculation etc. business object. */
grossSalary?: number | null;
/** This is the payment from the Owner point-of-view:
Total payment for the Employer and Net salary for the Worker in the case of a calculation. */
payment?: number | null;
/** Arbitrary metadata. */
data?: {
[key: string]: any;
} | null;
}
/** BlobFileType enumeration */
declare enum BlobFileType {
Unknown = "unknown",
AuthorizationPdf = "authorizationPdf",
Avatar = "avatar",
TaxCard = "taxCard",
ExpensesReceipt = "expensesReceipt",
Raksaloki = "raksaloki",
Template = "template",
EInvoice = "eInvoice",
Temporary = "temporary",
Settings = "settings",
Messages = "messages",
Record = "record",
MonthlyReport = "monthlyReport",
YearlyReport = "yearlyReport",
CalcReport = "calcReport"
}
/** BlobRepository enumeration */
declare enum BlobRepository {
UserFiles = "userFiles",
VersionHistory = "versionHistory",
SystemFiles = "systemFiles",
Payload = "payload",
Reports = "reports",
CdnImages = "cdnImages",
Iam = "iam",
GitContent = "gitContent",
FileSystemContent = "fileSystemContent"
}
/** BootstrapStyle enumeration */
declare enum BootstrapStyle {
Default = "default",
Primary = "primary",
Success = "success",
Info = "info",
Warning = "warning",
Danger = "danger"
}
/** Brand specific business data for index. */
declare interface BrandData {
/** Url to logo. */
logo?: string | null;
/** Css path. */
skin?: string | null;
}
/** Represents a single item in a list of brands. */
declare interface BrandListItem {
/** The date when the object was created. */
createdAt?: string | null;
/** The time when the object was last updated.
Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */
updatedAt?: string | null;
/** Last date of modification of the object. The modification can be produced by the end user or by the system. */
timestamp?: string | null;
/** Person GUID for the owner of the object. */
ownerId?: string | null;
/** Metadata for the owner */
ownerInfo?: AccountInIndex | null;
/** The main status depending on the type of the object. */
status?: string | null;
/** The back office status depending on the type of the object. */
backOfficeStatus?: string | null;
/** When the event started. Typically, this is the CreatedAt date, but it may be something else. */
startAt?: string | null;
/** This is the end date of the event.
Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */
endAt?: string | null;
/** Gross salary if that is relevant to the transaction. */
grossSalary?: number | null;
/** This is the payment from the Owner point-of-view:
Total payment for the Employer and Net salary for the Worker in the case of a calculation.
Only add here the payment, if the payment is really made. */
payment?: number | null;
/** Estimated fee of the transaction to Palkkaus.fi. */
fee?: number | null;
/** The GUID for the other party. Currently, this is always the PersonID. */
otherId?: string | null;
/** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */
otherPartyInfo?: AccountInIndex | null;
/** A very short description describing the object as an event. E.g. "Paid salary" */
shortText?: string | null;
/** Business object ids related to this object. E.g. calculations and payrolls in the payment. */
businessObjects?: string[] | null;
/** This is valid for calculations only. The estimated date of salary in worker. */
salaryDate?: string | null;
/** Business data to include further information of the object. */
data?: BrandData | null;
/** Version number. May be used in conflicts */
versionNumber?: number | null;
/** Salaxy uri of the resource. */
uri?: string | null;
/** Workflow flags for the object.
Only workflow events with API supported message types are listed. */
flags?: string[] | null;
/** Workflow messages for the object.
Only workflow events with API supported message types are listed.
Shown in format "[MessageType]:[Message] ([User] at [UTC-time])" */
messages?: string[] | null;
/** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */
entityType?: string | null;
/** The date for the actual period for which this object is done. */
logicalDate?: string | null;
/** Reference information. E.g. Payment or MoneyTransfer reference number. */
reference?: string | null;
/** External id for the object in 3rd party system. */
externalId?: string | null;
/** Identifier of the object. */
id?: string | null;
/** Owner ID for this data */
owner?: string | null;
/** Indication that for the currently logged-in account, the data is generally read-only. */
isReadOnly?: boolean | null;
/** Primary partner information. Automatically updated from the storage container Partner. */
partner?: string | null;
}
/**
* Fires the necessary Bootstrap 5 initialization for the given element.
* @example
* ```html
* inline links
* ```
*/
export declare class Bs5Popover implements angular_2.IDirective {
/**
* Factory for directive registration.
* @ignore
*/
static salaxyBs5Popover(): {
(): Bs5Popover;
$inject: any[];
};
/**
* Applies to attributes only.
* @ignore
*/
restrict: string;
/**
* Creates a new instance of the directive.
*/
constructor();
/**
* Attaches the appropriate Bootstrap scripts to the element.
* @ignore
*/
link(scope: any, element: JQLite, attrs: any): void;
}
/**
* Fires the necessary Bootstrap 5 initialization for the given element.
* @example
* ```html
* inline links
* ```
*/
export declare class Bs5Tooltip implements angular_2.IDirective {
/**
* Factory for directive registration.
* @ignore
*/
static salaxyBs5Tooltip(): {
(): Bs5Tooltip;
$inject: any[];
};
/**
* Applies to attributes only.
* @ignore
*/
restrict: string;
/**
* Creates a new instance of the directive.
*/
constructor();
/**
* Attaches the appropriate Bootstrap scripts to the element.
* @ignore
*/
link(scope: any, element: JQLite, attrs: any): void;
}
/**
* Provides CRUD access for business templates.
*/
declare class BusinessTemplates extends CrudApiBase {
/**
* For NG1-dependency injection
* @ignore
*/
static $inject: string[];
/** Base URL for details etc. */
protected baseUrl: string;
constructor(ajax: Ajax);
/** Client-side (synchronous) method for getting a new blank item as bases for UI binding. */
getBlank(): Template_2;
}
/** Provides a way to cache lists and items to centralized cache. */
export declare class CacheService {
/** The raw cache array */
private rawCache;
/** Return true if the given item is in the cache. */
hasData(key: string, url: string): boolean;
/** Returns the data if exists / is valid. */
getData(key: string, url: string): any;
/** Returns the full cache data based on key without any validation. */
getFullCache(key: string): {
/**
* URL that was called to fetch the cache.
* Technically, this can be any string that just determines whether the URL / query has changed.
*/
url: string;
/** The payload for the cache. */
data: any;
/**
* Time when the cache expires.
* This is time in milliseconds, i.e. Date().getTime().
*/
validMs: number;
} | null;
/**
* Sets the new data to the cache.
* @param key The cache key. Defining the instance where the cache is being used.
* If null, does nothing.
* @param url URL that was called to fetch the cache.
* Technically, this can be any string that just determines whether the URL / query has changed.
* @param data Data that is cached
* @param expiresSeconds Time to live for the data in seconds starting from the current time.
*/
setData(key: string, url: string, data: any, expiresSeconds: number): void;
/** Clears the entire cache - all keys. */
clearAllKeys(): void;
/** Clears a given cache key */
clear(key: string): void;
}
/**
* The **salaxy.ng1.components.Calc** is the generic Angular-based salary calculator implementation.
* It shows the basic features required for a salary calculator user interfaces:
*
* 1. Setting the Worker for the calculation
* 2. Defining the Worktime information: Period, Absences and holidays.
* 3. Defining the Salary and the benefits
* 4. Defining Expenses, benefits, household subsidies etc.
* 5. Showing the results as charts and reports.
*
* Controllers are defined in **salaxy.ng1.controllers**. Most of the functionality comes from Calculator2019Controller.
* The views can be modified separately for each component using the templateUrl. See documentation for details.
* @example
* ```html
*
* ```
*/
export declare class Calc extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
[boundProperty: string]: string;
anonOptions: string;
detailsUrl: string;
listUrl: string;
model: string;
isReadOnlyForced: string;
};
/** Uses the Calculator2019Controller */
controller: typeof Calculator2019Controller;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Chart.js based chart.
* @example
* ```html
*
* ```
*/
export declare class CalcChart extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/** Calculation for which the chart is rendered. */
calc: string;
/** Role for which the chart is rendered. Currently, 'worker' and 'employer' are supported. Employer is the default. */
role: string;
/** If true, the Y axis of this chart is scaled so that if worker and employer charts are side to side, their Y axis are the same */
scaleYAxis: string;
/** Type of the chart - "pie" and "bar" (default) are currently supported. */
chartType: string;
/** - colors: Custom colors for the chart as a string containing hex values of the colors, separated by comma */
colors: string;
};
/** Uses the CalcChartController */
controller: typeof CalcChartController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Controller for employer and worker charts using chart.js
*/
export declare class CalcChartController implements angular_2.IController {
private $element;
private $timeout;
private $scope;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** Role for which the chart is rendered: employer (default) or worker */
role: "employer" | "worker";
/** Calculation that is rendered. */
calc: Calculation;
/** Y axis scale */
scaleYAxis: boolean;
/** Chart type: "pie" and "bar" (default) are currently supported. */
chartType: "pie" | "bar";
private chart;
/** Created datasets from Calculation input */
private datasetData;
private barChartOptions;
private pieChartOptions;
private chartColors;
constructor($element: JQLite, $timeout: angular_2.ITimeoutService, $scope: angular_2.IScope);
/** Initializes the controller. */
init(): void;
/** Creates chart based on data and options to canvas or updates chart if it already exists */
createChart(): void;
/**
* Updates provided current chart
* "none" parameters means no animation for update
*/
updateChart(): void;
/**
* Calculates and sets a proper Y axis max value for a given value
* @param value The number of the highest bar in chart
*/
private setChartYAxisLimit;
private getChartData;
private formatCurrency;
private setChartOptions;
private getDatasets;
private setChartColors;
private get getDatasetData();
}
/**
* Shows the cost accounting details for the calculation.
* @example
* ```html
*
* ```
*/
export declare class CalcCostAccounting extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/** The calculation. */
calc: string;
/** Forced read only state */
readOnly: string;
/**
* Optional CostAccountingDimensionDefinitions
* If not set, cost accounting dimensions and their options are read from the settings.
*/
dimensions: string;
/**
* Style of the inputs.
* Supports empty or 'openClose'. Only available in not readOnly
*/
inputMode: string;
};
/** Uses the CalcCostAccountingController */
controller: typeof CalcCostAccountingController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Handles the user interaction for entering cost accounting data for the calculation.
*/
export declare class CalcCostAccountingController extends CostAccountingController {
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** The calculation*/
calc: Calculation;
/**
* Creates a new CalcCostAccountingController
* @ignore
*/
constructor(sessionService: SessionService);
/**
* Implement IController
*/
$onInit(): void;
/**
* Returns true if the current calculation is read only.
*/
get isReadOnly(): boolean;
/** Returns the cost accounting model type */
get isLegacy(): boolean;
/** Returns total cost center percentage */
getLegacySum(): number;
/** Returns current costCenter. */
get costCenter(): any;
}
/**
* Shows lists of calculations
* @example
* ```html
*
* ```
*/
export declare class CalcDashboard extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/**
* Option to hide new calc button.
* Set this true if the site has action buttons configured elsewhere.
*/
hideButton: string;
/** If readOnly is true, edit, copy etc. buttons from the new list view are hidden if readOnly property is supported */
readOnly: string;
};
/** Uses the ODataQueryController */
controller: typeof ODataQueryController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Editor for the given calculation.
* @example
* ```html
*
* ```
*/
export declare class CalcEditor extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
[boundProperty: string]: string;
detailsUrl: string;
listUrl: string;
model: string;
isReadOnlyForced: string;
};
/** Uses the CalcReportController */
controller: typeof CalculationEditorController;
/** The default template for the component. */
defaultTemplate: string;
}
/** Employer of a calculation */
declare interface CalcEmployer {
/** Display image information and type of employer.
NOTE: Recalculate-method retains the values for display purposes if AccountId or IsSelf is not set.
This is mainly for demo and testing in anonymous mode.
However, in storage methods, the value is reset based on values of AccountId or IsSelf
even if they are not set: Anything stored in Avatar will be ignored. */
avatar?: Avatar_2 | null;
/** The Palkkaus.fi Account identifier for the Employer. */
accountId?: string | null;
/** True if Profile is the current Authorization.
If set to true, will set current Authorization as this contract party.
This overrides any value in AccountId, so be sure to switch this back to false if this is switchable.
Setting to False does not have any immediate effect. */
isSelf?: boolean | null;
/** Current address of the employer.
Please note that this is a read only field. */
contact?: Contact | null;
/** Official id of the person or company.
Please note that this is a read only field. */
officialId?: string | null;
}
/**
* Shows / edits the relevant employment relation:
* Employer, if the current user is worker
* Worker, if the current user is employer or potentially both in some future admin / pro scenarios.
* @example
* ```html
*
* ```
*/
export declare class CalcEmployment extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/** The calculation that is being edited */
model: string;
/**
* If true, will also update the calculation rows from employment relation when the employment
* relation is selected. By default, does not update the rows.
*/
updateRows: string;
};
/** Uses the CalcEmploymentController */
controller: typeof CalcEmploymentController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Allows editing the employmen
*/
export declare class CalcEmploymentController implements angular_2.IController {
private uiHelpers;
private uiCrudHelpers;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/**
* Setter for the calculations controller that edits the current item.
* Possibility to support other data types.
*/
model: CalculationCrudController;
/**
* If true, will also update the calculation rows from employment relation when the employment
* relation is selected. By default, does not update the rows.
*/
updateRows: boolean;
constructor(uiHelpers: UiHelpers, uiCrudHelpers: UiCrudHelpers);
/** Gets the current calculation. By convention, set in model. */
get current(): Calculation;
/**
* Opens a dialog that shows the wizard to create a new Employment relation.
*/
launchEmploymentWizard(): void;
}
/** CalcGroup enumeration */
declare enum CalcGroup {
Undefined = "undefined",
BaseSalary = "baseSalary",
SalaryAdditions = "salaryAdditions",
Benefits = "benefits",
Expenses = "expenses",
Deductions = "deductions",
OtherNoPayment = "otherNoPayment",
Totals = "totals",
Disabled = "disabled"
}
/**
* UI for setting the Household Usecases within the calculator
* @example
* ```html
*
* ```
*/
export declare class CalcHouseholdUsecase extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/** The calculation that the component edits */
calc: string;
/** Alternative data binding: creates a calculation based on Worker defaults. */
worker: string;
/**
* Shows the Save and Reset buttons.
* Currently, this is only enabled for WorkerAccount data binding, but may later be enabled for calc.
*/
showSave: string;
/** isReadOnly*/
isReadOnly: string;
};
/** Uses the CalcHouseholdUsecaseController */
controller: typeof CalcHouseholdUsecaseController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Handles the user interaction of Worktime within the Calculator.
* The Worktime contains the logic for fetching holidays and absences
* for that particular period and adding calculation rows for them if necessary.
*/
export declare class CalcHouseholdUsecaseController implements angular_2.IController {
private uiHelpers;
private calcApi;
private workersApi;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** User interface shortcuts for period selection */
periodShortcuts: {
/** Text for current month. */
monthCurrent: string;
/** Text for last month. */
monthLast: string;
/** Text for other month. */
monthOther: string;
/** Text for two weeks. */
weeks2: string;
/** Text for half a month */
monthHalf: string;
/** Text for other period. */
other: string;
};
/** The calculation that the controller edits. */
calc: Calculation;
/** Alternative data binding: creates a calculation based on Worker defaults. */
worker: WorkerAccount;
/**
* Shows the Save and Reset buttons.
* Currently, this is only enabled for WorkerAccount data binding, but mayu later be enabled for calc.
*/
showSave: boolean;
/**
* If true, indicates that we are editing salary template information for employment relation:
* Not a concrete calculation.
*/
isEmployment: boolean;
/** If true, the UI is in read-only mode. */
isReadOnly: boolean;
/** If there is a validation error in period start, it is added here. */
periodStartDateError: null;
/**
* Worktime data for the period fetched from the server
*/
worktime: CalcWorktime_2;
/** The tree for selecting the calculation usecase (household) */
private tree;
private _periodStartDate;
private _dateRange;
/**
* Creates a new CalcHouseholdUsecaseController
* @ignore
*/
constructor(uiHelpers: UiHelpers, calcApi: Calculations, workersApi: Workers);
/**
* Implement IController
*/
$onInit(): void;
/**
* The use case that we are editing
*/
get usecaseData(): HouseholdUsecase;
/** Gets the view template that is used for showing the usecase details part. */
getTemplate(): string;
/**
* Gets or sets the isHouseholdDeductible within the usecase.
* Currently, this is part of the usecase specification and will be set to Salary (household properties in V03) from there.
*/
get isHouseholdDeductible(): boolean;
set isHouseholdDeductible(value: boolean);
/** Gets the current calculation object */
get currentCalc(): Calculation;
/**
* Returns true if there is no net salary payment to worker at all.
*/
get isCurrentZeroPayment(): boolean;
/**
* Submit the usecase data and recalculate
*/
submitHouseholdUsecase(): void;
/** Saves the usecase to employment */
saveEmployment(): void;
/**
* Does recalculation on the usecase and and applies it to worker account.
* @returns The updated worker account. The changes are also applied to the worker property.
*/
updateWorkerAccount(): Promise;
/** Resets the usecase from employment */
resetEmployment(): void;
/** Starts the edit mode if the component is in read-only mode. */
startEdit(): void;
/**
* The salary row is the first row is the first row in the rows list
*/
get salaryRow(): UserDefinedRow;
/** Returns true if the usecase has been selected. */
get isUsecaseSelected(): boolean;
/** Gets the label for price input */
get priceLabel(): "Kuukausipalkka" | "Työkorvaus" | "Kertakorvaus" | "Tuntipalkka" | "Kokonaiskustannus" | "Nettopalkka" | "Hinta";
/**
* Select and set usecase in UI
*/
selectUsecase(usecase: any): void;
/** Resets the price and amount when row type is changed. */
changeRowType(): void;
/**
* Resets the usecase to empty: Shows the usecase selection again.
*/
resetUsecase(): void;
/** Getter and setter for Calculation daterange in compatible format for new DateRange component. */
get dateRange(): DateRange_2;
set dateRange(value: DateRange_2);
/**
* Called when the date range changes.
* @param noPeriodStartDateUpdate If true, the _periodStartDate is not updated.
* Should be true if the change is triggered by that input to avoid UI flickering.
*/
dateRangeChange(noPeriodStartDateUpdate?: boolean): void;
/**
* Gets or sets the period start date, which is bound to editable input in case the period type
* is not "other" (date the range / calendar component)
*/
get periodStartDate(): string;
set periodStartDate(value: string);
/**
* Gets the user interface shortcut for the period type:
* Different user interfaces are shown depending on the period shortcut.
*/
get periodShortcut(): "monthCurrent" | "monthLast" | "monthOther" | "weeks2" | "monthHalf" | "other";
set periodShortcut(value: "monthCurrent" | "monthLast" | "monthOther" | "weeks2" | "monthHalf" | "other");
private initDateRanges;
}
/**
* User interface for calculation mass loading.
* @example
* ```html
*
* ```
*/
export declare class CalcImport extends DataImportComponentBase {
/** Uses the CalcImportController */
controller: typeof CalcImportController;
}
/**
* Controller for calculation imports.
*/
export declare class CalcImportController extends DataImportControllerBase {
private importsApi;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** Boolean indicating if the worker validation is in progress. */
isValidating: boolean;
/** Options form */
optionsForm: angular_2.IFormController;
/** Custom options */
customOptions: "addRows" | "removeImportedRows" | "removeAllRows";
private getTargetKey;
private getSourceKey;
private getCheckTargetKey;
private getCheckSourceKey;
private extraValidator;
/**
* Creates a new WorkerImportController
* @ignore
*/
constructor(importsApi: Imports, jsonSchemaService: JsonSchemaService, $timeout: angular_2.ITimeoutService);
/**
* Implement IController
*/
$onInit(): Promise;
/**
* Updates options from the ui.
*/
updateOptions(): void;
/**
* Options validation. If required, override this method in the inheritied class.
*/
hasInvalidOptions(): any;
/** Import data */
import(): Promise;
/** Help */
help(): Promise;
/** Returns extra validator */
getExtraValidators(): Array<{
validate: () => void;
buttonLabel: string;
}>;
protected getImportMapper(): Promise>;
/** Import data */
private validateWorkers;
}
/** Informational object that stores data about the salary calculation / payment that is not directly related to calculating the salary. */
declare interface CalcInfo {
/** Start date of the work */
workStartDate?: string | null;
/** End date of the work */
workEndDate?: string | null;
/** Description of the work for reporting purposes. Max 32 chars. */
workDescription?: string | null;
/** Message from worker to employer - when worker sends the salary calculation to the employer. */
workerMessage?: string | null;
/** Message which will be displayed in the payslip. */
salarySlipMessage?: string | null;
/** Payment reference number in payment service */
paymentId?: string | null;
/** Original Payment reference number */
originalPaymentId?: string | null;
/** Earnings Payment Report Official id of the sender. */
irSenderOfficialId?: string | null;
/** Channel that is used for payment. */
paymentChannel?: PaymentChannel | null;
/** Application id for invoicing etc. purposes. */
applicationId?: string | null;
/** The MessageThread Id, if this calculation is referred in a message thread. */
messageThreadId?: string | null;
/** Assumed earnings payment report date for the report. */
reportDate?: string | null;
/** Notes related to the payment and other backoffice operations:
For example the justification why the sum is in calculation vs. Paytrail payment. */
backofficeNotes?: string | null;
/** Occupation classification, used at least for Accident insurance purposes, but may be used for other reporting.
For Finnish Salaries use the Statistics Finland
"Classification of Occupations 2010" (TK10): https://www.stat.fi/meta/luokitukset/ammatti/017-2018-05-15/index_en.html */
occupationCode?: string | null;
/** Secondary occupation classification. Some earnings payment reports may require two occupation codes. */
occupationCode2?: string | null;
/** Applicable collective agreement */
cbaCode?: number | null;
/** Employee group. */
employeeGroup?: string | null;
/** Calculated pension insurance payment date. */
pensionPaymentDate?: string | null;
/** Pension insurance reference number. */
pensionPaymentRef?: string | null;
/** Pension insurance payment specifier. */
pensionPaymentSpecifier?: string | null;
/** The Payroll Id, if this calculation is part of a Payroll list. */
payrollId?: string | null;
/** Cost center for reporting purposes. */
costCenter?: string | null;
/** Identifier of the worker in a source system. Used in imports etc.
This is automatically set from the source id of the employment. */
workerSourceId?: string | null;
/** Identifier of the calculation in a source system. Used in imports etc. */
sourceId?: string | null;
}
/**
* Editor for Incomes Register (Tulorekisteri) rows from Calculation.
* @example
* ```html
*
* ```
*/
export declare class CalcIrRows extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
[boundProperty: string]: string;
anonOptions: string;
detailsUrl: string;
listUrl: string;
model: string;
isReadOnlyForced: string;
};
/** Uses the CalcIrRowsController */
controller: typeof CalcIrRowsController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* IR-rows based editor for calculation
*/
export declare class CalcIrRowsController extends Calculator2019Controller {
protected invoicesService: InvoicesService;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/**
* Translated enums
*/
groupingOptions: any;
/**
* Active tab of editor
*/
protected activeTab: number;
private _currentRow;
/**
* Creates a new instance of the controller with dependency injection.
* @ignore
*/
constructor(calcApi: Calculations, uiHelpers: UiHelpers, uiCrudHelpers: UiCrudHelpers, $location: angular_2.ILocationService, $routeParams: any, sessionService: SessionService, reportsService: ReportsService, invoicesService: InvoicesService, ajax: Ajax);
/**
* Implement IController
*/
$onInit(): void;
/** The current row that is being viewed / edited. */
get currentRow(): IrRow;
/** The metadata that describes currentRow */
get currentRowType(): IncomeTypeMetadata;
/** IR-rows that are viewed / edited by the controller */
get irRows(): IrRow[];
/** Sets the current edited / viewd row */
setCurrentIrRow(row: IrRow): void;
/** Deletes a row */
deleteIrRow(row: any): void;
/** Returns true if the row is read-only: Cannot be directly edited. */
get isIrRowReadOnly(): boolean;
/** Updates the current row type. */
updateCurrentRowType(): void;
/** Gets the income type (the metadata) object for the currently selected row. */
getIncomeType(row: any): IncomeTypeMetadata;
/** Adds a new IR row to the collection. */
addIrRow(): void;
}
/**
* Displays payments for current calculation period.
* @example
* ```html
*
* ```
*/
export declare class CalcLeaves extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/** The calculation*/
calc: string;
/** The worktime*/
worktime: string;
};
/** Uses the CalcLeavesController */
controller: typeof CalcLeavesController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Displays leaves for current calculation period.
*/
export declare class CalcLeavesController implements angular_2.IController {
private fullApi;
private uiHelpers;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
annualLeavestoBePaid: AbsencePeriod[];
annualLeavesWaitingForPayment: AbsencePeriod[];
absencesToUse: AbsencePeriod[];
absencesToReject: AbsencePeriod[];
/** Current calculation. */
calc: Calculation;
/** Current worktime. */
worktime: CalcWorktime_2;
/** All holiday years for employment */
employmentHolidayYears: HolidayYear[];
/** Current holiday year for employment */
currentEmploymentHolidayYear: HolidayYear;
/**
* Creates a new CalcReportsController
* @ignore
*/
constructor(fullApi: HolidayYears, uiHelpers: UiHelpers);
/**
* Implement IController
*/
$onInit(): void;
/** Returns final absences periods */
getAbsencesPeriods(): any;
/** Loads holiday years for employment and sets current holiday year */
getHolidayYearsForEmployment(employmentId: string): Promise;
/**
* Moves an item between different payment lists.
* @param item - The item to be moved.
* @param target - The target payment list.
*/
moveItem(item: any, target: "annualLeavestoBePaid" | "annualLeavesWaitingForPayment"): void;
/**
* Moves an item between different payment lists.
* @param item - The item to be moved.
* @param target - The target payment list.
*/
moveAbsenceItem(item: any, target: "absencesToUse" | "absencesToReject"): void;
/**
* Determines if a given leave should be disabled based on its type and whether it's in the list of leaves to be paid.
* @param {AnnualLeave} leave - The leave object to check.
*/
isSelectedToBePaid(leave: AbsencePeriod): boolean;
/**
* Determines if a given absence should be disabled based on it's in the list of absences to use.
* @param {AbsencePeriod} absence - The leave object to check.
*/
isAbsenceSelectedToUse(absence: AbsencePeriod): boolean;
/**
* Determines the style for a given leave based on whether it should be disabled or not.
* @param {AnnualLeave} leave - The leave object to check.
*/
getDisabledStyle(leave: AbsencePeriod): {
"background-color": string;
opacity: string;
} | undefined;
/**
* Determines the style for a given absence based on whether it should be disabled or not.
* @param {AnnualLeave} absence - The absences object to check.
*/
getAbsenceDisabledStyle(absence: AbsencePeriod): {
"background-color": string;
opacity: string;
} | undefined;
/** Returns daysCount sum of annualLeavestoBePaid/bonusPeriodstoBePaid depending on type parameter*/
getAccrualRemaningsToBePaid(type: "holidayPay" | "holidayBonus"): number;
/**
* Shows the edit dialog.
* @param item AnnualLeave to edit.
*/
showEditDialog(item: AbsencePeriod): void;
private newGuid;
}
/**
* Shows a list of calculations
* @example
* ```html
*
* ```
*/
export declare class CalcList extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/** Filters list by given field:value */
filter: string;
/** Max count of calculations to show in the list. */
limitTo: string;
/** Status category for the list. Possible categories: draft, paid. Default is paid */
category: string;
/**
* List of statuses to include in the list.
* WARNING: This may be depricated in v03: Use category and/or $filter instead.
*/
statusList: string;
/**
* Function that is called when user selects an item in the list.
* Note that the event is called only in the selections (single and multi). Not when there is a link to details view in a link list.
* Function has the following locals: value: true/false, item: the last selected/unselected item, allItems: Array of all currently selected items.
* @example
*/
onListSelect: string;
/** Selected items for the case where the list is used as a select list (as opposed to link list). */
selectedItems: string;
/** Type of the view. Currently supports "default", "panel" and "select" */
mode: string;
/** OData query options */
options: string;
/** URL to the OData service. */
url: string;
/** Data passed from the parent to the component / view */
data: string;
/** If readOnly is true, edit, copy etc. buttons from the new list view are hidden if readOnly property is supported */
readOnly: string;
/**
* CRUD controller that implements Delete and potentially other methods about the object.
* If you wish to use this in the view use "as $controllerName" syntax
* @example
*
*/
crudController: string;
};
/** Uses the ODataQueryController */
controller: typeof ODataQueryController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Shows an introduction text (instructions) for the user when user starts a new calculation.
* @example
* ```html
*
* ```
*/
export declare class CalcNewIntro extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
[boundProperty: string]: string;
anonOptions: string;
detailsUrl: string;
listUrl: string;
model: string;
isReadOnlyForced: string;
};
/** Uses the Calculator2019Controller */
controller: typeof Calculator2019Controller;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Editor for repairing the given calculation.
* @example
* ```html
*
* ```
*/
export declare class CalcRepair extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
[boundProperty: string]: string;
detailsUrl: string;
listUrl: string;
model: string;
isReadOnlyForced: string;
};
/** Uses the CalcReportController */
controller: typeof CalcRepairController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Controller for repairing paid calculations.
*/
export declare class CalcRepairController extends Calculator2019Controller {
private repairApi;
private uiHelpersApi;
private reportsApi;
/**
* For NG-dependency injection
*/
static $inject: string[];
/** Data reader for the accounting diffa data. */
accountingDiffDataReader: {
/** Function to read data into given array */
read: (target: string, ruleSet: string, arr: AccountingData[]) => Promise;
/** Optional label for data export */
exportLabel: null;
/** Indicates if the export is not possible */
disabled: () => boolean;
showExpand: boolean;
hasRows: () => boolean;
};
excludeDiffPaths: string[];
/** Calc reports type */
shared: {
reportType: string;
};
private _loading;
private _pendingChanges;
private _accountingDiffData;
private _diffCalc;
private _latestCurrent;
private _latestBase;
private _base;
private _documentFlow;
private _dateRange;
private _baseCfa;
private _currentCfa;
/**
* Creates a new CalculationsProController
*/
constructor(repairApi: Calculations, uiHelpersApi: UiHelpers, uiCrudHelpers: UiCrudHelpers, $location: angular_2.ILocationService, $routeParams: any, sessionService: SessionService, reportsService: ReportsService, invoicesService: InvoicesService, ajax: Ajax, reportsApi: Reports);
/** Initialize */
$onInit(): void;
/**
* Finalize the repair and replace the original version with the new one.
*/
commitRepair(): Promise;
/**
* Update repair
*/
saveRepair(): Promise;
/**
* Recalculate repair
*/
recalculateRepair(): Promise;
/**
* Select taxcard for the repaired calc.
*/
selectTaxcard(): Promise;
/** Original calculation */
get base(): Calculation | null;
/** Document flow for the current calculation */
get documentFlow(): DocumentFlowItem;
/** Calculation total result diff between original and current calculation. */
get diffCalc(): Calculation;
/** Accounting data diff between original and current calculation. */
get accountingDiffData(): AccountingData;
/** Change accounting data target */
onTargetChange(targetId?: string): void;
/** Returns cfa data for base. */
get baseCfa(): any;
/** Returns cfa data for current. */
get currentCfa(): any;
/** Getter and setter for Calculation daterange in compatible format for new DateRange component. */
get dateRange(): DateRange_2;
set dateRange(value: DateRange_2);
/**
* Called when the date range changes.
*/
dateRangeChange(): void;
/**
* Returns valid employment reg codes for the selected pensions company.
* @returns Options for the employment reg codes.
*/
getEmploymentRegCodeOptions(): Array;
/** Load accounting data and calculate diff. */
private loadAccountingDiffData;
private diffAccountingData;
private checkCalculationChange;
private calculateCfa;
}
/**
* Shows the repair info for the current calculation.
* @example
* ```html
*
* ```
*/
export declare class CalcRepairInfo extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
[boundProperty: string]: string;
detailsUrl: string;
listUrl: string;
model: string;
isReadOnlyForced: string;
};
/** Uses the CalcRepairInfoController */
controller: typeof CalcRepairInfoController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Controller for showing possible calculation repair history.
*/
export declare class CalcRepairInfoController extends CalculationCrudController {
protected invoicesService: InvoicesService;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/**
* Creates a new CalcSharingController
* @ignore
*/
constructor(calculationsApi: Calculations, reportsService: ReportsService, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any, sessionService: SessionService, invoicesService: InvoicesService);
/**
* Implement IController
*/
$onInit(): void;
/** Shows a selection list for repaired calculations */
showRepaired(): Promise>;
}
/**
* Shows the report for the given calculation.
* @example
* ```html
*
* ```
*/
export declare class CalcReport extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/** The calculation for the report. */
calc: string;
/** Calculation report type (for example: salarySlip, employerReport or paymentReport) */
reportType: string;
/** Template for the report (for example: salarySlipV2, employerReportV2, paymentReportV2 ) */
templateName: string;
/** If true, uses the current style of the site. The default value is false. */
applySiteStyles: string;
/** The language for report*/
lang: string;
/** If true, adds the preview watermark to the report */
preview: string;
/** Called when the report type has been changed. */
onReportTypeChange: string;
};
/** Uses the CalcReportController */
controller: typeof CalcReportController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Renders a calculation report or a calculation summary report for the given calculation(s).
* Uses Handlebars templates (@salaxy/reports).
*/
export declare class CalcReportController implements angular_2.IController {
private templates;
private ajax;
private $sce;
private settingsService;
private $timeout;
private sessionService;
private reportsApi;
private uiHelpers;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** The calculation(s) for the report. Todo add Calcs*/
calc: Calculation | Calculation[];
/** Template for the report */
templateName: string;
/** Boolean indicating if the refresh is in progress. */
refreshInprogress: boolean;
/**Selected report language */
lang: Language;
/** If true, adds the preview watermark to the preview. */
preview?: boolean;
/**
* Function that is called when the report type has been changed
* Function has the following locals: reportType: the selected report type.
*/
onReportTypeChange: (params: {
/** Selected reportType */
reportType: ReportType | calcReportType;
}) => void;
/** Ref to used SxyTable */
$sxyTable: SxyTableController;
/** The type for the calculation report. */
private _reportType;
private renderedCalc;
private renderedOptions;
private renderedLang;
private htmlData;
private reportOptions;
private reportData;
private isXslLoading;
private xslText;
private sxyTableConfig;
/**
* Creates a new CalcReportController
* @ignore
*/
constructor(templates: Templates, ajax: Ajax, $sce: angular_2.ISCEService, settingsService: SettingsService, $timeout: angular_2.ITimeoutService, sessionService: SessionService, reportsApi: Reports, uiHelpers: UiHelpers);
/**
* Implement IController
*/
$onInit(): void;
/** The type for the calculation report. */
get reportType(): ReportType | calcReportType;
/** The type for the calculation report. */
set reportType(value: ReportType | calcReportType);
/** Bindable and trusted html. */
get html(): any;
/**
* Config for SxyTable
*/
get tableConfig(): {
options: SxyTableOptions;
include: ColumnDefinition[];
data: any[];
};
/**
* Method used to refresh table config
*/
refreshTableConfig(): Promise;
private refreshESalaryXml;
private resolveCumulativeCalculation;
/**
* Refresh calculation report data.
*/
private refresh;
private getDefaultReportOptions;
private getDefaultLanguage;
}
/**
* Shows the salary reports for the given calculations.
* @example
* ```html
* void;
/** Report type */
private _reportType;
private employerLang;
private workerLangs;
/** Report templates and the currently selected template */
private reports;
private sxyTableConfig;
private _epr;
/**
* Creates a new CalcReportsController
* @ignore
*/
constructor(ajax: Ajax, uiHelpers: UiHelpers, sessionService: SessionService, $timeout: angular_2.ITimeoutService, $http: angular_2.IHttpService, reportsApi: Reports, calculationsApi: Calculations);
/**
* Implement IController
*/
$onInit(): void;
/** Sets reportLang and refreshes table if $sxyTable exists */
setReportLang(lang: Language): Promise;
/**
* Get lang for employer reports
* @returns language for calculation
*/
getEmployerLang(): Language;
/**
* Get lang for worker reports
* @param calc selected calculation
* @returns language for calculation
*/
getWorkerLang(calc: Calculation): Language;
/** The type for the calculation report. */
get reportType(): ReportType | calcReportType;
/** The type for the calculation report. */
set reportType(value: ReportType | calcReportType);
/**
* Return languge text to ui
*/
get languageText(): "SALAXY.ENUM.Language.fi.label" | "SALAXY.ENUM.Language.en.label" | "SALAXY.ENUM.Language.sv.label" | "SALAXY.NG1.CalcReportsComponent.reportLanguageWorker" | "SALAXY.NG1.CalcReportsComponent.reportLanguageCompany";
/**
* Exports tabulator based reports data as excel file
*/
downloadExcel(): Promise;
/**
* Shows a download dialog for the given calculations.
* @param inline - If true, the download link opens the pdf into a new web page.
*/
showDownloadDialog(inline?: boolean): void;
/** Reloads the current report */
reload(): void;
/** Loads epr for the calculation */
loadEpr(calc: Calculation): irepr.EarningsPayment;
/**
* Config for SxyTable
*/
get reportTableConfig(): {
options: SxyTableOptions;
include: ColumnDefinition[];
data: any[];
};
private refreshTableConfig;
private getDefaultLanguage;
private checkForEprChange;
}
/**
* Handles user interaction for displaying calculation
*/
export declare class CalcReportsDisplayController implements angular_2.IController {
private uiHelpers;
private calculations;
static $inject: string[];
/**
* Creates a new instance of CalcReportsDisplayController
* @param uiHelpers - Salaxy ui helpers service.
*/
constructor(uiHelpers: UiHelpers, calculations: Calculations);
/**
* Display CalcReports
* @param reportType Report type
* @param calculation BusinessObject
*/
display(reportType: calcReportType, calculation: Calculation): void;
/**
* Display CalcReports
* @param reportType Report type
* @param calculationId BusinessObject id
*/
displayForId(reportType: calcReportType, calculationId: string): Promise;
}
/**
* Report types that are available for calculations as stand-alone (typically pop-up dialog)
*/
declare type calcReportType = "salarySlip" | "employerReport" | "paymentReport" | "paymentSummaryReport" | "accountingReport" | "totalsReport" | "rowsReport" | "irRows";
/**
* Shows the results view for the Calculator
* @example
* ```html
*
* ```
*/
export declare class CalcResults extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
[boundProperty: string]: string;
anonOptions: string;
detailsUrl: string;
listUrl: string;
model: string;
isReadOnlyForced: string;
};
/** Uses the Calculator2019Controller */
controller: typeof Calculator2019Controller;
/** The default template for the component. */
defaultTemplate: string;
}
/** Amount input */
declare interface CalcRowAmountConfig {
/** Label for the input */
label?: string | null;
/** Default value */
default?: number | null;
/** Type of the input control to use */
input?: CalcRowConfigNumberInput | null;
/** Default unit. */
unit?: CalculationRowUnit | null;
/** Allowed units. If not set, only default unit allowed. */
units?: CalculationRowUnit[] | null;
}
/** Configuration for user interface of a Calculation row type: Either built-in or custom. */
declare interface CalcRowConfig {
/** Name / unique identifier of the row type. */
name?: string | null;
/** The built-in row type */
rowType?: CalculationRowType | null;
/** The type string, e.g. "/builtIn/salary" or "/custom/boardMember" */
type?: string | null;
/** Order number in the lists */
order?: number | null;
/** Label for the row type */
label?: string | null;
/** Description for the row type */
descr?: string | null;
/** More info HTML */
moreInfo?: string | null;
/** Categorization of the row types. */
category?: CalculationRowCategory | null;
/** Favorite row types and their sort order.
This is currently fixed, but may later be based on user profile (e.g. most used types). */
favorite?: number | null;
/** Color is based on the category */
color?: string | null;
/** Icon short text is 1-5 characters suitable for icon.
Has 5 characters only if very narrow, e.g. "1" and comma - typically 2-3 chars. */
iconText?: string | null;
/** If the row has a kind selection (the main subtype), definition of the subtypes. */
kind?: CalcRowKindsConfig | null;
/** Group is the first "folder" in the name. Currently either "builtIn" or "custom", but later may have other groupings (e.g. employment groups or just free text). */
group?: CalcRowConfigTypeGroup | null;
/** Price input */
price?: CalcRowPriceConfig | null;
/** Amount input */
amount?: CalcRowAmountConfig | null;
/** The total input or read-only field. */
total?: CalcRowTotalConfig | null;
/** This is only info field for ui */
incomeTypes?: number[] | null;
/** Scripts for the type. */
scripts?: CalcRowScriptConfig[] | null;
}
/** CalcRowConfigNumberInput enumeration */
declare enum CalcRowConfigNumberInput {
Number = "number",
Hidden = "hidden",
ReadOnly = "readOnly"
}
/** CalcRowConfigTypeGroup enumeration */
declare enum CalcRowConfigTypeGroup {
BuiltIn = "builtIn",
Custom = "custom"
}
/**
* Shows the cost accounting details for the calculation row.
* @example
* ```html
*
* ```
*/
export declare class CalcRowCostAccounting extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/** Calculation for the row. */
calc: string;
/** The calculation row. */
row: string;
/** Forced read only state */
readOnly: string;
/**
* Optional CostAccountingDimensionDefinitions
* If not set, cost accounting dimensions and their options are read from the settings.
*/
dimensions: string;
};
/** Uses the CalcRowCostAccountingController */
controller: typeof CalcRowCostAccountingController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Handles the user interaction for entering cost accounting data for the calculation row.
*/
export declare class CalcRowCostAccountingController extends CostAccountingController {
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** The calculation for row */
calc: Calculation;
/** Current row */
row: UserDefinedRow;
/**
* Creates a new CalcCostAccountingController
* @ignore
*/
constructor(sessionService: SessionService);
/**
* Implement IController
*/
$onInit(): void;
/**
* Returns true if the current calculation is read only.
*/
get isReadOnly(): boolean;
/** Returns the cost accounting model type */
get isLegacy(): boolean;
/** Returns total cost center percentage */
getLegacySum(): number;
/** Returns current costCenter. */
get costCenter(): any;
}
/**
* Represents a component for handling dimension input in a calculation row.
* @example
* ```html
*
* ```
*/
export declare class CalcRowDimensionInput extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/** Currently edited row */
row: string;
/** Dimension definition. */
definition: string;
/** Possible inherited dimensions values from upper lever (e.g. calc level to rows) */
inherited: string;
/** Forced read only state */
readOnly: string;
/**
* Style of the inputs.
* Supports empty or 'openClose'. Only available when not readOnly
*/
inputMode: string;
};
/** Uses the CalcRowDimensionInputController */
controller: typeof CalcRowDimensionInputController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Controller for handling row dimension input in the CalcRowsEditor.
*/
export declare class CalcRowDimensionInputController implements angular_2.IController {
private uiHelpers;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** Currently edited row */
row: UserDefinedRow;
/** Current dimension defition */
definition: CostAccountingDimensionDefinition;
/** Possible upper level (e.g. calculation) dimensions that are inherited */
private _inherited;
/** Bindable read-only */
readOnly?: boolean;
/**
* Style of inputs.
* If null or empty, displays normal input.
* - "openeClose" shows readOnly-like input with toggle button to open the field for editing.
*/
inputMode: "" | "openClose";
private _options;
private _newDimensions;
constructor(uiHelpers: UiHelpers);
/** Copy of inherited dimensions */
get inherited(): CostAccountingDimension[];
/** Copy of inherited dimensions */
set inherited(value: CostAccountingDimension[]);
/**
* Returns true if the dimension values are inherited.
*/
isInherited(): boolean;
/**
* Determines if cost sharing is enabled based on the current definition.
* @returns {boolean} True if cost sharing is allowed, otherwise false.
*/
isCostSharingEnabled(): boolean;
/**
* Retrieves the cost sharing values for the current row dimension.
* This method uses a caching mechanism to store the computed values for performance optimization. It truncates the text values to a maximum of 10 characters, appending "..." if the text exceeds this length
* If the dimension is inherited, it filters and maps the inherited dimensions to the required format. Otherwise, it uses the current row's accounting dimensions.
*/
getCostSharingValues(): {
text: string;
value: number;
}[];
/**
* Returns inherited single value.
*/
getInheritedSingleValue(): CostAccountingDimension | undefined;
/**
* Sets single value.
*/
setSingleValue(value: any): void;
/**
* Returns single value.
*/
getSingleValue(): CostAccountingDimension | undefined;
/**
* Returns true if options exists for the dimension.
* @returns True, if an option exists for the value.
*/
hasOptions(): boolean;
/**
* Returns available options for dimension.
*/
getOptions(): {
/** Option value. */
value: any;
/** Option text. */
text: string;
/** Option description. */
title?: string | undefined;
}[];
private cleanDimensions;
private modifyOptions;
}
/**
* Generates documentation and examples for given row (UserDefinedRow)
* @example
* ```html
*
* ```
*/
export declare class CalcRowDocumentation extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/** The calculation row. */
row: string;
};
/** Uses the CalcRowDocumentationController */
controller: typeof CalcRowDocumentationController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Controller responsible for handling the documentation of calculation rows.
* Implements the Angular IController interface.
*/
export declare class CalcRowDocumentationController implements angular_2.IController {
private uiHelpers;
private $timeout;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** Currently edited row */
row: UserDefinedRow;
/**
* An object that holds example data for the CalcRowDocumentationController.
*/
allExamples: RowTypeDocumentation[];
selectedKind: string;
private _isLoading;
tabOptions: {
value: string;
text: number;
}[];
/**
* Constructor to initialize the controller with dependencies.
* @param uiHelpers - Helper utilities for UI operations.
* @param $timeout - Angular's timeout service.
*/
constructor(uiHelpers: UiHelpers, $timeout: angular_2.ITimeoutService);
/**
* Lifecycle hook that is called after the controller's data-bound properties have been initialized.
* Fetches example data from the CDN and updates the loading state.
*/
$onInit(): void;
/**
* Determines if the loader should be displayed.
* @returns {boolean} True if the loader should be shown, false otherwise.
*/
showLoader(): boolean;
/**
* Fetches a file from the CDN.
*/
fetchExamplesFromCdn(): Promise;
/**
* Gets the description text for the current example type.
*/
get example(): RowTypeDocumentation | undefined;
/**
* Generates a local example for the current row type and selected kind.
* This method:
* 1. Checks if there is a valid row to generate an example for
* 2. Determines if the row has a kind configuration
* 3. If conditions are met:
* - Finds or creates an example for the current row type
* - Removes any existing generated examples
* - Creates a new sample with generated code
* - Adds the sample to the examples collection
* 4. Triggers Angular digest cycle via $timeout
*/
generateExampleLocally(): void;
/**
* Gets the code samples for the current row type and kind.
* Results are cached based on the type and kind combination.
*/
get exampleSamples(): {
/** Description of the sample */
description: string;
/** The specific kind/variant of the sample */
kind: string;
/** Code sample */
code: string;
}[];
private generateCodeExample;
}
/**
* Formula editor for a calculation row (UserDefinedRow).
* @example
* ```html
*
* ```
*/
export declare class CalcRowFormula extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/** The calculation row. */
row: string;
};
/** Uses the CalcRowFormulaController */
controller: typeof CalcRowFormulaController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Controller for the CalcRowFormula component that provides formula editing capabilities for calculation rows.
* Used by the CalcRowFormula component to manage formula editing functionality.
* @implements {angular.IController}
*/
export declare class CalcRowFormulaController implements angular_2.IController {
private settingsService;
private uiHelpers;
private employments;
private calculations;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** Currently edited row */
row: RowTypeDefinition;
/** Available properties for scripting */
scriptNames: InputEnumOption[];
selectedEmployment: Employment;
selectedCalc: Calculation;
/** Selected script name for addScript */
selectedScriptName: string;
evalResult: string;
/**
* Creates a new EmbeddedUiController
* @ignore
*/
constructor(settingsService: SettingsService, uiHelpers: UiHelpers, employments: Employments, calculations: Calculations);
/** Gets the description for a script name */
getDescription(scriptName: string): string | undefined;
/** Returns true if the selected script name has already been added. */
get selectedScriptAdded(): boolean;
/**
* Adds a new script expression to the row.
* @param {string} scriptName - The name of the script to add. selectedScriptName is used if not provided.
*/
addScript(scriptName?: string): void;
/** Name of the script that is currently edited in full-dialog editor. */
editingScript?: CalcRowScriptConfig;
/**
* Selects a script for editing in full-dialog editor.
* @param {string} script - The script object to edit.
* Undefined for closing the editor.
*/
editScript(script?: CalcRowScriptConfig): void;
/**
* Removes a script from the row.
* @param {string} script - The script to remove.
*/
removeScript(script: CalcRowScriptConfig): void;
/**
* Determines if the currently edited script can be evaluated.
* A script is evaluatable when all required dependencies are available:
* - A selected employment is set
* - A selected calculation is set
* - A script is currently being edited
* @returns {boolean} True if the script can be evaluated, false otherwise
*/
isScriptEvaluatable(): boolean;
/**
* Evaluates the currently edited script using a wrapped eval pattern.
* The script can refer to $data (which includes sxy and settings).
* @returns {*} The result of the evaluated script.
*/
evaluateEditingScript(): any;
/**
* Opens a dialog to select an existing calculation.
* @returns {Promise} A promise that resolves when the dialog is closed.
*/
addExistingCalc(): Promise;
}
/** Defines a single row kind (sub type) within a row type. */
declare interface CalcRowKindConfig {
/** Text value of the enumeration (lowerCamelCase). */
name?: string | null;
/** Sorting order number of the value within the enum. */
order?: number | null;
/** Label of the enumeration if the translations have been applied. */
label?: string | null;
/** Description of the kind. */
descr?: string | null;
/** Price input */
price?: CalcRowPriceConfig | null;
/** Amount input */
amount?: CalcRowAmountConfig | null;
/** The total input or read-only field. */
total?: CalcRowTotalConfig | null;
}
/** Describes the set of kinds (sub types) used by a row type. */
declare interface CalcRowKindsConfig {
/** Name of the base enumeration (as defined in the usecase / built-in type).
This is not unique in custom row types. */
name?: string | null;
/** Values of the enumeration. */
values?: CalcRowKindConfig[] | null;
}
/** Price input. */
declare interface CalcRowPriceConfig {
/** Label for the input */
label?: string | null;
/** Default value */
default?: number | null;
/** Type of the input control to use */
input?: CalcRowConfigNumberInput | null;
}
/**
* Editor for Calculation rows / usecases.
* Can be bound to a Calculation or to Employment relation.
*/
export declare class CalcRows2019Controller extends ListControllerBase {
private $timeout;
private session;
private $element;
private rowTypeService;
private accountingTargets;
private calculations;
/** Bindings for components that use this controller */
static bindings: CalcRows2019ControllerBindings;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** New empty row for databinding when creating a new row. */
newRow: UserDefinedRow;
/** Currently selected row in 2022 UI. */
current: UserDefinedRow;
/** Title in the Table header */
title: string;
/** Shows edit buttons. Used in Payroll. */
showEditButtons: boolean;
/** Shows gross totals and total payment in table footer */
showGrossTotals: boolean;
/**
* Alternative binding for parent: Give just a stand-alone rows list.
* Setting the row to an array will set these rows to the parent component
* or create a new parent component if no parent component is specified.
* The resolving occures in list get, so the order of setting is not an issue.
*/
rows: UserDefinedRow[];
/**
* Propertieds and logic for the situation where the dialog is displayed as part of row type definition editor.
* If undefined, this is a rows editor (typically for a calculation) and not a row type definition editor.
*/
definitionEditor?: {
/** Mode of the definition editor. */
mode: "builtIn" | "custom" | "prices";
};
/**
* If set, filters the rows based on categories (plus rowTypes if set).
* Note that category error (validation errors) is added later and may not be supported by all parts of the UI.
*/
categories: ("salary" | "salaryCalc" | "holidays" | "salaryAdditions" | "benefits" | "expenses" | "deductions" | "other")[];
/**
* Defines the helper texts and branding color for row type selection list dialog
* (showRowTypeSelectionDialog method)
*/
rowTypeSelectHelp: "salaries" | "benefits" | "expenses" | "deductions";
/** If set, shows only these types (plus categories if set) */
rowTypes: CalculationRowType[];
/** If set, shows only the rows with these statuses. */
statuses: string[] | string;
/**
* If set, shows only these sources in the source drop-down.
* This is a comma separated list of enum values.
*/
rowSources: string;
/** User interface type of the editor: Default is the one used in calculators. */
type: "worktime-import" | "worktime-import-employment" | "salary-defaults" | "default";
/** If true, the current UI is a modal dialog. */
isDialog: boolean;
/** Information on the usecase specific data / UI for this row. */
usecase: {
isLoading?: boolean;
schema?: any;
isDefined?: boolean;
};
/** Hides final cost row. */
hideFinalCostRow: boolean;
/** Default dimension to show in rows editor */
defaultDimension: string;
/** Count of dimension to show in editor */
dimensionCount: number;
_dimensions: CostAccountingDimensionDefinition[];
private _vehicleTypeSelection;
private _vehicleAdditions;
private _dailyAllowanceRegions;
/**
* Creates a new CalcRows2019Controller
* @param uiHelpers - Salaxy UI helpers service.
* @ignore
*/
constructor(uiHelpers: UiHelpers, $timeout: angular_2.ITimeoutService, session: SessionService, editDialogParams: EditDialogParameters, $element: JQLite, rowTypeService: RowTypeService, accountingTargets: AccountingTargets, calculations: Calculations);
/** Sets the default values in init. */
$onInit(): void;
/** Yearlysidecosts for translations, used in template */
get yearlySideCosts(): {
current: YearlyChangingNumbers;
previous: YearlyChangingNumbers;
};
/**
* Marks that the editor is stand-alone, meaning that it does not edit a calculation,
* but it just edits a set of rows, typically in employment or settings.
* In this case the editor has creaed a fake calculation (because calculation is currently required for the row editor to work).
* TODO: Consider separating Calculation rows editor from stand-alone row editor.
*/
get isStandAlone(): boolean;
/** Copies the given text to clipboard. */
copyToClipboard(text: string): void;
/** List of rows */
get list(): WorktimeImportRow[] | null;
/** List filtered by categories and rowTypes. */
get filteredList(): WorktimeImportRow[] | null;
/** Combines together categories and rowTypes properties as one list of row types. */
get rowTypesToShow(): CalculationRowType[];
/** Creating of a new item. */
getBlank(): UserDefinedRow;
/**
* Returns a validation message for a row or null if none is required.
* @param row The row that is validated.
*/
getValidation(row: UserDefinedRow): {
/** Validation message */
msg: string;
/** Type of validation message */
type: "default" | "error";
} | undefined;
/** Template for edit UI that is shown in a modal dialog. */
getEditDialogTemplateUrl(): string;
/**
* Shows whether accounting editing is enabled
* @returns true if accounting editing is enabled
*/
showAccountingEditing(): boolean;
/**
* Opens the accounting ruleset selection dialog
* @param isDebit - Whether to set debit account (true) or credit account (false)
* @returns Promise that resolves when the dialog is closed
*/
openAccountingRulesetSelection(isDebit: boolean): Promise;
/**
* Shows a preview of the accounting report for the currently selected row.
* Creates a calculation with only the current row, recalculates it, and opens
* a dialog to display the accounting report query.
* @returns Promise that resolves when the dialog is closed
* @throws {Error} If no current row is selected or if recalculation fails
* @example
* // Show accounting preview for the current row
* await this.showRowAccountingPreview();
*/
showRowAccountingPreview(): Promise;
/** checks if the image fileUrl given in the cost line is not a blob (omapalkka image upload adds blob) */
showImagePreview(): boolean;
/**
* Gets the UX configuration for a row.
* @param row Row for which the config is fetched.
* If not set, gets the config for current.
*/
getConfig(row?: UserDefinedRow): CalcRowConfig | undefined;
/**
* Gets the placeholder text for an input.
*/
getPlaceholderText(row: UserDefinedRow, field: "amount" | "price"): string | null | undefined;
/**
* Return the total for the row
*/
getRowTotal(row: UserDefinedRow): number | null | undefined;
/**
* Returns true, if the row is disabled. The row is interpreted as disabled if it has no rowType
* or it has been set as hidden in the configuration.
* @param row Row to check
* @param field Type of the input / field.
*/
isDisabled(row: UserDefinedRow, field: "amount" | "price"): boolean;
/**
* Updates the compensation row with the calculated price based on the unit type.
* @param row - The row containing both the main row price and compensation row data.
*/
updateCompensationRow(row: UserDefinedRow): void;
/** Row type changes on a row */
rowTypeChanged(row: UserDefinedRow): void;
/**
* Commits the new row in newRow property and adds it to the rows list.
* Updates usecase and sets the newRow as new blank row.
*/
commitNewRow(showEdit?: boolean): UserDefinedRow;
/** Shows the selection dialog for the row type. */
showRowTypeSelectionDialog(): void;
/** Updates the usecase property values without going to server. */
updateUsecase(row: UserDefinedRow): void;
/**
* Returns the usecase logic instance for current row, also running the first update cycle on the row.
*/
getUsecaseLogic(row: UserDefinedRow): BaseUsecaseLogic;
/**
* Gets vehicle type selections from usecase
* @returns InputEnumOption[] of vehicle selections
*/
getVehicleTypeSelection(): InputEnumOption[];
/**
* Gets vehicle additions from usecase
* @returns InputEnumOption[] of vehicle additions
*/
getVehicleAdditions(): InputEnumOption[];
/**
* Gets the regions for InternationalDailyAllowance as of today
*/
get dailyAllowanceRegions(): InputEnumOption[];
/**
* Gets the Incomes Register metadata for a calculation row.
* @param row Row to check, null for current row.
* @returns The income type metadata. Empty object for empty row or empty irData.
*/
getIrCodeData(row?: UserDefinedRow): {} | undefined;
/** Return the metadata based on irCode */
getIrCodeDataWithCode(irCode: number): IncomeTypeMetadata;
/** Returns true if the filtered list has any rows. */
get hasRows(): boolean;
/** Gets the total for the current rows. */
getTotal(): number;
/**
* Gets the gross total for the calculation.
* Current implementation does not support filtering.
*/
getGrossTotal(): number | null | undefined;
/**
* Gets the total payment for the calculation.
* Current implementation does not support filtering.
*/
getFinalCost(): number | null | undefined;
/**
* Gets the net salary for the calculation.
* Current implementation does not support filtering.
*/
getNetSalary(): number | null | undefined;
/**
* Gets the total payment that is paid to palkkaus.fi.
* Current implementation does not support filtering.
*/
getTotalPayment(): number | null | undefined;
/**
* Closes the edit dialog (either modal dialog or inline).
* @param method The closing method.
* @param $close In the case of modal dialog, this is the modal dialog close method.
*/
closeEditDialog(method: "cancel" | "ok-no-save" | "delete-no-save", $close?: any): void;
/**
* Shows the editor UI that may either be a dialog or an inline edit UI.
* @param item Item to edit. If rowIndex is null/undefined, the item is considered a new row and the properties
* extend new item (fetched from getBlank()).
* @param type Type of the edit UI.
*/
showEdit(item: UserDefinedRow, type?: "dialog" | "inline" | "auto"): void;
/**
* Shows the edit dialog: Extends the base functionality with custom controller (non-supported results removed).
* @param item Item to edit or string "new" for creating a new one.
* @param isNew Optional way of specifying that the item is a new item (with default values, not yet added to the list).
* If item is string "new", this parameter will have no effect (will always be true).
*/
showEditDialog(item: UserDefinedRow | "new", isNew?: boolean): void;
/**
* Gets or sets the flag telling whether the component is in edit or read-only mode.
*/
get isInEdit(): boolean;
set isInEdit(value: boolean);
/**
* Changes the view from read-only mode to edit mode.
*/
startEdit(): void;
/**
* Returns placeholder text for row
* @param row used row
* @returns row message as string
*/
getMessagePlaceholderText(row: UserDefinedRow): string;
/** Initializes and returns the unit for the row. */
ensureUnit(row: UserDefinedRow): CalculationRowUnit;
/**
* Select a row in the list or unselect if already selected.
* @param row Row to select or "all" to select all currently vivisble rows.
* @param value Optional value to force selection true or false regardless of the current state.
*/
toggleSelectedRow(row: WorktimeImportRow | "all", value?: boolean): void;
/**
* Gets the selected rows in the list (only the filtered / visible rows).
* @returns The selected rows.
*/
getSelectedRows(): WorktimeImportRow[];
/**
* Determines the visibility of dimensions based on certain conditions.
* @returns {boolean} - Returns `true` if dimensions should be visible, otherwise `false`.
*/
showDimension(): boolean;
/**
* Returns the number of dimensions to show.
* @returns {number} The number of dimensions to show. If `dimensionCount` is not defined, returns 0.
*/
dimensionsCountToShow(): number;
/**
* Retrieves the dimensions to show based on the session settings and predefined rules.
* This method filters the available dimensions to exclude hidden ones and includes
* those that match specific scope criteria. It prioritizes adding the default dimension
* and cost center first, followed by the remaining dimensions until the limit defined
* by `dimensionsCountToShow` is reached.
* @returns {CostAccountingDimensionDefinition[]} An array of dimensions to be displayed.
*/
getDimensionsToShow(): CostAccountingDimensionDefinition[];
private formatYearlyNumbers;
}
declare class CalcRows2019ControllerBindings extends ListControllerBaseBindings {
/** Sets the title in the table header. */
title: string;
/** Shows edit buttons. Used in Payroll. */
showEditButtons: string;
/** Shows gross totals and total payment in table footer */
showGrossTotals: string;
/**
* Alternative binding for parent: Give just a stand-alone rows list.
* Setting the row to an array will set these rows to the parent component
* or create a new parent component if no parent component is specified.
*/
rows: string;
/** If set, filters the rows based on categories (plus rowTypes if set) */
categories: string;
/** If set, filters the rows based on statuses (Worktime rows only) */
statuses: string;
/**
* Defines the helper texts and branding color for row type selection list dialog.
* Null for default "primary" (no texts)
*/
rowTypeSelectHelp: string;
/** If set, shows only these types (plus categories if set) */
rowTypes: string;
/**
* If set, shows only these sources in the source drop-down.
* This is a comma separated list of enum values.
*/
rowSources: string;
/**
* Optional CostAccountingDimensionDefinitions
* If not set, cost accounting dimensions and their options are read from the settings.
*/
dimensions: string;
/**
* User interface type of the editor: "default" is the one used in calculators.
* "worktime-import" is used in editing worktime import (contains employment relation).
* "worktime-import-employment" is used in editing worktime import (no employment, contains period).
* "salary-defaults" is used behind empoloyment to specify defaults (also in the settings).
*/
type: string;
/** Hides final cost row. */
hideFinalCostRow: string;
/**
* Propertieds and logic for the situation where the dialog is dispalyed as part of row type definition editor.
*/
definitionEditor: string;
/** Default dimension id to show in rows editor */
defaultDimension: string;
/** Count of dimension to show in editor */
dimensionCount: string;
/** In supported modes, shows the rows selection checkboxes */
showRowSelection: string;
}
/**
* Shows a grid-type rows editor for addding calculation rows: Salaries, expenses, benefits etc.
* @example
* ```html
*
* ```
*/
export declare class CalcRows2019Editor extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
title: string;
showEditButtons: string;
showGrossTotals: string;
rows: string;
categories: string;
statuses: string;
rowTypeSelectHelp: string;
rowTypes: string;
rowSources: string;
dimensions: string;
type: string;
hideFinalCostRow: string;
definitionEditor: string;
defaultDimension: string;
dimensionCount: string;
showRowSelection: string;
parent: string;
onCommit: string;
onReset: string;
onStartEdit: string;
isInEdit: string;
mode: string;
};
/** Uses the CalcRows2019Controller */
controller: typeof CalcRows2019Controller;
/** The default template for the component. */
defaultTemplate: string;
}
/** Property script configuration for a calculation row. */
declare interface CalcRowScriptConfig {
/** Name of the property. */
name?: string | null;
/** Optional kind for types with kind. */
kind?: string | null;
/** Script for the property. */
script?: string | null;
}
/**
* Shows a mobile friendly rows editor for addding calculation rows: Salaries, expenses, benefits etc.
* @example
* ```html
*
* ```
*/
export declare class CalcRowsEditor extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
title: string;
showEditButtons: string;
showGrossTotals: string;
rows: string;
categories: string;
statuses: string;
rowTypeSelectHelp: string;
rowTypes: string;
rowSources: string;
dimensions: string;
type: string;
hideFinalCostRow: string;
definitionEditor: string;
defaultDimension: string;
dimensionCount: string;
showRowSelection: string;
parent: string;
onCommit: string; /**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
onReset: string;
onStartEdit: string;
isInEdit: string;
mode: string;
};
/**
* The "footer" is at the bottom of the rows list where "Add new row" buttons would typically be.
*/
transclude: {
footer: string;
};
/** Uses the CalcRows2019Controller */
controller: typeof CalcRows2019Controller;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Provides business logic for Calculation rows:
* How to create user interfaces, reports etc. based on them and their categories.
*/
declare class CalcRowsLogic {
/**
* Gets a single UI configuration for Calculation row (built-in row types only).
* Searches through all row types without role filtering.
* @param type Type for which the configuration is fetched.
*/
static getRowConfig(type: CalculationRowType): CalcRowConfig | undefined;
/**
* Gets an indicator string (1-2 characters) for a unit.
* @param unit Unit that should be described.
* @returns Given unit indicator or undefined if none is matched (convert to empty string if necessary).
*/
static getUnitIndicator(unit: CalculationRowUnit | Unit | string | undefined, language?: Language | undefined): string | undefined;
/** Gets the row configuration for row type "unknown". */
static getUnknownConfig(): CalcRowConfig | undefined;
/** Row configuration for unknown row type. */
private static unknownRowConfig;
private role;
private settings;
/**
* Creates a new CalcRowsLogic helper wichh adapts to role logic (company/household).
* @param settings The company account settings that may contain company specific roles or just a role marker for "household".
*/
constructor(settings?: CompanyAccountSettings | "household" | "company");
/**
* Gets the custom row configs from company settings if provided in the constructor.
*/
getCustomRowConfigs(): CalcRowConfig[];
/**
* Gets the row types by category.
* The instance methods filter types based on role.
* @param category Category to fetch
*/
getRowTypesByCategory(category: CalculationRowCategory): CalculationRowType[];
/**
* Gets the row configurations by category(ies).
* The instance methods filter types based on role.
* @param categories List of categories to filter by.
*/
getRowConfigsByCategory(categories: CalculationRowCategory[]): CalcRowConfig[];
/**
* Gets the row configurations based on a list of row types.
* The instance methods filter types based on role.
* @param types List of types to filter by.
*/
getRowConfigsByType(types: CalculationRowType[]): CalcRowConfig[];
/**
* Gets a single UI configuration for Calculation row.
* This method filters for user role. Use static method to return any row configuration (also faster).
* The instance methods filter types based on role.
* @param type Type for which the configuration is fetched.
*/
getRowConfig(type: CalculationRowType): CalcRowConfig | undefined;
/**
* Gets all the UI configuration objects for calculation rows.
* Caches the data based on role and language.
*/
getRowConfigs(): CalcRowConfig[];
/** Gets all the row configs cached for each language if language changes. */
static getBuiltInRowConfigs(): CalcRowConfig[];
/** Raw classification of row types to primary categories. */
static rowsByCategory: {
/** Base salary types: the ones that you define directly */
salary: CalculationRowType[];
/** Additions to base salary - typically a percentage of base salary */
salaryAdditions: CalculationRowType[];
/** Benefits: Not paid as money but taxable income */
benefits: CalculationRowType[];
/** Expenses and other non-taxed compensations */
expenses: CalculationRowType[];
/** Holidays */
holidays: CalculationRowType[];
/** Deductions */
deductions: CalculationRowType[];
/** Types that are used only as temporary / input types in Calculations - not in the results. */
salaryCalc: CalculationRowType[];
/** Other row types */
other: CalculationRowType[];
};
private static rowsCache;
/** Converts a raw excel generated row configuration to language-versioned JSON object. */
private static getRowConfigInternal;
}
/** The total input or read-only field. */
declare interface CalcRowTotalConfig {
/** Type of the input control to use */
input?: CalcRowConfigNumberInput | null;
}
/**
* Select component for Calculations row types.
* @example
* ```html
*
* ```
*/
export declare class CalcRowType extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/** Type of the input element. Options are typeahead and list (select, search-list and radio may be supported later). */
type: string;
/** If set, filters the rows based on categories (plus rowTypes if set) */
categories: string;
/** If set, shows only these types (plus categories if set) */
rowTypes: string;
/** Name and identifier of the typeahead input */
name: string;
/**
* Placeholder text in the typeahead input.
* Default is 'SALAXY.UI_Terms.select'.
*/
placeholder: string;
/** The calculation row that this component modifies. */
model: string;
/**
* Function that is called after the row type and potentially kind and message have been changed.
* @example
*/
onRowChanged: string;
/** If true, the list will show all the children under each parent that is shown */
showChildren: string;
/** Normally (default true), the selected value is cleared and a row is created/added, but in some cases (false) the value is saved as-is (and not cleared - the typical typeahead element behaviour). */
clearOnSelect: string;
};
/** Uses the InputCalcRowTypeController */
controller: typeof CalcRowTypeController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* UI logic for changing the row type and potentially the kind for UserDefined row in calculation.
* Note that changing the type may change the message of the row as well:
* In the future, usecase defaults may also be changed.
*/
export declare class CalcRowTypeController implements angular_2.IController {
private session;
private uiHelpers;
private rowTypeService;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** Type of the input element. Default is typeahead. */
type: "typehead" | "list" | "read-only";
/** If set, filters the rows based on categories (plus rowTypes if set) */
categories: CalculationRowCategory[];
/** If set, shows only these types (plus categories if set) */
rowTypes: CalculationRowType[];
/** Name and identifier of the typehead input */
name: string;
/**
* Placeholder text in the typeahead input.
* Default is 'SALAXY.UI_Terms.select'.
*/
placeholder: string;
/**
* If true, the list will show all the children under each parent that is shown as a direct hit.
*/
showChildren: boolean;
/**
* Function that is called after the row type and potentially kind and message have been changed.
* @example
*/
onRowChanged: (eventData: {
/** New item which was created. */
row: UserDefinedRow;
}) => void;
/** The calculation row that this component modifies. */
model: UserDefinedRow;
/**
* The default number of items that is returned from the typeahead search list.
* Default is 50.
*/
top: number;
private _internalValue;
private modelRowType;
private modelType;
private modelDataKind;
private listCache;
constructor(session: SessionService, uiHelpers: UiHelpers, rowTypeService: RowTypeService);
/** Sets the default values in init. */
$onInit(): void;
/**
* Detects the changes in the model properties "rowType" and "data.kind"
* and reflects them to internalValue.
*/
$doCheck(): void;
/**
* Internal value from view to the controller. This is one of the numerations returned by getList()
* if model has been set and it matches to oneof those values.
*/
protected get internalValue(): InputEnumOption;
protected set internalValue(val: InputEnumOption);
/**
* Gets the list of row types according to options:
* This list changes and is cached based on role (household/company), language,
* rowTypes and categories. Currently the same as search(null), but cached.
*/
getList(): InputEnumOption[];
/**
* Gets the search as cached item: Can be bound to ng-repeat.
* @param searchText The search text. If null or empty, returns the full list.
*/
getCachedSearch(searchText: string): InputEnumOption[];
/**
* Searches the row types.
* @param searchText The search text. If null or empty, returns the full list.
* @param ignoreTop If true, ignores the this.top setting to return only top n items of the search
* @param showChildren Forces the showChildren value to true for this run.
* By default, children are only shown if they match the search.
*/
search: (searchText: string, ignoreTop?: boolean, showChildren?: boolean) => InputEnumOption[];
/** Gets a label for the given internal value. */
getRowLabel(rowTypeKey: string): string | null | undefined;
/**
* Shows a dilaog that contains information about the row type.
* @param rowType The row type to show information about.
*/
showInfoScreen(rowType: InputEnumOption): void;
/**
* Gets the list of row types. Method filters based on rowTypes and categories,
* the texts are language versioned and there is a role filter for "household"/"company".
*/
private getRowTypes;
}
/**
* Shows the sharing control for the current calculation
* @example
* ```html
*
* ```
*/
export declare class CalcSharing extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
[boundProperty: string]: string;
/** If true, template shows option to share direct link to the calculation. Currently used only in Rakennusliitto site. */
showLinkSharing: string;
detailsUrl: string;
listUrl: string;
model: string;
isReadOnlyForced: string;
};
/** Uses the CalcSharingController */
controller: typeof CalcSharingController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Controller for sharing the calculation between worker and employer.
*/
export declare class CalcSharingController extends CalculationCrudController {
private sharingCalculationsApi;
private employmentsApi;
private onboardingService;
private taxcards;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** Employing relations for the current account */
employingRelations: ApiListItem[];
/** True, if the current link has been copied to the clipboard */
uriCopied: boolean;
/** If true, template shows option to share direct link to the calculation. Currently used only in Rakennusliitto site. */
showLinkSharing: boolean;
/** Web sharing targets */
webSharingTargets: {
email: {
title: string;
icon: string;
action: () => void;
};
whatsApp: {
title: string;
icon: string;
getUrl: () => string;
};
telegram: {
title: string;
icon: string;
getUrl: () => string;
};
};
/** Web sharing targets */
mobileSharingTargets: {
email: {
title: string;
icon: string;
action: () => void;
};
device: {
title: string;
icon: string;
action: () => Promise;
};
};
/** Loading indicator. */
isSharingType: string;
/**
* Creates a new CalcSharingController
* @ignore
*/
constructor(sharingCalculationsApi: Calculations, reportsService: ReportsService, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any, sessionService: SessionService, invoicesService: InvoicesService, employmentsApi: Employments, onboardingService: OnboardingService, taxcards: Taxcards);
/**
* Implement IController
*/
$onInit(): void;
/** Show sharing page for the current calculation. */
showSharing(action?: string): Promise;
/**
* Shares the current calculation.
* @param type Type of the sharing action or link.
* @param employer List item for employer to share the calculation with. Mandatory in Direct share.
* @returns Sharing object of the calculation.
*/
share(type?: SharingUriType, employer?: ApiListItem): Promise;
/**
* Loads employing relations of the existing employers for the current account.
* @param options OData query options.
*/
loadEmployingRelations(options?: ODataQueryOptions): Promise;
/**
* Returns validation for current calculation or empty validation object if the calculation has not been recalculated (validated).
*/
get validation(): ApiValidation;
/** Returns the employer for the given id using employing employers as a source */
get employer(): any;
/** Returns email address for current accoount */
get cc(): string;
/** Copies link to clipboard */
copyUri(): void;
/** Returns true if the given typing is just processing sharing */
isSharing(type: string): boolean;
/** Returns true if the navigator.share -function exists. */
get isMobileSharingEnabled(): boolean;
/** Whatsapp-link */
private getWhatsAppUrl;
/** Telegram-link */
private getTelegramUrl;
/** Mobile sharing */
private shareInMobile;
private showEmailSharing;
private createSharingMessage;
private sendSharingEmail;
private getSharingMessage;
private getSharingTitle;
/**
* Shows an alert if the signature is missing.
*/
private showMissingSignatureAlert;
}
/**
* Shows the current status of sharing for the calculation
* @example
* ```html
*
* ```
*/
export declare class CalcSharingInfo extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: ApiCrudObjectControllerBindings;
/** Uses the CalcSharingController */
controller: typeof CalcSharingController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Shows the sharing receipt action control for the given calculation id.
* @example
* ```html
*
* ```
*/
export declare class CalcSharingReceiptAction extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
[boundProperty: string]: string;
/** Sharing action (approve or reject) */
type: string;
/** Disables the control. */
disabled: string;
/** Optional style class to use for button. Defaults to 'btn-block btn-sm' */
buttonClass: string;
/** Shows only icon in button. Used in compact views, i.e. panels */
iconOnly: string;
detailsUrl: string;
listUrl: string;
model: string;
isReadOnlyForced: string;
};
/** Uses the CalcSharingReceiptActionController */
controller: typeof CalcSharingReceiptActionController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Controller for sharing actions: accept, decline
*/
export declare class CalcSharingReceiptActionController extends CalculationCrudController {
protected invoicesService: InvoicesService;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/**
* Creates a new CalcSharingController
* @ignore
*/
constructor(calculationsApi: Calculations, reportsService: ReportsService, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any, sessionService: SessionService, invoicesService: InvoicesService);
/**
* Implement IController
*/
$onInit(): void;
/** Approve the the calculation requested by the worker. */
approve(): Promise;
/** Reject the the calculation requested by the worker. */
reject(): Promise;
}
/**
* Component for showing tabulator based report of ir rows of given calculations
* @example
* ```html
* ;
private getDefaultLanguage;
}
/** Tax card information stored as part of the Calculation object */
declare interface CalcTax {
/** Identifier for a stored tax card if one is applied to this calculation.
System updates the TaxCardId automatically in Recalculate / Save if it finds a better candidate
and also updates the Snapshot. */
taxcardId?: string | null;
/** Snapshot of the tax card for salary slip etc. purposes.
Updated in Recalculate / Save based on TaxCardId */
snapshot?: TaxcardSnapshot | null;
/** Possibility to set a fixed widthholding tax amount for this calculation regardless of
the percentage etc. in the tax card. */
fixedTaxAmount?: number | null;
/** The API returns true if there is a valid taxcard for the PaidAt date for this calculation
or if FixedTaxAmount is set for th calculation. */
isValid?: boolean | null;
/** Calculated widthholding tax. Note that this is an estimation until the calculation is actually paid.
Also, if the salary is not paid as cash (e.g. fringe benefits), there may not be enough money to make the full deduction. */
estimatedTax?: number | null;
/** A flag that during last recalculation, there was a new shared taxcard that was waiting approval. */
hasNewSharedCard?: boolean | null;
/** Tax percent that is used in visualization. This is mainly used in Unit testing and anonymous calcultors.
Not used in real paid calculations. This is percent. I.e. for 50% set 50, not 0.5.
If PaymentData or AccountId lead to a valid tax card type and percent, or if there is FixedTaxAmount, this value is not used. */
taxPercentForVisualization?: number | null;
}
/** Calculation is the most important model in the Palkkaus.fi API. We suggest you open the separately provided documentation and especially the class diagram to understand the whole model in detail. */
declare interface Calculation {
/** The employer object for this calculation.
Typically, you do not need to set this before the actual payment process. */
employer?: CalcEmployer | null;
/** The Worker (employee) that has performed the work. */
worker?: CalcWorker | null;
/** Information about the workflow and state of the calculation. */
workflow?: CalcWorkflow | null;
/** The main salary element.
Alternatively the salary can be set in the Rows object - this will be the only way to set multiple salary rows (not yet supported). */
salary?: Salary | null;
/** Set of rows that make up the salary calculation:
Expenses, Benefits, deductions etc. Note that side costs are not rows. */
rows?: UserDefinedRow[] | null;
/** DEPRECIATED: Usecase will be replacing this functionality in a next major release.
The Framework Agreement (TES) parameters that affect the framework based side costs etc. of this calculation */
framework?: TesParameters | null;
/** A usecase for creating and editing salary calculations.
In practice, a usecase is either a user interface or a microservice that provides a salary calculation
and it may be implemented outside Salaxy.
Provides the possibility to store useacase specific data as part of calculation.
NOTE: This functionality will replace Framework property in a next major release. */
usecase?: UsecaseData | null;
/** The results of the calculation. In the API, this is a read-only object. */
result?: CalculationResult | null;
/** Information about the work that is not directly related to calculating salary and expenses. */
info?: CalcInfo | null;
/** Sharing of the calculation. This object cannot be modified directly,
use specialized methods in Calculations service. */
sharing?: CalculationSharing | null;
/** Contains calculation specific data for accounting (both cost and financial accounting). */
accounting?: CalculationAccounting | null;
/** Worktime data that is stored as part of Salary calculation:
work days, absences, holidays and holiday accrual.
In the future may also contain relevant part of timesheet data (work hours). */
worktime?: CalcWorktime_2 | null;
/** Readonly workflow data, which is exposed to API. */
workflowData?: WorkflowData | null;
/** Identifier of the object. */
id?: string | null;
/** The date when the object was created. */
createdAt?: string | null;
/** The time when the object was last updated.
Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */
updatedAt?: string | null;
/** Owner ID for this data */
owner?: string | null;
/** Indication that for the currently logged-in account, the data is generally read-only. */
isReadOnly?: boolean | null;
/** Primary partner information. Automatically updated from the storage container Partner. */
partner?: string | null;
}
/** Contains calculation specific data for accounting (both cost and financial accounting). */
declare interface CalculationAccounting {
/** Values for cost accounting dimensions */
dimensions?: CostAccountingDimension[] | null;
}
/** Defines a set of calculations based on identifiers potentially unsaved Calculation objects as well as Payrolls. */
declare interface CalculationCollection {
/** Collection of calculation ID's to be fetched from storage */
ids?: string[] | null;
/** Collection of payroll ID's to be fetched from storage */
payrollIds?: string[] | null;
/** Collection of inline calculations that may be saved or not */
calcs?: Calculation[] | null;
/** Collection of inline Payroll objects that may be saved or not */
payrolls?: PayrollDetails_2[] | null;
}
/**
* The new ApiCrudObject type of CRUD controller for the calculations.
*/
export declare class CalculationCrudController extends ApiCrudObjectController {
private calculationsApi;
protected reportsService: ReportsService;
protected sessionService: SessionService;
protected invoicesService: InvoicesService;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/**
* If true, will also update the calculation rows from employment relation when the employment
* relation is selected. Note that this value is true by default for historical reasons.
*/
updateRows: boolean;
constructor(calculationsApi: Calculations, reportsService: ReportsService, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any, sessionService: SessionService, invoicesService: InvoicesService);
/**
* Initialization code.
*/
$onInit(): void;
/** Implements the getDefaults of ApiCrudObjectController */
getDefaults(): {
listUrl: string;
detailsUrl: string;
oDataTemplateUrl: string;
oDataOptions: {};
};
/** Recalculates the current calculation */
recalculate(): void;
/**
* Gets the URL for a calculation pdf.
* If report has not been saved (ID is null), returns null.s
* @param calc - Calculation. This method requires that the calculation has been saved.
* @returns Url for specified report
*/
getPdfUrl(calc: Calculation): string | null;
/**
* If true, this is a new unsaved object.
* Adds "new-for-employment" actions as new item.
*/
isNew(): boolean;
/**
* Starts the reload process depending on the bindingMode:
* Overrides a different load process for "new-for-employment".
*/
reload(): Promise;
/**
* Creates a copy of a given item.
* This is a synchronous method that should basically convert a saved item to a new item.
* @param copySource Item (container item) to copy as new.
*/
copyItem(copySource: Calculation): Calculation;
/** Shows the paymentd dialog / the invoices UI. */
showPaymentDialog(): void;
/** Shows inspection dialog for invoices of paid calculation*/
showInvoicesDialog(): void;
/**
* Updates the calculation from Employment ID by deleting all the rows and re-setting the employment.
* @param employmentId Employement Id to set.
* If null, the employment Id already in calculation is used:
* This method cannot be used to remove the Worker (extend if necessary).
* @param updateRows If true, updates also the calc rows from the default rows in
* employment relation. If false, the rows are kept as is.
* @returns The Calculation after recalc (no saving).
*/
updateFromEmployment(employmentId: string | undefined, updateRows: boolean): Promise;
/**
* Cancels the payment or invoice processing for the current calculation.
*/
cancel(): Promise;
/**
* Opens the list for selecting a new paid calculation for repair.
* @param onAfterAction Function to call after the action.
* @param calcId Optional ID of the calculation to repair.
*/
launchCreateRepair(onAfterAction: () => Promise, calcId?: string): Promise;
/**
* If true, the form controls should be read-only (no control at all).
*/
get isReadOnly(): boolean;
/**
* Returns true if there is no net salary payment to worker at all.
*/
get isCurrentZeroPayment(): boolean;
private setDefaultPaymentChannel;
/**
* HACK: This will be removed after moved to useCase based calculators.
* Temporary redirecting to correct details view.
* TODO: Should be replaced with full usecase logic based implementation.
*/
showDetails(item: Calculation | CalculationListItem): angular_2.ILocationService;
/** Shows the earnings payment report for the epr. */
showEpr(item: Calculation | CalculationListItem): Promise;
}
/** Calculation specific business data for index. */
declare interface CalculationData {
/** A flag indicating if the requested date for the SalaryDate has been set.
If the date has been set, the value of the flag is 'SALA'. */
requestedSalaryDate?: string | null;
/** The sum that is at the end paid to the Worker:
Salary payment + expenses */
workerPayment?: number | null;
/** The total pension payment for this calculation. */
pensionPayment?: number | null;
/** The taxes that were deducted from the worker salary a paid as part of taxation. */
taxPayment?: number | null;
/** The social security payment- paid as part of taxation. */
socialSecurityPayment?: number | null;
/** Status of the calculation from the end-user point-of-view. */
status?: CalculationStatus | null;
/** Payroll id. */
payrollId?: string | null;
/** Employment id. */
employmentId?: string | null;
/** The original id the calculation which this calculation is a copy of. */
originalId?: string | null;
/** Use case uri. */
usecaseUri?: string | null;
/** The MessageThread Id, if this calculation is referred in a message thread. */
messageThreadId?: string | null;
/** Contains the email or id of the responsible for the partner workflow event. */
partnerMessageAssignedTo?: string | null;
/** Work start date. */
workStartDate?: string | null;
/** Work end date. */
workEndDate?: string | null;
/** Payment channel. */
paymentChannel?: PaymentChannel | null;
/** Taxable salary is the salary from the taxation point of view - includes some benefits. */
totalTaxable?: number | null;
/** Base salary. */
salary?: number | null;
/** Salary additions */
allowances?: number | null;
/** Benefits. */
benefits?: number | null;
/** Deductions */
deductions?: number | null;
/** Expenses */
expenses?: number | null;
/** The requested salary date. */
inputSalaryDate?: string | null;
/** Defines the re-setting of the salary date in the calculation re-calculation. */
salaryDateKind?: SalaryDateKind | null;
/** Last date and time when this calculation was repaired after payment. */
repairedAt?: string | null;
}
/**
* CalculationEditorController used to handle EPR actions
* This controller extends ApiCrudObjectController (via CalculationCrudController).
*/
export declare class CalculationEditorController extends CalculationCrudController {
protected uiCrudHelpers: UiCrudHelpers;
protected invoicesService: InvoicesService;
private reportsApi;
private ajax;
/** Bindings for components that use this controller */
static bindings: {};
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** Flags to indicate if the request is in progress */
loaders: any;
/** Indicates if the details sidebar is open */
isRightSidebarOpen: boolean;
/** Data reader for the accounting diffa data. */
accountingDiffDataReader: {
/** Function to read data into given array */
read: (target: string, ruleSet: string, arr: AccountingData[]) => Promise;
/** Optional label for data export */
exportLabel: null;
/** Indicates if the export is not possible */
disabled: () => boolean;
showExpand: boolean;
hasRows: () => boolean;
};
/** Status for diff data . */
private accountingDiffDataStatus;
private _accountingDiffData;
private _diffCalc;
private latestCurrent;
private latestBase;
private pendingAccountingDiffData;
private _documentFlow;
private _state;
private baseCalc;
private versionId;
constructor(calcApi: Calculations, uiHelpers: UiHelpers, uiCrudHelpers: UiCrudHelpers, $location: angular_2.ILocationService, $routeParams: any, sessionService: SessionService, reportsService: ReportsService, invoicesService: InvoicesService, reportsApi: Reports, ajax: Ajax);
/**
* Initializes the controller
*/
$onInit(): void;
/** Calculation total result diff between original and current calculation. */
get diffCalc(): Calculation;
/** Accounting data diff between original and current calculation. */
get accountingDiffData(): AccountingData;
/** Document flow for the current calculation */
get documentFlow(): {
item: ApiListItem;
children: any[];
};
/**
* Returns validation for calculation
*/
get validation(): ApiValidation | null | undefined;
/**
* Starts the reload process depending on the bindingMode:
*/
reload(): Promise;
/** Load accounting data and calculate diff. */
loadAccountingDiffData(targetId?: string): void;
/**
* Change base calculations
*/
changeBase(): void;
/**
* Refreshes the calculation using the server side logic.
* @param refresh Option for refresh.
*/
refresh(refresh?: string): void;
/**
* Saves the edited readonly calculation.
*/
saveEdited(): void;
private _dateRange;
/** Getter and setter for Calculation daterange in compatible format for new DateRange component. */
get dateRange(): DateRange_2;
set dateRange(value: DateRange_2);
/**
* Called when the date range changes.
*/
dateRangeChange(): void;
private get base();
/**
* Returns valid employment reg codes for the selected pensions company.
* @returns Options for the employment reg codes.
*/
getEmploymentRegCodeOptions(): Array;
private diffAccountingData;
private onCalculationChange;
}
/** CalculationFlag enumeration */
declare enum CalculationFlag {
Exclude = "exclude",
PensionInsurance = "pensionInsurance",
AccidentInsurance = "accidentInsurance",
UnemploymentInsurance = "unemploymentInsurance",
HealthInsurance = "healthInsurance",
InsurancesDeduction = "insurancesDeduction",
NoTax = "noTax",
Tax = "tax",
TaxDeduction = "taxDeduction",
CfNoPayment = "cfNoPayment",
CfPayment = "cfPayment",
CfDeduction = "cfDeduction",
CfDeductionAtSalaxy = "cfDeductionAtSalaxy"
}
/** API calculation import object. The API uses this object for mass operations for adding calculations to a new or existing payroll object. If the calculation object does not contain a valid payroll-ID, a new payroll will be created. Returns payroll ID. */
declare interface CalculationImport {
/** Company number in the the trade register (Y-tunnus).
Format is "1234567-8" - 7 numbers, one control character, with or without the dash.
Also, the international VAT format is allowed: FI12345678
This field is optional and defaults to the company number of the current account. */
officialId?: string | null;
/** Additional parameters for import. Defaults to string. */
parameters?: {
[key: string]: any;
} | null;
/** Item for import. */
item?: Calculation | null;
/** Validation for the import */
validation?: ApiValidation | null;
/** Result object of the import. */
result?: ApiImportResultOfString | null;
}
/**
* Type for a single calculation import row.
*/
declare interface CalculationImportRow extends DataRow {
/** Official ID of the payer company. */
companyOfficialId?: string;
/** The personal ID for the worker. */
personalId?: string;
/** Employment ID for the worker. */
employmentId?: string;
/**
* Occupation classification, used at least for Accident insurance purposes, but may be used for other reporting.
* For Finnish Salaries use the Statistics Finland
* "Classification of Occupations 2010" (TK10): https://www.stat.fi/meta/luokitukset/ammatti/017-2018-05-15/index_en.html
*/
occupationCode?: string | null;
/** Start date of the work */
periodStart?: string | null;
/** End date of the work */
periodEnd?: string | null;
/** Description of the work for reporting purposes. Max 32 chars. */
workDescription?: string | null;
/** Message which will be displayed in the payslip. */
salarySlipMessage?: string | null;
/** The requested date for the SalaryDate from the employer. */
salaryDate?: string | null;
/** Payment channel */
paymentChannel?: PaymentChannel | null;
/** Payroll title. */
payrollTitle?: string | null;
/** Payroll source id. */
payrollSourceId?: string | null;
/** Calculation source id */
sourceId?: string | null;
/** Tax if calculated */
fixedTaxAmount?: number | null;
/**
* Identifier in the source system is a key defined by a source system / partner system.
* This is a pass-through string that is passed to the result calculations.
*/
rowSourceId?: string | null;
/** Logical type of the row */
rowType?: CalculationRowType | null;
/** For row types which require kind. */
kind?: string | null;
/** For row types which require vat percent. */
vatPercent?: number | null;
/** Description text of the row that is shown in reports. If null, will be set according to type. */
message?: string | null;
/** Count for the row - default is one */
count?: number | null;
/** Price for the row */
price?: number | null;
/** Unit for the row */
unit?: CalculationRowUnit | null;
}
/** Represents a single item in a list of calculations in the user interface. It contains all essential information of the calculation and is basis for searching, filtering and sorting. */
declare interface CalculationListItem {
/** The date when the object was created. */
createdAt?: string | null;
/** The time when the object was last updated.
Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */
updatedAt?: string | null;
/** Last date of modification of the object. The modification can be produced by the end user or by the system. */
timestamp?: string | null;
/** Person GUID for the owner of the object. */
ownerId?: string | null;
/** Metadata for the owner */
ownerInfo?: AccountInIndex | null;
/** The main status depending on the type of the object. */
status?: CalculationStatus | null;
/** The back office status depending on the type of the object. */
backOfficeStatus?: string | null;
/** When the event started. Typically, this is the CreatedAt date, but it may be something else. */
startAt?: string | null;
/** This is the end date of the event.
Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */
endAt?: string | null;
/** Gross salary if that is relevant to the transaction. */
grossSalary?: number | null;
/** This is the payment from the Owner point-of-view:
Total payment for the Employer and Net salary for the Worker in the case of a calculation.
Only add here the payment, if the payment is really made. */
payment?: number | null;
/** Estimated fee of the transaction to Palkkaus.fi. */
fee?: number | null;
/** The GUID for the other party. Currently, this is always the PersonID. */
otherId?: string | null;
/** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */
otherPartyInfo?: AccountInIndex | null;
/** A very short description describing the object as an event. E.g. "Paid salary" */
shortText?: string | null;
/** Business object ids related to this object. E.g. calculations and payrolls in the payment. */
businessObjects?: string[] | null;
/** This is valid for calculations only. The estimated date of salary in worker. */
salaryDate?: string | null;
/** Business data to include further information of the object. */
data?: CalculationData | null;
/** Version number. May be used in conflicts */
versionNumber?: number | null;
/** Salaxy uri of the resource. */
uri?: string | null;
/** Workflow flags for the object.
Only workflow events with API supported message types are listed. */
flags?: string[] | null;
/** Workflow messages for the object.
Only workflow events with API supported message types are listed.
Shown in format "[MessageType]:[Message] ([User] at [UTC-time])" */
messages?: string[] | null;
/** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */
entityType?: string | null;
/** The date for the actual period for which this object is done. */
logicalDate?: string | null;
/** Reference information. E.g. Payment or MoneyTransfer reference number. */
reference?: string | null;
/** External id for the object in 3rd party system. */
externalId?: string | null;
/** Identifier of the object. */
id?: string | null;
/** Owner ID for this data */
owner?: string | null;
/** Indication that for the currently logged-in account, the data is generally read-only. */
isReadOnly?: boolean | null;
/** Primary partner information. Automatically updated from the storage container Partner. */
partner?: string | null;
}
/**
* Shows the calculation report builder for ad hoc calculation reports.
* @example
* ```html
*
* ```
*/
export declare class CalculationReport extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/** Template for the report */
templateId: string;
};
/** Uses the CalculationReportController */
controller: typeof CalculationReportController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Controller for calculation reports.
*/
export declare class CalculationReportController extends ConfigurableGridReportControllerBase {
private reports;
private $timeout;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** Usecase uri for report templates */
usecaseUri: string;
/** Current grid options. */
gridOptions: any;
/** ID for the element containing grid. */
gridElmentId: string;
/** Default templates */
defaultTemplates: ({
id: string;
owner: null;
label: string;
config: null;
isReadOnly: boolean;
avatar: {
initials: string;
entityType: LegalEntityType;
color: string;
};
} | {
id: string;
owner: null;
label: string;
config: {};
isReadOnly: boolean;
avatar: {
initials: string;
entityType: LegalEntityType;
color: string;
};
})[];
constructor(datasets: Datasets, uiHelpers: UiHelpers, sessionService: SessionService, reports: Reports, $timeout: angular_2.ITimeoutService);
/**
* Initialize controller values.
*/
$onInit(): void;
/**
* Processes and sets the data.
*/
setData(result: CalculationReportData): void;
/**
* Gets the monthly / quarterly / yearly cumulative data for the current account.
* @param refDate Reference date for the period. Please note that even if the date is not the first day of the given period, the entire period is returned.
* @param periodType Month, quarter, year or a custom period. The custom period requires endDate. Default value is the month.
* @param endDate End date for the period. Required only for the custom period.
* @param periodDateKind Period date type: paid at date, salary date or work date.
* @param workers List of worker official ids.
* @returns A Promise with result data.
*/
queryDataForPeriod(refDate: string, periodType?: PeriodType | "all", endDate?: string, periodDateKind?: PeriodDateKind, workers?: string[]): Promise;
/**
* Gets the cumulative data based on given set of calculations.
* @param calculationIds - Calculations that are the bases for the report.
* @returns A Promise with result data.
*/
queryDataForCalculationIds(calculationIds: string[]): Promise;
private createIncomeTypesPreset;
private createTotalsPreset;
private createPresetCol;
}
/** Container for calculation report data. */
declare interface CalculationReportData {
/** Calculations as report rows. */
rows?: {
[key: string]: any;
}[] | null;
/** Ir Income type code labels */
irLabels?: {
[key: string]: string;
} | null;
/** Calculation row type labels */
typeLabels?: {
[key: string]: string;
} | null;
/** Total labels */
totalLabels?: {
[key: string]: string;
} | null;
}
declare interface CalculationResult {
/** Calculation totals that are common to both Worker and Employer. */
totals?: TotalCalculationDTO | null;
/** Rows that are compatible with Incomes Register (tulorekisteri) process.
These are available only for calculations paid after 7.2.2019 (TODO: estimation as of writing). */
irRows?: IrRow[] | null;
/** The calculation from the Employer point-of-view */
employerCalc?: EmployerCalculationDTO | null;
/** The calculation from the Worker point-of-view */
workerCalc?: WorkerCalculationDTO | null;
/** The result rows. Note that this collection also contains the main Salary entry as one of the rows. */
rows?: ResultRow[] | null;
/** Responsibilities of Employer and parameters that affect those responsibilities. */
responsibilities?: IEmployerResponsibilities | null;
/** The validation result for the current calculation.
Please note that this is not serialized into the data storage. */
validation?: ApiValidation | null;
}
/** Statistics data calculated from the calculation result. */
declare interface CalculationResultStatistics {
/** The total number of calculations included in the report. */
calculationCount?: number | null;
/** The total number of distinct workers included in the report. */
workerCount?: number | null;
/** WorkerCalc.Pension / Totals.TotalSocialSecurityBase */
pensionWorkerPercent?: number | null;
/** WorkerCalc.UnemploymentInsurance / Totals.TotalSocialSecurityBase */
unemploymentWorkerPercent?: number | null;
/** WorkerCalc.Tax / Totals.TotalTaxable */
taxPercent?: number | null;
/** WorkerCalc.UnionPayment / Totals.TotalTaxable */
unionPaymentPercent?: number | null;
}
/** Categorization / grouping for CalculationRowType */
declare class CalculationRowCategories {
/** Base salary types: the ones that you define directly */
static baseSalary: CalculationRowType[];
/** Additions to base salary - typically a percentage of base salary */
static salaryAdditions: CalculationRowType[];
/** All salary types: baseSalary and salaryAdditions together */
static salary: CalculationRowType[];
/** Benefits: Not paid as money but taxable income */
static benefits: CalculationRowType[];
/** Expenses and other non-taxed compensations */
static expenses: CalculationRowType[];
/** Deductions */
static deductions: CalculationRowType[];
/** Holidays */
static holidays: CalculationRowType[];
/**
* Items in the section called "expenses". Besides expenses, contains also benefits.
*/
static expensesSection: CalculationRowType[];
}
/** CalculationRowCategory enumeration */
declare enum CalculationRowCategory {
Salary = "salary",
SalaryAdditions = "salaryAdditions",
SalaryCalc = "salaryCalc",
Holidays = "holidays",
Benefits = "benefits",
Expenses = "expenses",
Deductions = "deductions",
Other = "other"
}
/** CalculationRowSource enumeration */
declare enum CalculationRowSource {
Undefined = "undefined",
Disabled = "disabled",
ManualRow = "manualRow",
WorktimeImport = "worktimeImport",
PriceEmployment = "priceEmployment",
PriceCompany = "priceCompany",
CopyEmployment = "copyEmployment",
CopyCompany = "copyCompany",
CustomRowtype = "customRowtype"
}
/** CalculationRowType enumeration */
declare enum CalculationRowType {
Unknown = "unknown",
Salary = "salary",
HourlySalary = "hourlySalary",
MonthlySalary = "monthlySalary",
TotalWorkerPayment = "totalWorkerPayment",
TotalEmployerPayment = "totalEmployerPayment",
TimeRatePay = "timeRatePay",
Compensation = "compensation",
Overtime = "overtime",
TesWorktimeShortening = "tesWorktimeShortening",
EveningAddition = "eveningAddition",
NightimeAddition = "nightimeAddition",
SaturdayAddition = "saturdayAddition",
SundayWork = "sundayWork",
OtherAdditions = "otherAdditions",
PaidSickLeaveSalary = "paidSickLeaveSalary",
PaidSickLeaveHourlySalary = "paidSickLeaveHourlySalary",
PaidSickLeaveMonthlySalary = "paidSickLeaveMonthlySalary",
TrainingSalary = "trainingSalary",
TrainingHourlySalary = "trainingHourlySalary",
TrainingMonthlySalary = "trainingMonthlySalary",
AccomodationBenefit = "accomodationBenefit",
MealBenefit = "mealBenefit",
PhoneBenefit = "phoneBenefit",
CarBenefit = "carBenefit",
BicycleBenefit = "bicycleBenefit",
OtherBenefit = "otherBenefit",
HolidayCompensation = "holidayCompensation",
HolidayBonus = "holidayBonus",
HolidaySalary = "holidaySalary",
DailyAllowance = "dailyAllowance",
DailyAllowanceHalf = "dailyAllowanceHalf",
MealCompensation = "mealCompensation",
MilageOwnCar = "milageOwnCar",
ToolCompensation = "toolCompensation",
Expenses = "expenses",
MilageDaily = "milageDaily",
MilageOther = "milageOther",
UnionPayment = "unionPayment",
Foreclosure = "foreclosure",
Advance = "advance",
ForeclosureByPalkkaus = "foreclosureByPalkkaus",
PrepaidExpenses = "prepaidExpenses",
OtherDeductions = "otherDeductions",
DeductibleOfExerciseAndCultureBenefit = "deductibleOfExerciseAndCultureBenefit",
ChildCareSubsidy = "childCareSubsidy",
ChainsawReduction = "chainsawReduction",
NonProfitOrg = "nonProfitOrg",
SubsidisedCommute = "subsidisedCommute",
IrIncomeType = "irIncomeType",
Board = "board",
Remuneration = "remuneration",
OtherCompensation = "otherCompensation",
WorkingTimeCompensation = "workingTimeCompensation",
EmploymentTermination = "employmentTermination",
HourlySalaryWithWorkingTimeCompensation = "hourlySalaryWithWorkingTimeCompensation",
PaidSickLeave = "paidSickLeave",
Training = "training",
PayStats = "payStats",
TaxAtSource = "taxAtSource",
TaxWithholding = "taxWithholding",
AbsencePeriod = "absencePeriod",
ServiceCharge = "serviceCharge",
Service = "service",
Script = "script",
Totals = "totals"
}
/** CalculationRowUnit enumeration */
declare enum CalculationRowUnit {
Undefined = "undefined",
Count = "count",
Percent = "percent",
Days = "days",
Kilometers = "kilometers",
Hours = "hours",
Weeks = "weeks",
Months = "months"
}
/**
* Provides CRUD access for authenticated user to access a his/her own calculations
*/
declare class Calculations extends CrudApiBase {
/**
* For NG1-dependency injection
* @ignore
*/
static $inject: string[];
/** Base URL for details etc. (2) */
protected baseUrl: string;
private calculator;
constructor(ajax: Ajax);
/**
* Saves an item to the storage.
* If id is null, this is add/insert. If id exists, this is update.
* @param itemToSave - The item that is updated/inserted.
* @returns A Promise with result data as saved to the storage (contains id, createAt, owner etc.).
*/
save(itemToSave: Calculation): Promise;
/** Client-side (synchronous) method for getting a new blank item as bases for UI binding. */
getBlank(): Calculation;
/**
* Takes in a calculation - typically with modified parameters - and recalculates it.
* @param calc The salary calculation that should be recalculated
* @returns A Promise with the recalculated Calculation.
*/
recalculate(calc: Calculation): Promise;
/**
* Recalculates a calculation taking into account holiday year and absences from the worktime property.
* This is an anonymous method that can be used for unit testing: Does not read / write from database.
* @param calc The salary calculation that should be recalculated.
* Worktime property should contian the bases for the recalculation.
*
* @returns A Promise with the recalculated Calculation.
*/
recalculateWorktime(calc: Calculation): Promise;
/**
* Gets the worktime data for Period recalculation based on given calculation
* but fetching absences and holidays from the database.
*
* @param calc The salary calculation that should be recalculated.
* It may potentially have changes to compared to the one in database or the calc may not have even been saved.
* The calculation MUST have emloymentId and period set for calculation to work properly.
* @returns A Promise with Worktime data.
*/
getWorktimeData(calc: Calculation): Promise;
/**
* Gets the Calculation objects for the given ids.
* @param ids Identifiers for the Calculation objects.
* @returns A Promise with result data array.
*/
getMulti(ids: string[]): Promise;
/**
* Gets the Calculations for a specific employment relation.
* @param employmentId Identifier for the Employment relation.
* @returns A Promise with Calculations.
*/
getForEmployment(employmentId: string): Promise;
/**
* Gets the Calculations for the given employment relations.
* @param employmentIds Identifiers for the Employment relations.
* @returns A Promise with Calculations.
*/
getForEmployments(employmentIds: string[]): Promise;
/**
* Updates a calculation from employment relation by deleting all the rows and re-setting the employment.
* @param calc Calculation to update.
* @param save If true, saves the calculation. If false, only recalculates. Returns the result in any case.
* @param updateRows If true, updates also the default salary rows from employment data to calculation.
* False updates only other employment data IBAN, phone, E-mail, pension insurance code message etc.
* @returns The updated and saved or recalculated calculation
*/
updateFromEmployment(calc: Calculation, save: boolean, updateRows: boolean): Promise;
/**
* Updates (saves) the employment related information from Calculation to Employment relation.
* Currently only updates rows, OccupationCode and WorkDescription.
* @param calc Calculation to update.
*/
updateToEmployment(calc: Calculation): Promise;
/**
* Shares the calculation.
* @param id Id for the calculation to share.
* @param type Type of the sharing action or link.
* @param employerId Id of the employer to share the calculation with.
* @param to Email address of the employer.
* @param cc Cc address for the email.
* @param message Message to the employer.
* @returns Sharing object of the calculation.
*/
share(id: string, type?: SharingUriType, employerId?: string | null, to?: string | null, cc?: string | null, message?: string | null): Promise;
/**
* Notifies the employer from the shared calculation.
* @param id Id of the shared calculation.
* @param to Email address of the employer.
* @param cc Cc address for the email.
* @param message Message to the employer.
* @returns True, if the send action was successful.
*/
notifySharing(id: string, to?: string | null, cc?: string | null, message?: string | null): Promise;
/**
* Cancels the invoice or payment processing for the given calculation.
* Please note that this is possible only if the channel supports the cancel action.
* @param id Calculation for which the cancellation is requested.
* @returns Calculation which have been cancelled.
*/
cancel(id: string): Promise;
/**
* Creates a copy of an existing calculation.
* @param id The ID of the calculation to copy.
* @returns A Promise containing the newly created copy of the calculation.
*/
copy(id: string): Promise;
/**
* Saves the IR -related data of the calculation.
* This operation can be done even if the calculation otherwise is in read only state.
* @param calculation Calculation object to save.
*/
saveIr(calculation: Calculation): Promise;
/**
* Converts the given calculation to an earnings payment report.
* @param calculation - Calculation object.
* @returns A Promise with earnings payment report data.
*/
convertToEpr(calculation: Calculation): Promise;
/**
* Returns the earnings payment report for the given calculation.
* @param id Id of the calculation for the earnings payment report.
* @returns Earnings payment report for the calculation.
*/
getEpr(id: string): Promise;
/**
* Starts the repair process for the calculation.
* Returns a new modifiable copy of the calculation to be repaired.
* @param id Calculation for which the repair is requested.
* @returns A modifiable copy of the calculation to be repaired.
*/
startRepair(id: string): Promise;
/**
* Commits the repairs for the calculation.
* @param calculation Calculation which contains the repaired data.
* @returns A repaired version of the calculation which was repaired.
*/
commitRepair(calculation: Calculation): Promise;
/**
* Saves the repairs for the calculation.
* @param calculation Calculation which contains the repaired data.
* @returns The saved repair calculation.
*/
saveRepair(calculation: Calculation): Promise;
/**
* Recalculates the repair for the calculation.
* @param calculation Calculation which contains the repaired data.
* @returns The recalculated repair calculation.
*/
recalculateRepair(calculation: Calculation): Promise;
/**
* Returns the document flow for the given calculation.
* Documentflow contains invoices, earnings payment reports, payer suymmary reports and payrolls refering to the calculation.
* @param id Id of the calculation for the document flow.
* @returns Document flow for the calculation.
*/
getDocumentFlow(id: string): Promise;
}
/** Settings that affect the calculation result of the salaries. */
declare interface CalculationSettings {
/** Collection of pension contracts. In most cases, employer has only one, but in edge cases there may be several. */
pensionContracts?: PensionContract[] | null;
/** Collection of mandatory accident insurance contracts.
In most cases, employer has only one, but in edge cases there may be several. */
insuranceContracts?: InsuranceContract[] | null;
/** Settings related to unemployment insurance. */
unemploymentInsurance?: UnemploymentInsuranceSettings | null;
/** Settings related to reporting the salaries to authorities through Incomes Register. */
incomesRegister?: IncomesRegisterSettings | null;
/** Contains default calculation rows, default prices and custom row types for calculations. */
salaryDefaults?: RowTypeDefinition[] | null;
/** List of company employee groups. */
employeeGroups?: EmployeeGroupDefinition[] | null;
}
/** Defines the properties related to sharing and sending of the calculation. */
declare interface CalculationSharing {
/** Type of sharing for this calculation. */
type?: SharingUriType | null;
/** Sharing uri. */
uri?: string | null;
/** Email address to which the calculation was shared last time. */
lastSharedTo?: string | null;
/** Email address which the calculation was shared as cc last time. */
lastSharedCc?: string | null;
/** Last shared message to the employer */
lastSharedMessage?: string | null;
}
/** CalculationStatus enumeration */
declare enum CalculationStatus {
Draft = "draft",
PaymentStarted = "paymentStarted",
PaymentSucceeded = "paymentSucceeded",
PaymentCanceled = "paymentCanceled",
PaymentError = "paymentError",
PaymentWorkerCopy = "paymentWorkerCopy",
WorkerRequested = "workerRequested",
WorkerRequestAccepted = "workerRequestAccepted",
WorkerRequestDeclined = "workerRequestDeclined",
PaymentRefunded = "paymentRefunded",
PaymentRepairCopy = "paymentRepairCopy",
WaitingApproval = "waitingApproval",
PayrollDraft = "payrollDraft",
Repair = "repair",
ProDraft = "proDraft",
SharedWaiting = "sharedWaiting",
SharedApproved = "sharedApproved",
SharedRejected = "sharedRejected",
History = "history",
Template = "template"
}
/**
* Calculator is the main module for creating and modifying salary calculations.
* The module can be used completely anonymously without any authentication.
*/
declare class Calculator {
private ajax;
/**
* For NG1-dependency injection
* @ignore
*/
static $inject: string[];
constructor(ajax: Ajax);
/**
* OBSOLETE: use CalculatorLogic.getBlank() instead.
* @deprecated Factory method to create a new calculation on server-side.
* Typically, you do not need to call server-side factory methods in JavaScript.
* Instead, you can use client-side factory methods under logic. This saves you one round-trip to server.
* @ignore
*/
createNew(): Promise;
/**
* Creates a new calucation with simple salary
*
* @param kind The type of the salary.
* @param amount The amount of typically hours (could be months etc.). Defaults to 1 if left as null.
* @param price The price of one unit of amount.
* @param message Message text for end user - used in salary calculation
* @param calc The calculation object that should be updated. This is optional - often null, but can be set if you are updating an existing calculation.
*
* @returns A Promise with the recalculated Calculation.
*/
calculateSalary(kind: SalaryKind, amount: number, price: number, message: string, calc?: any): Promise;
/**
* Sets a household deduction to a calculation
*
* @param calc The calculation object to which household deduction is added
* @param setHouseHoldDeductionTo Boolean to which household
*
* @returns A Promise with the recalculated Calculation.
*/
setTaxDeduction(calc: Calculation, setHouseHoldDeductionTo: boolean): Promise;
/**
* Takes in a calculation - typically with modified parameters - and recalculates it.
*
* @param calc The salary calculation that should be recalculated
*
* @returns A Promise with the recalculated Calculation.
*/
recalculate(calc: Calculation): Promise;
/**
* Recalculates a calculation taking into account holiday year and absences from the worktime property.
* This is an anonymous method that can be used for unit testing: Does not read / write from database.
* @param calc The salary calculation that should be recalculated.
* Worktime property should contian the bases for the recalculation.
*
* @returns A Promise with the recalculated Calculation.
*/
recalculateWorktime(calc: Calculation): Promise;
/**
* Gets the worktime data for Period recalculation from raw calc, holidays andabsences data.
* This is an anonymous method that can be used for unit testing: Does not read / write from database.
*
* @param calc The salary calculation that should be recalculated.
* @param holidayYear Holiday year with holidays that should be added as salary rows. If not provided, holidays are not calculated.
* @param absences Absences that should be deducted from monthly salary. If not provided, absences are not calculated.
*
* @returns A Promise with Worktime data.
*/
getWorktimeData(calc: Calculation, holidayYear?: HolidayYear, absences?: WorkerAbsences_2): Promise;
/**
* Sets a unionPayment to a calculation
*
* @param calc The calculation object to which union payment is added
* @param paymentType Type of union payment, options are 'notSelected', 'raksaNormal', 'raksaUnemploymentOnly' and 'other'
* @param unionPaymentPercent How many percents the union payment is from the salary
*
* @returns A Promise with the recalculated Calculation.
*/
setUnionPayment(calc: Calculation, paymentType: UnionPaymentType, unionPaymentPercent: number): Promise;
/**
* Adds a calculation row: An expenses, benefits or other such row and returns the recalculated calculation with full data.
*
* @param calc The salary calculation that should be modified.
* @param rowType Type of the calculation row that should be added.
* @param message Message text for end user - used in salary calculation
* @param price Price for the row (e.g. €/h, €/km, €/month. Default is 0.
* @param count Count of the items - default is 1.
*
* @returns A Promise with the recalculated Calculation.
*/
addRow(calc: Calculation, rowType: CalculationRowType, message: string, price: number, count: number): Promise;
/**
* Deletes a calculation row: Expenses, benefits etc. item and returns the recalculated calculation with full data.
*
* @param calc The salary calculation that should be modified.
* @param rowIndex Zero based row index of the row that should be deleted.
*
* @returns A Promise with the recalculated Calculation.
*/
deleteRow(calc: Calculation, rowIndex: number): Promise;
/**
* Gets salary calculation parameters that are changing yearly.
* The method is designed for the end-of-year and as such it only supports 2 years:
* the current / previous year (from Jan to Nov) OR current / next year (in approx. December).
*
* @param forYear Date for which the numbers are fetched.
*
* @returns The yearly changing numbers if year supported. Error if year not supported.
*/
getYearlyChangingNumbers(forYear: Date | string): YearlyChangingNumbers | undefined;
/**
* Experimental: Returns a new Finvoice object for the given calculations.
* @param calculations Calculations for the Finvoice.
* @param tableType Accounting table type for the generated Finvoice.
* @ignore
*/
getFinvoice(calculations: Calculation[], tableType?: AccountingReportTableType): Promise;
}
/**
* Year 2019 Calculator controller that is not dependent on sigleton Calculations service.
* This controller extends ApiCrudObjectController (via CalculationCrudController).
*/
export declare class Calculator2019Controller extends CalculationCrudController {
private calcApi;
protected uiCrudHelpers: UiCrudHelpers;
protected invoicesService: InvoicesService;
private ajax;
/** Component bindings */
static crudBindings: Calculator2019ControllerCrudBindings;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** Type of the chart to show by default. */
chartType: string;
/** Options for the behavior of the calculator when in anonymous (demo) mode. */
anonOptions: {
role: "company" | "household";
};
/** Flags to indicate if the request is in progress */
loaders: any;
constructor(calcApi: Calculations, uiHelpers: UiHelpers, uiCrudHelpers: UiCrudHelpers, $location: angular_2.ILocationService, $routeParams: any, sessionService: SessionService, reportsService: ReportsService, invoicesService: InvoicesService, ajax: Ajax);
/**
* Initialization code.
*/
$onInit(): void;
/** Returns the current. Called currentCalc for backward compatibility with the old views. */
get currentCalc(): Calculation;
/**
* Gets the Sections object for the current calculation.
* It keeps track of which section is currently shown and what text etc. is shown in that section.
*/
get calcSections(): CalculatorSections;
/**
* Gets or sets the isHouseholdDeductible.
* This will be moved to a different location in V03, hence the abstraction.
*/
get isHouseholdDeductible(): boolean;
set isHouseholdDeductible(value: boolean);
/**
* Gets or sets the taxDeductionCategory (used to be salary.taxDeductionCategories).
* This will be moved to a different location in V03, hence the abstraction.
*/
get taxDeductionCategory(): TaxDeductionWorkCategories;
set taxDeductionCategory(value: TaxDeductionWorkCategories);
/**
* Returns true if the calculator is in "household" mode (as opposed to default "company" mode).
*/
get isHousehold(): boolean;
/**
* If true, the given action (button) is displayed.
* @param action One of the action values.
* For now, validation and role based action logic is in UI.
* Todo: some edge cases, i.e. isForcePayAllAllowed (for pay-button) are still in UI.
*/
showAction(action: CalculatorActions_2): boolean;
/**
* Returns true, if action (button) is disabled
* TODO: Add rules based on roles and validation? Pay button logic is in UI.
*/
isActionDisabled(action: CalculatorActions_2): boolean;
/**
* Gets the first row of the calculation assuring that it exists
* If there is no current calculation, the calculation is not added.
*/
getFirstRow(): UserDefinedRow;
/**
* Takes the current calculation, creates a copy of it in draft state
* and sets that calculation as current.
* This is done typically, when a calculation was in Paid state.
*/
copyAsNew(): void;
/**
* Reset worker in the calculations.
*/
resetWorker(): void;
/**
* Gets misc. logic calculations and operations (client side, based on rows etc.)
* that affect how the user interface is rendered.
*/
get calcLogic(): {
/** If true, calcualtion contains compensation. This is useful for customizing texts and other UI elements */
hasCompensation?: undefined;
/** Expenses box total. TODO: We should see can we move this to result / server side! */
expensesTotal?: undefined;
/** Sum for child care subsidy. This is shown separately in the UI. */
childCareSubsidy?: undefined;
} | {
/** If true, calcualtion contains compensation. This is useful for customizing texts and other UI elements */
hasCompensation: boolean;
/** Expenses box total. TODO: We should see can we move this to result / server side! */
expensesTotal: number;
/** Sum for child care subsidy. This is shown separately in the UI. */
childCareSubsidy: number | null;
};
/**
* Opens the login form for the current user
* @param redirectUrl - The URL where the user is taken after a successfull login.
* @param role - Optional role (household, worker or company) for the situations where it is known - mainly for new users
*/
signIn(redirectUrl?: string, role?: string): void;
/**
* Opens the login dialog with signUp / register functionality
* @param redirectUrl - The URL where the user is taken after a successfull login
* @param role - Optional role (household, worker or company) for the situations where it is known - mainly for new users
*/
register(redirectUrl?: string, role?: string): void;
/**
* Shows a report for the current calculation using a modal dialog.
* @param reportType - Type of report to show
*/
showReportDialog(reportType: calcReportType): void;
/**
* Deletes the currently selected calculation
*/
deleteCalc(path: string): void;
/**
* Recalculates the current calculation using the API.
* @returns A Promise with result data (Calculation)
*/
recalculate(): Promise;
/**
* Sets the current item as the given object (reference to a new object).
* This also resets the original item and sets the state as loaded.
* Override also sets either employer or worker based on the current role.
* @param item The new current item.
*/
setCurrentRef(item: Calculation): void;
/** Overrides the save method to allow anonymous saving to local storage */
save(): Promise;
/**
* Returns validation for current calculation or empty validation object if the calculation has not been recalculated (validated).
*/
get validation(): ApiValidation;
/** Returns date range text. */
getDatesRangeText(): string;
/** Returns household usecase text */
getUsecaseText(): string;
/** Returns true if the payment is possible when the employer pays all. */
get isForcePayAllAllowed(): boolean;
/**
* Shows a dialog for adding a new Employment relation.
* If user goes through the wizard the employment relation is saved and set to the calculation.
*/
showNewWorkerDialog(): void;
/**
* Shows a dialog during the check of auto taxcard.
*/
showRefreshAutoTaxcardDialog(): void;
/**
* Shows a dialog for modifying an existing Worker:
* Saves changes and updates the calculation.
*/
showWorkerEditDialog(): void;
/** UI related data and texts about the taxcard. */
get taxUi(): TaxcardUiInfo;
/**
* Gets the text for pension.
* @param isOverview If true, returns the shorter text for overview.
*/
getPensionText(isOverview?: boolean): string | undefined;
/**
* Sends the payroll from company to PRO.
* @param message Message to the accountant
*/
sendToPro(message: string): void;
/**
* Calculates the total amount of days for the given period type.
* @param periodType Period type to calculate days for.
* @returns Sum of days for the given period type.
*/
calculatePeriodDays(periodType: "absencesDays" | "leavesDays" | "paidAbsencesDays"): number;
/**
* Saves a calculation to local storage
* @param calc - Calculation to store
*/
private setToLocalStorage;
/**
* Deletes a calculation in local storage
*/
private deleteFromLocalStorage;
}
declare class Calculator2019ControllerCrudBindings extends ApiCrudObjectControllerBindings {
/** Options for the behavior of the calculator when in anonymous (demo) mode. */
anonOptions: string;
}
/**
* Year 2022 version of the Calculator controller designed for customized calculator UI's (usecases).
* Removes old methods that are no longer necessary (household, old calculator UI)
* and adds more support for customization.
*/
export declare class Calculator2022Controller extends CalculationCrudController {
protected invoicesService: InvoicesService;
protected uiCrudHelpers: UiCrudHelpers;
private usecasesService;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** Component bindings */
static crudBindings: {
[boundProperty: string]: string;
detailsUrl: string;
listUrl: string;
model: string;
isReadOnlyForced: string;
};
/**
* The usecase definition if specified and loaded.
* Check the usecaseState if the.
*/
usecase: null | Usecase;
/** Available usecases if the user needs to make a selection of which usecase to take. */
usecases: UsecaseListItem[];
/** If true, additional worker info is displayed in the UI */
isWorkerInfoOpen: boolean;
constructor(calcApi: Calculations, reportsService: ReportsService, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any, sessionService: SessionService, invoicesService: InvoicesService, uiCrudHelpers: UiCrudHelpers, usecasesService: UsecasesService);
/**
* Initialization code.
*/
$onInit(): void;
/** Overrides the reload to assure that usecase is also loaded. */
reload(): Promise;
/**
* If true, the given action (button) is displayed.
* @param action One of the action values.
* For now, validation and role based action logic is in UI.
* Todo: some edge cases, i.e. isForcePayAllAllowed (for pay-button) are still in UI.
*/
showAction(action: CalculatorActions): boolean;
/**
* Returns true, if action (button) is disabled
* TODO: Add rules based on roles and validation? Pay button logic is in UI.
*/
isActionDisabled(action: CalculatorActions): boolean;
/** Loads the available usecases => The UI shows them as selection. */
showUsecasesSelection(): Promise;
/**
* Sets the given usecase to the current calculation.
* @param uri Uri for the new usecase.
*/
setUsecase(uri: string): void;
/**
* Gets a total of row type(s)
* @param types A single row type or array of types to filter for calculation.
*/
getRowTotal(types: CalculationRowType | CalculationRowType[]): number;
/**
* Shows a report for the current calculation using a modal dialog.
* @param reportType - Type of report to show
*/
showReportDialog(reportType: calcReportType): void;
/**
* Shows a dialog for modifying an existing Worker:
* Saves changes and updates the calculation.
*/
showWorkerEditDialog(): void;
/** Shows infor dialog about the current usecase in the calculation. */
showUsecaseInfo(): void;
/**
* Shows a dialog during the check of auto taxcard.
*/
showRefreshAutoTaxcardDialog(): void;
/**
* Shows a dialog for adding a new Employment relation.
* If user goes through the wizard the employment relation is saved and set to the calculation.
*/
showNewWorkerDialog(): void;
/**
* Returns validation for current calculation or empty validation object if the calculation has not been recalculated (validated).
*/
get validation(): ApiValidation;
/** Returns true if the payment is possible when the employer pays all. */
get isForcePayAllAllowed(): boolean;
/** HACK: This will be removed after moved to useCase based calculators. Placeholder for usecase specific logic in history calculation. */
historyUsecase: {
save: () => void;
recalculate: () => void;
};
}
/** Enumerations for calculator actions */
declare enum CalculatorActions {
AllowForcePay = "allowForcePay",
Approve = "approve",
Cancel = "cancel",
CopyAsNew = "copyAsNew",
Delete = "delete",
Pay = "pay",
Recalculate = "recalculate",
Reject = "reject",
Save = "save",
SendToPro = "sendToPro",
ShowPaymentDialog = "showPaymentDialog",
SetSalaryDateKind = "setSalaryDateKind"
}
/** Enumerations for calculator actions */
declare enum CalculatorActions_2 {
AllowForcePay = "allowForcePay",
Approve = "approve",
Cancel = "cancel",
CopyAsNew = "copyAsNew",
Delete = "delete",
Pay = "pay",
Recalculate = "recalculate",
Reject = "reject",
Save = "save",
SendToPro = "sendToPro",
ShowPaymentDialog = "showPaymentDialog",
SetSalaryDateKind = "setSalaryDateKind",
ContinuePsdPayment = "continuePsdPayment"
}
/**
* Defines the panels logic in the Calculator
*/
export declare class CalculatorPanels {
calc: Calculation;
/**
* Creates a new CalculatorPanels helper for a calculation
* @param calc - The Calculation object for which the helper operates
*/
constructor(calc: Calculation);
/** Stores the UI properties to the calculation until a roundtrip to server. Then the property is set to null */
get ui(): any;
/**
* Toggles the user interface panels active (open/close) in a hierarchical way.
* The functionality mimics a hierarchical panel/menu structure in HTML / components that are not hierarchical.
* See the example to better understand the logic.
* Hierarchy logic is supported to 2 levels only - it is not tested on deeper hierarchy though it may function.
* @param panels - Identifiers of panel or two panels (panel and its child) that should be toggled.
* @example
* Assume we have these two panels open: "panel1", "panel2"
*
* - togglePanel("panel1", "panel2") => ["panel1"] // Normal 2nd level toggle opens and closes the last level.
* - togglePanel("panel2") => ["panel1"] // Alternative explicit last level close
* - togglePanel("panel1") => [] // Normal 1st level toggle opens and closes the first level
* - togglePanel("panel3") => ["panel3"] // Opening another "path" of the hierarchy
* - togglePanel("panel3", "panel4") => ["panel3", "panel4"]
* - togglePanel("panel1", "panel4") => ["panel1", "panel4"] // Being a separate "path" is determined by last element only
* - togglePanel("last") => ["panel1"] // Special keyword for closing the last panel
* - togglePanel() => [] // Closes all panels
*/
toggleActivePanel(...panels: any[]): void;
/**
* Returns true if the panel is active (open).
* @param panel - identifier of the panel.
*/
isPanelActive(panel: string): boolean;
}
/** Logical section / area of the calculator ui. */
export declare class CalculatorSection {
isActive: boolean;
isSelectionDone: boolean;
title: string;
/**
* Creates a new CalculatorSection
* @param isActive - If true, the section is currently active / selected in te user interface.
* @param isSelectionDone - If true, user has selected some values for the section
* @param title - Short text title for the section
*/
constructor(isActive: boolean, isSelectionDone: boolean, title: string);
/**
* Shortcut for isSelectionDone or isActive.
* This is when the overview window should be shown colored
*/
get isOverviewActive(): boolean;
}
/** Sections defines areas of the calculator: worker, household-usecase, worktime, salary, expenses and results. */
export declare class CalculatorSections {
calc: Calculation;
/**
* Creates a new CalculatorSections helper for a calculation
* @param calc The Calculation object for which the helper operates
*/
constructor(calc: Calculation);
/** Stores the UI properties to the calculation until a roundtrip to server. Then the property is set to null */
get ui(): any;
/**
* Activates a section in the calculator (opens the detail view).
* @param section - Name of the section
*/
setActive(section: string): void;
/**
* Toggles the section
*/
toggleActive(section: string): void;
/**
* Toggles the section active / non-active.
*/
toggle(section: string): void;
/** Gets a section */
get(section: string): CalculatorSection | undefined;
}
/**
* The **CalcUsecase** is the 2022 version of the calculator (Calc) that supports
* usecases: customizations to user interfaces and logic using HTML and JavaScript.
* It is expected to eventually replace the old Calc component.
*
* The component provides functionality for:
*
* 1. Selecting the Employment relation / Worker to the calculation (employer if the current user is Worker)
* 2. Selecting the usecase if one is not provided in the URI.
* 3. Defining the Worktime information: Period, Absences and holidays.
* 4. Defining the calculation rows: salary, expences, benefits, deductions etc.
* 5. Showing the results as charts and reports.
* 6. Starting the payment process
*
* Controllers are defined in **salaxy.ng1.controllers**. Most of the functionality comes from Calculator2022Controller.
* The view (html) can be modified using the usecase view mechanism.
* @example
* ```html
*
* ```
*/
export declare class CalcUsecase extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
[boundProperty: string]: string;
detailsUrl: string;
listUrl: string;
model: string;
/** Uses the Calculator2022Controller */
isReadOnlyForced: string;
};
/** Uses the Calculator2022Controller */
controller: typeof Calculator2022Controller;
/** The default template for the component. */
defaultTemplate: string;
}
/** Worker object for the current calculation */
declare interface CalcWorker {
/** Palkkaus.fi Account Id for the worker.
Alternatively you can set the Payment data with the required infromation */
accountId?: string | null;
/** Employment Id for the worker. */
employmentId?: string | null;
/** Data that is needed for salary payment.
This object may be null if AccountId has been set.
Also, if AccountId has been set, these properties will be ignored:
The Worker will decide on payment properties herself. */
paymentData?: CalcWorkerPaymentData | null;
/** Display image and properties of the Worker.
Based on either the AccountId or PaymentData */
avatar?: Avatar_2 | null;
/** True if Profile is the currently Account
If set to true, will set current Account as this contract party.
This overrides any value in AccountId, so be sure to switch this back to false if this is switchable.
Setting to False does not have any immediate effect. */
isSelf?: boolean | null;
/** Date of birth for the Worker - this affects the side costs.
Please also set the DateOfBirthAccuracy, if you set this property.
If PaymentData or AccountId lead to a valid Social security number, it will override any age set here. */
dateOfBirth?: string | null;
/** Accuracy of the date of birth
If PaymentData or AccountId lead to a valid Social security number, it will override any age set here. */
dateOfBirthAccuracy?: DateOfBirthAccuracy | null;
/** New Widthholding tax logic that is based on separately stored tax cards. */
tax?: CalcTax | null;
/** Current address of the worker.
Please note that this is a read only field. */
contact?: Contact | null;
}
/**
* Shows information about the Worker / employment relation within a calculation.
* @example
* ```html
*
* ```
*/
export declare class CalcWorkerInfo extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
[boundProperty: string]: string;
anonOptions: string;
detailsUrl: string;
listUrl: string;
model: string;
isReadOnlyForced: string;
};
/** Uses the Calculator2019Controller */
controller: typeof Calculator2019Controller;
/** The default template for the component. */
defaultTemplate: string;
}
/** The required information for paying the Salary to Worker. */
declare interface CalcWorkerPaymentData {
/** First name of the person. */
firstName?: string | null;
/** Last name / Surname of the person. */
lastName?: string | null;
/** Gets the Social security number the way the user set it in input.
HOWEVER: The getter will change the string to upper invariant/trim and if the last character is "*", it will be replaced by calculated checksum. */
socialSecurityNumber?: string | null;
/** Social security number if valid or null */
readonly socialSecurityNumberValid?: string | null;
/** IBAN number for the Bank account */
ibanNumber?: string | null;
/** Contact e-mail address. */
email?: string | null;
/** Telephone number */
telephone?: string | null;
}
/** Defines the properties of salary calculation workflow - typically the workflow from draft to Payment. */
declare interface CalcWorkflow {
/** Status of the calculation from Draft to PaymentSucceeded */
status?: CalculationStatus | null;
/** Time when this calculation was paid (if it was paid) to Palkkaus service. */
paidAt?: string | null;
/** Time when the salary was paid by Palkkaus service. */
salaryPaidAt?: string | null;
/** Last date and time when this calculation was repaired after payment. */
repairedAt?: string | null;
/** The estimated date when the salary is withdrawable by the worker. */
salaryDate?: string | null;
/** The requested date for the SalaryDate from the employer. */
requestedSalaryDate?: string | null;
/** Defines the re-setting of the salary date in the calculation re-calculation. */
salaryDateKind?: SalaryDateKind | null;
/** The original id the calculation which this calculation is a copy of. */
originalId?: string | null;
}
/**
* UI for setting the Worktime properties within the calculator
* The process starts by selecting the period based on which relevatn worktime
* data is fetched: Holidays, Absences and later Hours.
* Calculation rows are then added based on this worktime.
* @example
* ```html
*
* ```
*/
export declare class CalcWorktime extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/** The calculation that the component edits (shows in read-only mode). */
calc: string;
};
/** Uses the CalcWorktimeController */
controller: typeof CalcWorktimeController;
/** The default template for the component. */
defaultTemplate: string;
}
/** Worktime data that is stored as part of Salary calculation: work days, absences, holidays and holiday accrual. In the future may also contain relevant part of timesheet data (work hours). */
declare interface CalcWorktime_2 {
/** Employment period that is updated from employment at each recalculation (as opposed to holiday specification). */
employmentPeriod?: DateRange_2 | null;
/** Wage basis from the current employment relation.
This is for absences and does not presume that holiday years exist for the worker. */
wageBasis?: WageBasis | null;
/** Describes the working days in the period.
Currently, uses the DaysCount, but later the full days array will be taken to use.
This includes the absence days (divider in AbsencesDaySalary). */
workDays?: DateRange_2 | null;
/** Periods of 'absences'. */
absencesPeriods?: AbsencePeriod[] | null;
/** Price for a single absence day. Typically based on MonthlySalary, but may be modified. */
absencesDailySalary?: number | null;
/** Specification for the holiday calculation */
holidaySpec?: HolidaySpecificationForYear | null;
/** Price for a single holiday day */
leavesDailySalary?: number | null;
/** Price for a single bonus day */
bonusDailySalary?: number | null;
/** Total remaining amount of holiday pay accrual. */
holidayPayAccrualRemaining?: number | null;
/** Total remaining amount of holiday bonus accrual. */
holidayBonusAccrualRemaining?: number | null;
/** Accruals for each calendar month in this calculation. */
accruals?: MonthlyHolidayAccrual[] | null;
/** Specification for the accrual calculation */
accrualSpec?: HolidayAccrualCalcSpecification | null;
}
/**
* Handles the user interaction of Worktime within the Calculator.
* The Worktime contains the logic for fetching holidays and absences
* for that particular period and adding calculation rows for them if necessary.
*/
export declare class CalcWorktimeController implements angular_2.IController {
private uiHelpers;
private calcApi;
private anonCalcApi;
private sessionService;
private employmentsApi;
private $timeout;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** User interface shortcuts for period selection */
periodShortcuts: {
/** Text for current month. */
monthCurrent: string;
/** Text for last month. */
monthLast: string;
/** Text for other month. */
monthOther: string;
/** Text for two weeks. */
weeks2: string;
/** Text for half a month */
monthHalf: string;
/** Text for other period. */
other: string;
};
/** The calculation that the controller edits (shows in read-only mode). */
calc: Calculation;
/**
* The employment data for the worker.
*/
workerEmployment: Employment;
/**
* Worktime data for the period fetched from the server
*/
worktime: CalcWorktime_2;
/** If there is a validation error in period start, it is added here. */
periodStartDateError: null;
/** Demodata for the anonymous demo calculator. */
demoData: {
/** Start date for which the data was generated. */
startDate: string;
/** End date for which the data was generated. */
endDate: string;
/** The holiday data */
holidays?: HolidayYear;
/** Absences data. */
absences?: WorkerAbsences_2;
};
private _periodStartDate;
private _dateRange;
/**
* Creates a new CalcWorktimeController
* @ignore
*/
constructor(uiHelpers: UiHelpers, calcApi: Calculations, anonCalcApi: Calculator, sessionService: SessionService, employmentsApi: Employments, $timeout: angular_2.ITimeoutService);
/**
* Implement IController
*/
$onInit(): void;
/**
* Reset the controller to initial state.
*/
reset(): void;
/**
* Loads the employment data for the current worker.
*/
loadEmployment(): Promise;
/**
* Getter for checking if WorkerHolidays is active.
*/
get isWorkerHolidaysActive(): boolean;
/** Gets the requested salary date */
get requestedSalaryDate(): string;
set requestedSalaryDate(value: string);
/**
* Reloads the holidays from server.
*/
reloadHolidays(): void;
/** Holiday year has been changed and must be saved and reloaded. */
holidaysChanged(holidaysCtrl: HolidayYearCrudController): void;
/** Absences has been changed and must be saved and reloaded. */
absencesChanged(absencesCtrl: WorkerAbsencesCrudController): void;
/** Gets the current calculation object */
get currentCalc(): Calculation;
/**
* Returns true if there is no net salary payment to worker at all.
*/
get isCurrentZeroPayment(): boolean;
/** Disable function for the salary date picker. */
isDisabledSalaryDate: (date: any) => boolean;
/** Getter and setter for Calculation daterange in compatible format for new DateRange component. */
get dateRange(): DateRange_2;
set dateRange(value: DateRange_2);
/** Returns true if the holidays uses accrual. */
get isHolidayAccrual(): boolean;
/** Returns true if holidays are accrued for this calc. */
get accruesHolidays(): boolean;
/**
* Called when the date range changes.
* @param noPeriodStartDateUpdate If true, the _periodStartDate is not updated.
* Should be true if the change is triggered by that input to avoid UI flickering.
*/
dateRangeChange(noPeriodStartDateUpdate?: boolean): void;
/**
* Gets or sets the period start date, which is bound to editable input in case the period type
* is not "other" (date the range / calendar component)
*/
get periodStartDate(): string;
set periodStartDate(value: string);
/**
* Gets the user interface shortcut for the period type:
* Different user interfaces are shown depending on the period shortcut.
*/
get periodShortcut(): "monthCurrent" | "monthLast" | "monthOther" | "weeks2" | "monthHalf" | "other";
set periodShortcut(value: "monthCurrent" | "monthLast" | "monthOther" | "weeks2" | "monthHalf" | "other");
/**
* Submit the data in the Worktime (period) dialog.
*/
submitWorktime(): void;
/** Returns true if the current worktime data seems to have holidays or absences to add as rows in the salary calculation. */
hasHolidaysOrAbsences(): boolean;
/**
* Returns the logic for the worktime data related lists
* @returns Logic object for the lists.
*/
getLogicForLists(): any;
/** Shows the pro-dialog */
showPeriodDetails(): void;
/**
* Gets the status for the current holidays and absences fetching.
* These are fetched from the server when the period and / or worker changes.
*/
getHolidaysStatus(): "noWorker" | "noPeriod" | "loading" | "ok";
/**
* Gets the monthly text for calendar month for accruals.
* @param type Type of the text is either header or description.
*/
getAccrualMonthText(type: "header" | "description", month: MonthlyHolidayAccrual): string;
/**
* Gets the accrual explanation text. This is currently not in use.
* TODO: translate
*/
getAccrualText(monthlyAccrual: MonthlyHolidayAccrual): string;
/**
* Opens the dialog for editing calculation payments
*/
openCalcLeavesDialog(): void;
/** Checks if the period has changed and if so resets the demo data. */
checkDemoData(): void;
private initDateRanges;
/** Programmatic tab change via a UI link text. */
changeTab(tabId: string): void;
}
/**
* Renders a monthly calendar where one month is one row and you can show ranges and special days (only partial support).
* Future implementations will support categories / swimlanes of periods (e.g. holidays from several persons)
* and have better support for special days: different types of markers, pop-up etc.
* @example
* ```html
*
* ```
*/
export declare class Calendar extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/**
* Start date for the calendar as ISO date yyyy-MM-dd. Renders from the beginning of this month.
*/
start: string;
/**
* End date of the calendar as ISO date yyyy-MM-dd. Renders until the end of this month.
*/
end: string;
/**
* Today date for the calendar as ISO date yyyy-MM-dd.
* Can be set as dately object (e.g. ISO string, JS Date or key string "today")
*/
today: string;
/** The data that is plotted on the calendar chart. */
data: string;
/** Optional data mapper function that is used in mapping the data to CalendarSeries array. */
mapper: string;
/** TODO: Remove */
periods: string;
/** TODO: Remove */
days: string;
/** Type of chart: "align-weekdays", "align-left" or horizontal. */
mode: string;
/**
* Function that is called when user selects an item in the calendar.
* Function can have the following locals: type: "event" | "day", date: string, day: Full calendar day with all the day info,
* calEvent: The calendar event if type is "event", series: Series that the event belongs to or the series that is clicked (not always available).
* @example
*/
onListSelect: string;
/** Possibility of specifying a list controller that can be used for item editing. */
listController: string;
/** If set to true, the export buttons are visible. */
showExport: string;
};
/** Uses the CalendarController */
controller: typeof CalendarController;
/** The default template for the component. */
defaultTemplate: string;
}
/** Salaxy calendar action is an extension to iCalendar Alarms: It supports the standard alarms: Display, Email and Audio, but also salaxy action scripts. */
declare interface CalendarAction {
/** Unique identifier in the Salaxy context. */
id?: string | null;
/** Action type */
type?: CalendarActionType | null;
/** Summary text for the action. Subject for E-mail */
summary?: string | null;
/** Description text for the action. Body text for Email, Notification message for Display. */
description?: string | null;
/** Attendees are E-mail receivers for Email Alert and potentially Display notifications in the future.
Script actions may also later use them when credentials, accounts or similar are needed fro execution. */
attendees?: CalendarAttendee[] | null;
/** Attachment files for the action. Attachments for E-mail. */
attachments?: CalendarAttachment[] | null;
/** The duration trigger. Either this or TriggerDateTime must specified. */
triggerDuration?: string | null;
/** The fixed date-time trigger. Only used if, Duration is not available.
NOTE that Salaxy implements this feature a bit differently than rfc-5545: The spec says that for a repeating event,
the alarm should trigger only once (+repeat), but current Salaxy implementation would trigger the alarm the amount of items. */
triggerDateTime?: string | null;
/** If specified, the action repeats number of times (in addition to the initial trigger) specified in this parameter with RepeatDuration values.
If Repeat is more than 0, also RepeatDuration must be specified. */
repeat?: number | null;
/** Time between the repeats aftern the initial repeat. */
repeatDuration?: string | null;
}
/** Occurence of an Action (Alarm in iCalendar) within a Calendar occurence. */
declare interface CalendarActionOccurence {
/** Identifier of the event that produces this action occurence */
eventId?: string | null;
/** Identifier of the action that produces this occurence */
actionId?: string | null;
/** Action type */
type?: CalendarActionType | null;
/** The date/date-time this action is executed. */
start?: string | null;
/** Indicates that the time of the recurrence (start) is irrelevant: Just display the date. */
isAllDay?: boolean | null;
/** Summary text for occurence. Max 255 characters. */
summary?: string | null;
}
/** CalendarActionType enumeration */
declare enum CalendarActionType {
Undefined = "undefined",
Display = "display",
Email = "email",
Audio = "audio",
CreateItem = "createItem",
Script = "script",
PaymentDate = "paymentDate"
}
/** Attachment for calendar event or Action/Alarm. */
declare interface CalendarAttachment {
/** URI of the attachment. This is the default way of specifying attachments.
TODO: Check if the Uri data type works in API. If not, switch to string. */
uri?: string | null;
/** Attachment as inline data. Encoded with ValueEncoding. */
data?: string | null;
/** The file format type / mime type (e.g. "text/plain"). */
formatType?: string | null;
/** Encoding for the inline data.
TODO: Consider making read-only. */
valueEncoding?: string | null;
}
/** Describes the calendar attendees in an avatar-visualization compatible way. */
declare interface CalendarAttendee {
/** Account or Credentials uri IF the attendee is a Palkkaus.fi account. Otherwise null. */
uri?: string | null;
/** The display name of the attendee (CN) */
displayName?: string | null;
/** The E-mail address of the person */
email?: string | null;
/** Entity type: person/company. In calendar attendees, defaults to Person. */
entityType?: LegalEntityType | null;
/** Type of the Avatar picture. */
pictureType?: AvatarPictureType | null;
/** Color - currently only used by type Icon */
color?: string | null;
/** Initials - used by PictureType Icon */
initials?: string | null;
/** URL of the picture if specified as picture (null in a case of type Icon) */
url?: string | null;
}
/**
* Renders a calendar control for visualisation of holidays.
*/
export declare class CalendarController implements angular_2.IController {
private uiHelpers;
private $http;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/**
* Start date for the calendar as ISO date yyyy-MM-dd. Renders from the beginning of this month.
*/
start: string;
/**
* End date of the calendar as ISO date yyyy-MM-dd. Renders until the end of this month.
*/
end: string;
/**
* Calendar data where single series can be represented as an array of events (CalendarUiEvent or date ISO string).
* Several series should be represented as CalendarSeries that contain events.
* Note that a DateRange also passes as CalendarUiEvent because it has start and end dates.
*/
data: CalendarSeries[] | (CalendarUiEvent | string)[] | any;
/**
* Function that is called when user selects an item in the calendar.
* Function can have the following locals: type: "event" | "day", date: string, day: Full calendar day with all the day info,
* calEvent: The calendar event if type is "event", series: Series that the event belongs to or the series that is clicked (not always available).
* @example
*/
onListSelect: (params: {
/** Selection type. */
type: "event" | "day" | "series";
/** Seleted date as ISO string. */
date: string;
/** Full calendar day with all the day info. */
day: CalendarDay;
/** Calendar event that was clicked: Only if selection type is "event." */
calEvent?: CalendarUiEvent;
/**
* Series that the event belongs to or the series that is clicked.
* Note that some clicks of type "day" might not have the series info, in current UI the header above series when calendar supports multiple series.
*/
series?: CalendarSeries;
}) => void;
/** Language versioned weekdays short texts (e.g. "ma", "ti",...) */
weekdays: string[];
/** Get the header days for the whole calendar. */
weekdaysForMonth: {
/** Weekday index number (align-weekdays) or day of month (align-left). */
ix: number;
/** Week day number in week (align-weekdays). */
weekday?: number;
/** Text for the week day (align-weekdays) or day of month (align-left). */
text: string;
}[];
/** A mapper that is used in converting custom data to Calendar series array. */
mapper: (sourceData: any) => CalendarSeries[];
/** If specified, this is the list controller that should be used for editing the item. */
listController: ListControllerBase;
/** If set to true, the export buttons are visible. */
showExport: boolean;
private _today;
private _mode;
private _series;
private HOLIDAY_COLOR;
private WEEKEND_COLOR;
private EVENT_COLOR;
constructor(uiHelpers: UiHelpers, $http: angular_2.IHttpService);
/**
* Implement IController
*/
$onInit: () => void;
/** Initialize the header (days) */
initHeader(): void;
/**
* Specifies how the weekdays are aligned from one month to another.
* "horizontal" shows all months side-by-side horizontally, so there is no alignment.
*/
get mode(): "align-weekdays" | "align-left" | "horizontal" | "list";
set mode(value: "align-weekdays" | "align-left" | "horizontal" | "list");
/** Gets the Today date for the calendar as ISO date yyyy-MM-dd. */
get today(): string;
/** Sets the Today date as dately object (e.g. ISO string, JS Date or key string "today") */
set today(value: string);
/** Gets all days of all months */
get allDays(): CalendarDay[];
/**
* Gets the data harmonized as an array of Calendar Series
*/
get series(): CalendarSeries[];
/**
* Gets the monthly list: Only the dates that have events on them.
* Only the start of event is considered except for the first month where all intercepting properties are.
*/
get monthlyList(): CalendarMonth[];
/** The collection of months that the calendar renders. */
get months(): CalendarMonth[];
/**
* Gets the short text "ma", "ti", "ke", "to", "pe", "la", "su".
* @param date Date as ISO string or date
*/
getShortWeekdayText(date: any): string;
/** Gets the CSS class(es) for a calendar event. */
getCssClass(event: CalendarUiEvent): string;
/**
* Get the event CSS style for a single day. Main thing is to set the disposition and smaller size if the day has overlapping items.
* @param event Event for which to calculate the styles.
* @param allEvents All events in the given series/type: Either period or singleDay.
*/
getEventStyle(event: CalendarUiEvent, allEvents: CalendarUiEvent[]): any;
/**
* A date in the calendar was clicked.
* @param day Day that was clicked.
* @param series The series that contains the event.
* If null, the click is in header etc. where series is not available.
* @param $event The AngularJS event used to stop propagation.
*/
dateClicked(day: CalendarDay, series: CalendarSeries, $event: angular_2.IAngularEvent): void;
/**
* Called by view when an event is clicked.
* @param ev Event that is being clicked
* @param day Day on which the event occurs
* @param series The series that contains the event. If null, the first series is taken.
* @param $event AngularJS event: Used for stopping propagation.
*/
eventClicked(ev: CalendarUiEvent, day: CalendarDay, series: CalendarSeries, $event: angular_2.IAngularEvent): void;
/**
* A series title in the calendar was clicked.
* @param series The series.
* @param $event The AngularJS event used to stop propagation.
*/
seriesClicked(series: CalendarSeries, $event: angular_2.IAngularEvent): void;
/**
* Exports the calendar as a PDF.
* This method shows a loading indicator, constructs a URL for the PDF request,
* and handles the PDF request.
*/
exportCalendarPdf(): void;
private handlePdfRequest;
private fetchPdf;
/**
* Export the calendar as Excel.
*/
exportCalendarExcel(): void;
private generateExcelHeaders;
private generateExcelDataRows;
private generateExcelDataRow;
/**
* Copies the data as normalized data set so that we can harmonize the dates and potentially make other changes in the future.
* Copy is shallow copy of CalendarUiEvent.
*/
private assureNormalizedCopy;
/** Get a simplified cache key for caching months / days. */
private getCacheKey;
/**
* Cache counter is updated by months getter, which is the foundation of data refresh and observes full getCacheKey.
* Rest of the methods can just check this simpler cacheCounter for refreshes.
*/
private cacheCounter;
}
/** Single day in the calendar */
declare interface CalendarDay {
/** Date of month 1-31 */
day: number;
/** ISO date for the day */
date: string;
/** Weekday 1-7 (mon-sun) */
weekday: number;
/** Two-letter language versioned weekday text (ma,ti,ke,to,pe,la,su / mo,tu,we,th,fr,sa,su) */
weekdayText: string;
/** Special days: Today overrides holiday, if day is both holiday and today. */
dayType: "holiday" | "today" | "normal";
/** Events for the day: Events that start on the day or periods with end date (and no icon) that intersect the day. */
events: CalendarUiEvent[][];
/** Periods (repsesented as colored div) that intersect the given day. */
periods: CalendarUiEvent[][];
/** Single days (represented as icon) that occur on the given day */
singleDays: CalendarUiEvent[][];
}
/** Represents a calendar event in iCalendar compatible way. */
declare interface CalendarEvent {
/** The part of the data that provides the compliance to iCalendar VEVENT data model defined in RFC 5545,
not including the properties that are standard in Salaxy (e.g. id/uid, createdAt etc.). */
event?: CalendarVEvent | null;
/** Occurence information based on the event. */
occurenceInfo?: CalendarEventOccurenceInfo | null;
/** Identifier of the object. */
id?: string | null;
/** The date when the object was created. */
createdAt?: string | null;
/** The time when the object was last updated.
Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */
updatedAt?: string | null;
/** Owner ID for this data */
owner?: string | null;
/** Indication that for the currently logged-in account, the data is generally read-only. */
isReadOnly?: boolean | null;
/** Primary partner information. Automatically updated from the storage container Partner. */
partner?: string | null;
}
/** Calendar event specific business data for index. */
declare interface CalendarEventData {
/** The start date/time of the event. */
start?: string | null;
/** The end date/time of the event. */
end?: string | null;
/** The duration of the event. */
duration?: string | null;
/** Recurrence rules as a CRLF separted string. */
rRules?: string | null;
/** Returns true if the event is a recurring event: RRules or Recurrence dates.. */
isRecurring?: boolean | null;
/** Returns true if the event is an all-day event. */
isAllDay?: boolean | null;
/** Priority is specified as an integer in the range 0 to 9.
A value of 0 specifies an undefined priority.
A value of 1 is the highest priority, 1-4=HIGH, 5=MEDIUM/Normal and 6-9=LOW.
Negative values may be used by admin functions (not through API) to set priority overrides. */
priority?: number | null;
/** Status as string */
status?: string | null;
}
/**
* Renders an editor / details component for a Calendar Event.
* @example
* ```html
*
* ```
*/
export declare class CalendarEventDetails extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
[boundProperty: string]: string;
detailsUrl: string;
listUrl: string;
model: string;
isReadOnlyForced: string;
};
/** Uses the CalendarEventsCrudController */
controller: typeof CalendarEventsCrudController;
/** The default template for the component. */
defaultTemplate: string;
}
/** Represents a single item in a list of calendar events in the search index. */
declare interface CalendarEventListItem {
/** The date when the object was created. */
createdAt?: string | null;
/** The time when the object was last updated.
Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */
updatedAt?: string | null;
/** Last date of modification of the object. The modification can be produced by the end user or by the system. */
timestamp?: string | null;
/** Person GUID for the owner of the object. */
ownerId?: string | null;
/** Metadata for the owner */
ownerInfo?: AccountInIndex | null;
/** The main status depending on the type of the object. */
status?: CalendarEventStatus | null;
/** The back office status depending on the type of the object. */
backOfficeStatus?: string | null;
/** When the event started. Typically, this is the CreatedAt date, but it may be something else. */
startAt?: string | null;
/** This is the end date of the event.
Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */
endAt?: string | null;
/** Gross salary if that is relevant to the transaction. */
grossSalary?: number | null;
/** This is the payment from the Owner point-of-view:
Total payment for the Employer and Net salary for the Worker in the case of a calculation.
Only add here the payment, if the payment is really made. */
payment?: number | null;
/** Estimated fee of the transaction to Palkkaus.fi. */
fee?: number | null;
/** The GUID for the other party. Currently, this is always the PersonID. */
otherId?: string | null;
/** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */
otherPartyInfo?: AccountInIndex | null;
/** A very short description describing the object as an event. E.g. "Paid salary" */
shortText?: string | null;
/** Business object ids related to this object. E.g. calculations and payrolls in the payment. */
businessObjects?: string[] | null;
/** This is valid for calculations only. The estimated date of salary in worker. */
salaryDate?: string | null;
/** Business data to include further information of the object. */
data?: CalendarEventData | null;
/** Version number. May be used in conflicts */
versionNumber?: number | null;
/** Salaxy uri of the resource. */
uri?: string | null;
/** Workflow flags for the object.
Only workflow events with API supported message types are listed. */
flags?: string[] | null;
/** Workflow messages for the object.
Only workflow events with API supported message types are listed.
Shown in format "[MessageType]:[Message] ([User] at [UTC-time])" */
messages?: string[] | null;
/** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */
entityType?: string | null;
/** The date for the actual period for which this object is done. */
logicalDate?: string | null;
/** Reference information. E.g. Payment or MoneyTransfer reference number. */
reference?: string | null;
/** External id for the object in 3rd party system. */
externalId?: string | null;
/** Identifier of the object. */
id?: string | null;
/** Owner ID for this data */
owner?: string | null;
/** Indication that for the currently logged-in account, the data is generally read-only. */
isReadOnly?: boolean | null;
/** Primary partner information. Automatically updated from the storage container Partner. */
partner?: string | null;
}
/** Information about the occurences of the calendar event when the event was last stored into the storage. */
declare interface CalendarEventOccurenceInfo {
/** If true, the event is a recurring */
isRecurring?: boolean | null;
/** First occurence of the event */
occurencesStart?: string | null;
/** Last occurence of the event. Please note that only max 1 year from today is calculated. */
occurencesEnd?: string | null;
/** Next occurences (max 100) */
next?: CalendarOccurence[] | null;
/** Dictionary of executed actions. */
executedActions?: {
[key: string]: string;
} | null;
}
/**
* Provides CRUD access for Calendar events and other calendar methods.
*/
declare class CalendarEvents extends CrudApiBase {
/**
* For NG1-dependency injection
* @ignore
*/
static $inject: string[];
/** Base URL for details etc. */
protected baseUrl: string;
constructor(ajax: Ajax);
/** Client-side (synchronous) method for getting a new blank item as bases for UI binding. */
getBlank(): CalendarEvent;
/**
* Recalculates the occurence info based on the event.
* This is an anonymous method that does not commit anything to database.
* @param event Calendar event to recalculate.
* @param start Start of the period for which the events are fetched and occurences are calculated.
* If null, period is set 1 year before today. Max history/future 3 years. Max period 24 months.
* @param end End of the period for which the occurences are calculated.
* @returns A Promise with result data: The calendar event with occurenceInfo recalculated.
*/
recalculate(event: CalendarEvent, start?: DatelyObject | null, end?: DatelyObject | null): Promise;
}
/**
* Controller for implementing Calendars that contain CalendarEvents (iCalendar).
*/
export declare class CalendarEventsCrudController extends ApiCrudObjectController {
private fullApi;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
endMinDate: string;
_tabOptions: any[];
/**
* Creates a new WorkflowController
* @ignore
*/
constructor(fullApi: CalendarEvents, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any);
/**
* Controller initialization
*/
$onInit(): void;
/** Dynamic tabs */
get tabOptions(): any[];
/** Implements the getDefaults of ApiCrudObjectController */
getDefaults(): {
listUrl: string;
detailsUrl: string;
oDataTemplateUrl: string;
oDataOptions: {};
};
/** Adds a new recurrence rule to the event */
addRecurrenceRule(): void;
/** Adds a new action to the event */
addAction(): void;
/**
* Deletes an item in the recurrence rules
* @param index The index number of the item to delete.
*/
deleteRecurrence(index: number): void;
/**
* Deletes an item in the actions
* @param index The index number of the item to delete.
*/
deleteAction(index: number): void;
/**
* Saves the calendar item.
* Override done so that durations (timespans) are converted from number to string.
*/
save(): Promise;
/** Gets the event duration, even if it is null (start and end defined). */
getEventDuration(): string | null;
/** Assures that the durations are strings, not numbers. The UI binding makes them numbers. */
checkDurations(): void;
}
/** CalendarEventStatus enumeration */
declare enum CalendarEventStatus {
Undefined = "undefined",
Cancelled = "cancelled",
Confirmed = "confirmed",
Tentative = "tentative",
NeedsAction = "needsAction",
Completed = "completed",
InProcess = "inProcess"
}
/** Helper component for calendar related user interfaces: Dates and Times formatting etc. */
export declare class CalendarHelper {
private $sce;
/** Periods / date ranges plotted on the chart. */
calendarPeriods: CalendarSeries[];
constructor($sce: angular.ISCEService);
/**
* Gets a HTML formatted version of the description.
* @param description Description text to format
*/
formatDescription(description: any): any;
}
/** Month in a calendar. */
declare interface CalendarMonth {
/** Month as 1-12 */
month: number;
/** Year for the month */
year: number;
/** Short text (3-6 letters) of the month (tammi,helmi,maalis,...) */
title: string;
/** Weekday of the first day 1-7 (mon-sun) */
firstDayDayOfWeek: any;
/** Number of days in the month */
daysInMonth: any;
/** Days in the month */
days: CalendarDay[];
}
/** Occurence of a calendar event */
declare interface CalendarOccurence {
/** Identifier of the event that produces this occurence */
eventId?: string | null;
/** Summary text for occurence. Max 255 characters. */
summary?: string | null;
/** Categorization of the event */
categories?: string[] | null;
/** Indicates that the time of the recurrence is irrelevant: Just display the date.
NOTE that in Occurences, when IsAllDay=true, the End is the date when occurence ends (typically same as Start), not the next day as in VEVENT. */
isAllDay?: boolean | null;
/** If true, the occurence is based on a recurrence rule. */
isRecurring?: boolean | null;
/** The start date/time of the event as ISO 8601 Date ("yyyy-MM-dd") or DateTime ("s"/"yyyy-MM-ddThh:mm:ss") without timezone.
Value should be Date when IsAllDay is true and DateTime, when it is false. */
start?: string | null;
/** The end date/time of the event as ISO 8601 Date ("yyyy-MM-dd") or DateTime ("s"/"yyyy-MM-ddThh:mm:ss") without timezone.
Value should be Date when IsAllDay is true and DateTime, when it is false. */
end?: string | null;
/** The duration of the event. */
duration?: string | null;
/** Collection of action occurences for this event occurence. */
actions?: CalendarActionOccurence[] | null;
}
/** Represents a single series shown in the calendar. */
declare interface CalendarSeries {
/** String key for the series. */
key: string;
/** Title that is shown for the series. */
title?: string;
/** Longer text together below the text */
description?: string;
/** Potential avatar visualization for the series. */
avatar?: Avatar_2;
/** Events: The data for the series */
events: CalendarUiEvent[];
/** Case specific data for dialog editing etc. */
data?: any;
}
/**
* An event in the calendar with User Interface data (icon, color etc.).
* Compatible with CalendarVEvent for base data (start, end, summary, description).
* If the end day is NOT specified OR if icon IS specified, an icon is displayed.
* If the end day IS specified AND icon is NOT specified, the event is shown as period,
* potentially spanning over several days (may also be just one day).
*/
declare interface CalendarUiEvent {
/** Start date for an event. Required for any event. */
start: string;
/**
* End date for period. NOTE: For single-day event markers (icon), set this null.
* For single-day periods (period color, no icon), set this the same as start day.
*/
end?: string;
/** Summary title for the event. */
summary?: string;
/** Description for the period. */
description?: string;
/**
* For single-day events (end day null), you can specify a Font-awesome version 4.7 icon (https://fontawesome.com/v4.7.0/icons/).
* Default is "fa-circle".
*/
icon?: string;
/**
* Specify a CSS class to the icon or period background.
* For single day icons, good choices are: text-muted, text-primary, text-success, text-info, text-warning, text-danger.
* For periods, good choices are: salaxy-cal-event-primary, [...]-success, [...]-info, [...]-warning, [...]-danger etc.
*/
cssClass?: string;
/** Case specific data for dialog editing etc. */
data?: any;
}
/** Stores the calendar even data that is compatible with RFC 5545 VEVENT component. */
declare interface CalendarVEvent {
/** Unique identifier: This is the ID of the parent. */
uid?: string | null;
/** Timestamp for the item: This may be important for processing of items to some calendar items, hence stored separately from other dates. */
timeStamp?: string | null;
/** The start date/time of the event.
NOTE, unlike in iCalendar, in our model Start is always required and then either End or Duration is used to determine the duration. */
start?: string | null;
/** The end date/time of the event.
Note that if Duration is set, it will override this property whenever saved or recalculated. */
end?: string | null;
/** The duration of the event.
Note that if set to something else than null / zero, this property will always override the End date/datetime. */
duration?: string | null;
/** Returns true if the event is an all-day event: Start and End are dates ("yyyy-MM-dd"), not date-times ("yyyy-MM-ddThh:mm:ss"). */
isAllDay?: boolean | null;
/** The event status as defined in https://tools.ietf.org/html/rfc5545#section-3.8.1.11
or in Salaxy process. Other statuses default to undefined. */
status?: CalendarEventStatus | null;
/** Short, one-line summary: Text that is typically shown in calendar views. */
summary?: string | null;
/** Categorization of the event */
categories?: string[] | null;
/** The attendees for the event. */
attendees?: CalendarAttendee[] | null;
/** The Alarms (notifications) and other Actions (scripts) related to the event. */
actions?: CalendarAction[] | null;
/** Priority is specified as an integer in the range 0 to 9.
A value of 0 specifies an undefined priority.
A value of 1 is the highest priority, 1-4=HIGH, 5=MEDIUM/Normal and 6-9=LOW.
Negative values may be used by admin functions (not through API) to set priority overrides. */
priority?: number | null;
/** The full description text. */
description?: string | null;
/** Attachments for calendar events. */
attachments?: CalendarAttachment[] | null;
/** The recurrence rules as specified in iCalendar: https://tools.ietf.org/html/rfc5545#section-3.3.10 and https://tools.ietf.org/html/rfc5545#section-3.8.5.3
E.g. "FREQ=DAILY;INTERVAL=10;COUNT=5" */
recurrenceRules?: string[] | null;
/** Constant recurrence dates specified by RDATE in iCalendar */
recurrenceDates?: string[] | null;
/** Exception dates specified by EXDATE in iCalendar */
exceptionDates?: string[] | null;
/** When imported from external system, this contains the original Uid. Null for items created by Salaxy. */
originalUid?: string | null;
}
/** Car benefit Mandatory data group, if the income type is "Car benefit". This data group may not be used with other income types. */
declare interface CarBenefit {
/** Car benefit type */
carBenefitCode?: CarBenefitCode | null;
/** Car age group */
ageGroupCode?: AgeGroupCode | null;
/** Odometer reading
The value must be greater than or equal to 0 */
kilometers?: number | null;
/** Car emissions value
The car emissions value must be greater than or equal to 0, and smaller than or
equal to 100. The car emissions value can only be reported if the payment date
or other reporting date is in 2022–2025. */
emissionsValue?: number | null;
}
/** CarBenefitCode enumeration */
declare enum CarBenefitCode {
LimitedCarBenefit = "limitedCarBenefit",
FullCarBenefit = "fullCarBenefit"
}
/** User certificate. */
declare interface Certificate {
/** Certificate thumbprint. */
thumbprint?: string | null;
/** Certificate bytes Used in returning the certificate to the user as PFX or ZIP.
Not persisted. */
bytes?: string | null;
/** End user description for the certificate. */
title?: string | null;
/** Password for issuing a new certificate. Not persisted.
Also used for passing the CSR in request if it is passed as Base64 encoded text. Not persisted. */
password?: string | null;
/** Identifier of the object. */
id?: string | null;
/** The date when the object was created. */
createdAt?: string | null;
/** The time when the object was last updated.
Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */
updatedAt?: string | null;
/** Owner ID for this data */
owner?: string | null;
/** Indication that for the currently logged-in account, the data is generally read-only. */
isReadOnly?: boolean | null;
/** Primary partner information. Automatically updated from the storage container Partner. */
partner?: string | null;
}
/** Certificate controller for listing certificate, revoking and requesting a new certificate. */
export declare class CertificateController extends CrudControllerBase {
private certificateService;
private certificateApi;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
constructor(certificateService: CertificateService, $location: angular.ILocationService, $attrs: angular.IAttributes, uiHelpers: UiHelpers, certificateApi: Certificates_2);
/** Creates a new certificate */
createNew(): Certificate;
result: {
/** Certificate file as blob. */
blob: Blob;
/** Certificate file as text. */
text: string;
/** Certificate thumbprint. */
thumbprint: string;
};
/** Certificate format (id) */
certFormat: "pfx" | "pem";
/** Returns the metadata for the certFrmat */
get currentCertFormat(): InputEnumOption;
/** Avilabe certificate formats */
certFormats: InputEnumOption[];
/**
* Shows a dialog for adding nw certificate.
*/
showCertificateAddDialog(): void;
/** Creates a new certificate */
createCert(): void;
/**
* Downloads current.blob as pfx and sets current.id as name
*/
downloadCertFile(): void;
}
/**
* Plain CRUD controller for Certificates.
*/
export declare class CertificateCrudController extends ApiCrudObjectController {
private fullApi;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
constructor(fullApi: Certificates_2, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any);
/**
* Implement IController
*/
$onInit(): void;
/** Implements the getDefaults of ApiCrudObjectController */
getDefaults(): {
listUrl: string;
detailsUrl: string;
oDataTemplateUrl: string;
oDataOptions: {};
};
}
/**
* Shows a list of all certificates which has been generated for this account.
* @example
* ```html
*
* ```
*/
export declare class Certificates extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/**
* Header is mainly meant for buttons (Usually at least "Add new").
* These are positioned to the right side of the table header (thead).
*/
onListSelect: string;
onDelete: string;
onCreateNew: string;
detailsUrl: string;
listUrl: string;
};
/**
* Header is mainly meant for buttons (Usually at least "Add new").
* These are positioned to the right side of the table header (thead).
*/
transclude: {
header: string;
};
/** Uses the CertificateController */
controller: typeof CertificateController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Provides CRUD access for authenticated user to access a his/her own Certificates
*/
declare class Certificates_2 extends CrudApiBase {
/**
* For NG1-dependency injection
* @ignore
*/
static $inject: string[];
/** Base URL for details etc. */
protected baseUrl: string;
constructor(ajax: Ajax);
/**
* Returns an empty certificate without any values.
*/
getBlank(): Certificate;
/**
* Issues a new certificate for the account
* @param certificate The certificate to issue
* @param options Optional parameters for the issue operation
* @returns A Promise containing the issued certificate
*/
issueSertificate(certificate: Certificate, options?: any): Promise;
/**
* Issues a new certificate for the account and provides the certificate in PEM format.
* For this method, also the Certificate Signing Request (CSR) may be passed in the certificate Text field.
* @param certificate A certificate object containing title for the new certificate.
* You may also pass the Certificate Signing Request (CSR) in the Password field. In this case the private key is not returned by the method.
* @returns PEM files in zip: crt (public key / certificate), key (private key) and (both in one pem file).
*/
issuePemCertificate(certificate: Certificate): Promise;
/**
* Gets all certificates from the API.
* @returns A Promise that resolves to an array of Certificate objects.
*/
getAll(): Promise;
/**
* OData query is not supported for certificates.
* @param _query OData query parameters (not used)
* @throws Error indicating operation is not supported
*/
getOData(_query: any): any;
/**
* Getting a single certificate is not supported.
* @param _id Identifier of the certificate (not used)
* @throws Error indicating operation is not supported
*/
getSingle(_id: any): any;
}
/**
* CRUD functionality for the Payroll objects and functionality for payroll in general.
*/
export declare class CertificateService extends BaseService {
private certificateApi;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/**
* String that identifies the service event (onChange/notify).
* Must be unique for the service class.
*/
protected eventPrefix: string;
constructor($rootScope: angular_2.IRootScopeService, sessionService: SessionService, certificateApi: Certificates_2);
}
/**
* Controller rendering chart by provided config
* Config type example: config: ChartConfiguration<"pie" | "bar", { labels: string[]; datasets: any[] }, any>
* Config follows official chart.js ChartConfiguration interface
* @example
* ```html
*
* ```
*/
declare class Chart_2 extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/** Config of chart */
config: string;
/** Custom height of chart */
customHeight: string;
/** Custom height of chart */
customWidth: string;
/** Custom height of chart */
customClass: string;
};
/** Uses the ChartController */
controller: typeof ChartController;
/** The default template for the component. */
defaultTemplate: string;
}
export { Chart_2 as Chart }
/**
Controller rendering chart by provided config
*/
export declare class ChartController implements angular_2.IController {
private $element;
private $timeout;
private $scope;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** Configuration of chart */
config: ChartConfiguration;
private chart;
/** Custom height of chart */
customHeight: string;
/** Custom width of chart */
customWidth: string;
/** Custom class of chart */
customClass: string;
constructor($element: JQLite, $timeout: angular_2.ITimeoutService, $scope: angular_2.IScope);
/**
* Implement IController
*/
init(): void;
/** Creates chart based on data and options to canvas or updates chart if it already exists */
createChart(): void;
/**
* Updates provided current chart
* "none" parameters means no animation for update
*/
updateChart(): void;
}
/** A company account - note that this can also be an association etc. - something that has a Company ID. */
declare interface CompanyAccount {
/** Information about the verification of the account.
NOTE that this object may not be present in many method calls - this is because it contains confidential information. */
identity?: Identity | null;
/** High level company type */
companyType?: CompanyType | null;
/** Entity type of the account.
Type PersonCreatedByEmployer means that the Worker has not yet signed into the system and there may be multiple instances of the same logical person (Official ID) - one for each employer. */
entityType?: LegalEntityType | null;
/** If true the object Account is and Employer account - it has the EmployerInfo object */
isEmployer?: boolean | null;
/** If true the object Account is and Worker account - it has the WorkerInfo object */
isWorker?: boolean | null;
/** If true, the account has been verified. Typically this means a digitally signed contract.
This means that the account also has an Identity object.
However, as the Identity object contains confidential information, it is not necessarily present in all method calls. */
isVerified?: boolean | null;
/** Avatar is the visual representation of the Account. */
avatar?: Avatar_2 | null;
/** Contact information for the Account. */
contact?: Contact | null;
/** Language of the person/company. */
language?: Language | null;
/** Service model for the account. */
serviceModelId?: string | null;
/** Workflow data, which is exposed to API. */
workflowData?: WorkflowData | null;
/** Identifier of the object. */
id?: string | null;
/** The date when the object was created. */
createdAt?: string | null;
/** The time when the object was last updated.
Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */
updatedAt?: string | null;
/** Owner ID for this data */
owner?: string | null;
/** Indication that for the currently logged-in account, the data is generally read-only. */
isReadOnly?: boolean | null;
/** Primary partner information. Automatically updated from the storage container Partner. */
partner?: string | null;
}
/** Company account controller for editing basic information. */
export declare class CompanyAccountController implements angular_2.IComponentController {
private accounts;
private sessionService;
private ajax;
private uiHelpers;
private uploadService;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** Current company account */
current: CompanyAccount;
/** Constructor for dependency injection */
constructor(accounts: Accounts, sessionService: SessionService, ajax: Ajax, uiHelpers: UiHelpers, uploadService: UploadService);
/**
* Implement IController
*/
$onInit(): void;
/** Gets the language of the current company */
getAccountLanguage(): Language | null | undefined;
/** Updates the company */
saveCurrent(): Promise;
/**
* Uploads avatar image file to the server.
* @param avatar - selected file
*/
uploadAvatarImage(avatar: any, current?: CompanyAccount): void;
/** Called when avatar changes */
emailForAvatarChanged(current?: CompanyAccount): void;
/** Called when avatar changes */
typeForAvatarChanged(current?: CompanyAccount): void;
/**
* Adds/updates the workflow event for the current using API.
* @param wfEvent - Workflow event to add/update.
* @returns - Reloaded item.
*/
saveWorkflowEvent(wfEvent: WorkflowEvent): Promise;
/**
* Deletes the given event or all events with given type using API.
* @param wfIdOrType Id or type of the workflow event.
* @returns - Reloaded item.
*/
deleteWorkflowEvent(wfIdOrType: string): Promise;
/**
* Gets a single workflow event for the item.
* @param wfId Id the workflow event.
* @returns - Workflow event.
*/
getWorkflowEvent(wfId: string): Promise;
/**
* Opens modal for avatar edit
*/
openEditDialog(editType: "avatar" | "contactInfo"): void;
}
/** Provides the settings for a Company Employer account (all settings details for employer). */
declare interface CompanyAccountSettings {
/** Salary calculation related settings. */
calc?: CalculationSettings | null;
/** Reporting and layout related settings. */
reporting?: ReportingSettings | null;
/** Primary partner, service model and pricing. */
partner?: PrimaryPartnerSettings | null;
/** Defines how accounting is done and to which target it is exported / sent. */
accounting?: AccountingSettings_2 | null;
/** Cost accounting settings, e.g. cost centers and projects. */
costAccounting?: CostAccountingSettings_2 | null;
/** Holiday settings for accruals and holiday pay calculations. */
holiday?: HolidaySettings_2 | null;
/** Settings related to making of the payments. */
payments?: PaymentSettings_2 | null;
/** Custom usecases. */
usecase?: UsecaseSettings | null;
/** Settings related to messaging. */
messaging?: MessagingSettings | null;
/** Settings related to the calculation data delivery by forms. */
forms?: FormsSettings | null;
/** Settings related to pay statistics calculations. */
payStats?: PayStatsSettings_2 | null;
/** Customer specific business configurations. */
configs?: BizConfig[] | null;
/** Customer specific preferences. */
preferences?: Preference[] | null;
/** Identifier of the object. */
id?: string | null;
/** The date when the object was created. */
createdAt?: string | null;
/** The time when the object was last updated.
Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */
updatedAt?: string | null;
/** Owner ID for this data */
owner?: string | null;
/** Indication that for the currently logged-in account, the data is generally read-only. */
isReadOnly?: boolean | null;
}
/**
* User interface for worker mass loading.
* @example
* ```html
*
* ```
*/
export declare class CompanyImport extends DataImportComponentBase {
/** Uses the CompanyImportController */
controller: typeof CompanyImportController;
}
/** API company import object. The API uses this object for mass operations for creating or assuring the customer companies in the system. */
declare interface CompanyImport_2 {
/** Company number in the the trade register (Y-tunnus).
Format is "1234567-8" - 7 numbers, one control character, with or without the dash.
Also, the international VAT format is allowed: FI12345678
This field is optional and defaults to the company number of the current account. */
officialId?: string | null;
/** Additional parameters for import. Defaults to string. */
parameters?: {
[key: string]: any;
} | null;
/** Item for import. */
item?: AssureCompanyAccountRequest | null;
/** Validation for the import */
validation?: ApiValidation | null;
/** Result object of the import. */
result?: ApiImportResultOfPartnerCompanyAccountInfo | null;
}
/**
* Controller for company imports.
*/
export declare class CompanyImportController extends DataImportControllerBase {
private importsApi;
private uiHelpers;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
private dataEnricher;
/**
* Creates a new WorkerImportController
* @ignore
*/
constructor(importsApi: Imports, jsonSchemaService: JsonSchemaService, $timeout: angular_2.ITimeoutService, uiHelpers: UiHelpers);
/**
* Implement IController
*/
$onInit(): Promise;
/** Enrichs data */
getDataEnrichers(): Array<{
enrich: () => void;
buttonLabel: string;
}>;
/** Import data */
import(): Promise;
/** Help */
help(): Promise;
protected getImportMapper(): Promise>;
private enrichEInvoiceAddresses;
}
/**
* Type for a single company import row.
*/
declare interface CompanyImportRow extends AssureCompanyAccountRequest, DataRow {
/** Receiver's address for the e-invoice. */
eInvoiceReceiver?: string | null;
/** Receiver's operator for the e-invoice. */
eInvoiceIntermediator?: string | null;
}
/** Represents the input for creating a company account. */
declare interface CompanyInput {
/** If true, creates a company account based on company data. */
doCreate?: boolean | null;
/** Official name of the company */
name: string;
/** URL to a Logo picture (preferably PNG). This logo should be a square - icon type of logo for avatar. */
logo?: string | null;
/** The Business ID (Y-tunnus / Business Identity Code) is a code given to businesses and organizations by the PRH or the Tax Administration.
It consists of seven digits, a dash and a control mark, for example 1234567-8.
Alternative accepted formats incule international VAT number "FI12345678" or number without the dash: "12345678". */
businessId: string;
/** This is an official name of the actor.
It originates from the YTJ or Bank authentication. */
officialName?: string | null;
/** If an object with the given BusinessID exists, it is resolved here: The unique ID is set here by the onboarding service. This field cannot be set. */
resolvedId?: string | null;
/** Identifier at the partner site - typically an organization ID. */
partnerAccountId?: string | null;
/** Company ownership for KYC */
ownership?: Ownership | null;
/** If true, will fetch the data from the Finnish Business Infromation System (YTJ/BIS).
Fetching is done firstly based on Business ID, if that is not valid then based on name. */
doYtjUpdate?: boolean | null;
/** The details of company data as provided by the Finnish Business Infromation System (YTJ/BIS) */
ytjDetails?: YtjCompany | null;
/** A search to Finnish Business Infromation System (YTJ/BIS). This search is triggered if you set the RawInput field. */
ytjSearch?: YtjSearchResult | null;
/** The legal type of the company, as categorized by Palkkaus / used in generating IBAN numbers. */
companyType: CompanyType;
/** Contact information for the company */
contact?: Contact | null;
/** List of roles which this account is member of. */
roles?: Role[] | null;
/** Language of the company. */
language?: Language | null;
}
/**
* Shows the invoice processing ui for companies.
* @example
* ```html
*
* ```
*/
export declare class CompanyInvoices extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/**
* channel for the invocie processing. Default is PalkkausInvoices.
*/
channel: string;
};
/** Uses the InvoiceCrudController */
controller: typeof CompanyInvoicesController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Extends the InvoiceCrudController to provide
* company invoices handling functionality.
*/
export declare class CompanyInvoicesController extends InvoiceCrudController {
private companyAjax;
private session;
private $http;
private $timeout;
private $sce;
/**
* For NG-dependency injection
*/
static $inject: string[];
/** Default channel for payments */
channel: PaymentChannel;
/** Month for invoices query */
private queryMonth;
/** Queries for lists: Groups statuses to logical groups. */
queryOptions: InputEnumOption[];
queryDateFilterOptions: InputEnumOption[];
/** The current query */
queryOption: InputEnumOption;
dateFilterQueryOption: InputEnumOption;
private qrCodesCache;
constructor(invoicesApi: Invoices, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any, invoiceService: InvoicesService, companyAjax: Ajax, session: SessionService, $http: angular_2.IHttpService, $timeout: angular_2.ITimeoutService, $sce: angular_2.ISCEService);
/** Intitializes the controller */
$onInit(): void;
/** For list components, gets the OData query options. */
getListOptions(): any;
/**
* Sets the date filter query option.
* @param option - The input enum option.
*/
setDateFilterQueryOption(option: InputEnumOption): void;
/** Refreshes query */
doQuery(): void;
/** Dropdown options for marking invoice as paid */
getMarkAsPaidOptions(items: InvoiceListItem[]): InputEnumOption[];
/**
* Selects invoices of a specific type and marks them as selected.
* @param action - The type of invoices to select.
*/
selectInvoicesByType(action: InvoiceType | "all" | "removeAll"): void;
/**
* Determines whether to show the "Mark as Paid" button for a given invoice.
* @param invoice - The invoice to check.
* @returns A boolean indicating whether to show the button.
*/
showMarkAsPaidButton(invoice: InvoiceListItem): boolean;
/**
* Determines whether to show the "Mark as Canceled" button for a given invoice.
* @param invoice - The invoice to check.
* @returns A boolean indicating whether to show the button.
*/
showMarkAsCanceledButton(invoice: InvoiceListItem): boolean;
/**
* Determines whether to show the IR cancel information text for a given invoice.
* @param invoice - The invoice item to check.
* @returns `true` if the invoice entity type is `Net` and the status is `Paid`, otherwise `false`.
*/
showIrCancelInfoText(invoice: InvoiceListItem): boolean;
/**
* Shows a dialog for a single invoice.
* @param item Invoice item.
*/
showInvoiceDialog(item: InvoiceListItem): void;
/**
* Marks selected invoices as paid.
* This method filters the selected invoices to exclude those that are already paid or canceled.
* It then shows a loading indicator and processes each invoice by marking it as paid.
* After processing all invoices, it refreshes the periodic invoices and dismisses the loading indicator.
* @returns A promise that resolves when the operation is complete.
*/
markInvoicesAsPaid(): Promise;
/** Update status of single invoice. */
updateInvoiceStatus(item: InvoiceListItem, status: InvoiceStatus): void;
/** Data reader for one item. */
getInvoiceReader: (item: InvoiceListItem, status: InvoiceStatus, updatePeriodicInvoices?: boolean) => {
/** Function to read data into given array */
read: (arr: Invoice[], message: string) => Promise;
getSepaData: (_arr: Invoice[]) => Promise;
getFinvoiceData: (_arr: Invoice[]) => Promise;
getPdfData: (_arr: Invoice[]) => Promise;
/** Optional label for data export */
exportLabel: null;
/** Indicates if the export is not possible */
disabled: () => boolean;
};
/**
* Returns PDF url for a single invoice.
* @param item Invoice list item.
*/
getPdfUrl(item: InvoiceListItem): string;
/**
* Retrieves the QR code for the specified invoice item.
* If the QR code is not already cached, it generates the QR code and caches it for future use.
* @param item - The invoice item for which to retrieve the QR code.
* @returns The QR code string.
*/
getQrCode(item: InvoiceListItem): string;
/**
* Calculates barcode value for the invoice item.
* @param item Invoice list item.
*/
getBarcodeValue(item: InvoiceListItem): string;
/**
* Calculates the invoice payment amount for a given invoice item.
* If the invoice item is of type "tax" or "union" and the total paid amount
* is different from the payment amount, it returns the rounded difference
* between the payment amount and the total paid amount.
* Otherwise, it returns the payment amount.
* @param {InvoiceListItem} item - The invoice item to calculate the payment for.
* @returns {number} - The calculated payment amount.
*/
getInvoicePayment(item: InvoiceListItem): number;
/**
* Retrieves the barcode for the invoice recipient's IBAN.
* If the IBAN does not start with "fi" or is not provided, an empty string is returned.
* The barcode is generated using the Barcodes.createBarcode function.
* @returns The barcode as a string, wrapped in an HTML trust object.
*/
getBarcode(item: InvoiceListItem): string;
/**
* Copies the barcode to clipboard.
* @param item Invoice list item.
*/
copyBarcode(item: InvoiceListItem): void;
/**
* Displays the PDF for the given invoice items.
* @param items - The list of invoice items.
*/
showloadPfd(items: InvoiceListItem[]): void;
/**
* Generates a URL for the calculation details of an invoice item.
* @param item - The invoice item for which to generate the URL.
* @returns A string representing the URL for the calculation details.
*/
calculationHref(item: InvoiceListItem): string;
private getEprWarning;
/** Checks if the Epr report is delayed. */
private isDelayed;
private getInvoice;
private generateQrCodeSvgForInvoice;
private handlePdfRequest;
private fetchPdf;
private refreshPeriodicInvoices;
}
/**
* Wizard for creating a new Palkkaus.fi-account for a company.
*/
export declare class CompanyOnboardingController extends WizardController {
private onboardingService;
private sessionService;
private ajax;
private $location;
private uiHelpers;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/**
* Field to expose forms validity state.
*/
formDataValidity: boolean;
/** If true, step is proceeding */
isStepProceeding: boolean;
constructor($scope: angular_2.IScope, wizardService: WizardService, onboardingService: OnboardingService, sessionService: SessionService, ajax: Ajax, $location: angular_2.ILocationService, data: any, uiHelpers: UiHelpers);
/**
* Implement IController
*/
$onInit(): void;
/** Company wizard configuration */
getWizardSteps(): WizardStep[];
/**
* Navigates to the next step if possible and saves the data.
*/
goNext(): Promise;
/** Returns true if user can go forward in wizard */
get canGoNext(): boolean;
/**
* Navigates to the previous step if possible and saves the data.
*/
goPrevious(): void;
/**
* Saves the data to server
*/
save(): Promise;
/**
* Returns signing url.
*/
get vismaSignUrl(): string;
/**
* The onboarding model is provided by the onboarding service.
*/
get model(): Onboarding;
/** IF true, the Suomi.fi company selection is used. */
get showCompanySelection(): boolean;
/** Returns the PDF preview address for the authorization pdf. */
getPdfPreviewAddress(): string;
/**
* Existing company alert.
*/
get existingCompanyAlert(): boolean;
/** Go to suomi fi ypa */
goToSuomifi(): void;
/**
* Launches the wizard.
* @param id Optional onboarding id.
*/
launch(id?: string): Promise;
/**
* Sets the company's business id, clears the YTJ search results fetches other company info's via YTJ search and saves
* @param businessId The business id that is set as the company's business id
*/
chooseBusinessId(businessId: any): void;
/**
* Sets the DoYtjUpdate flag to true and saves.
* @param searchType - If true, sets the business ID to null
* Use this option to force a YTJ name search, even if there already is something written in business ID field.
*/
searchYtj(searchType?: "businessId" | "name"): void;
/**
* Returns validation error for key if exists.
* @param key - Validation error key.
*/
getValidationError(key: string): ApiValidationError;
/** Opens wizard as modal dialog */
openSigningWizardDialog(onBoardingId?: null): Promise;
/** Launches company wizard. */
launchSigningWizard(): Promise;
/** Reloads the current session*/
checkSession(): Promise;
private readTokenFromUrl;
}
/**
* Controller for the accountant settings.
*/
export declare class CompanySettingsController implements angular_2.IController {
private sessionService;
private settingsService;
private uiHelpers;
private ajax;
private $sce;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** If true, current item is read only */
isReadOnlyForced: boolean;
/** Possibility to restrict sections that are visible in settings. */
sections: SettingsSection[];
/** Yearly sidecosts */
sideCosts: YearlySideCosts | null | undefined;
/** The current editable settings */
private _current;
private _irCertificate;
private _openAiKey;
private saves;
constructor(sessionService: SessionService, settingsService: SettingsService, uiHelpers: UiHelpers, ajax: Ajax, $sce: angular_2.ISCEService);
/**
* Initializes the controller
*/
$onInit(): void;
/** Copy current from SettingsService */
get current(): CompanyAccountSettings;
/** Returns current pension contracts once loaded assuring there is at least one active item. */
get pensionContracts(): PensionContract[] | null;
/** Returns current insurance contracts once loaded assuring there is at least one active item. */
get insuranceContracts(): InsuranceContract[] | null;
/**
* Returns current default accounting target.
*/
get defaultAccountingTarget(): AccountingTargetSettings_2;
/**
* Returns true, if the contract should be visible:
* Companies: All pending contracts and first active contract.
* Personal: The first active contract, no pending contracts.
* @param contract Contract to evaluate
* @param allContracts Collection of contracts that contain the contract to evaluate.
*/
isVisibleContract(contract: ContractType, allContracts: ContractType[]): boolean;
/** Gets the relevant contracts that are shown in personal (household) userinterface. */
get personal(): {
insurance: InsuranceContract;
pension: PensionContract;
};
/** Returns OPEN AI Key */
get openAiKey(): string;
/** Sets OPEN AI Key */
set openAiKey(value: string);
/** Saves open AI Key */
saveOpenAiKey(): void;
/**
* Saves changes for settings
* @param section Section to save: Copies only that section to settingsService.
* Null saves nothing.
*/
save(section: SettingsSection | "all" | null): void;
/**
* Creates a new IR certificate.
* @param transferId Transfer ID for the IR certificate.
* @param transferPassword One time transfer password for the IR certificate.
* @returns Information about the created IR certificate.
*/
createIrCertificate(transferId: string, transferPassword: string): Promise;
/**
* Renews an existing IR certificate.
* @returns Information about the created IR certificate.
*/
renewIrCertificate(): Promise;
/** Returns true if the account has chosen to use own certificate */
hasOwnIrCertificate(): boolean;
/** Current IR certificate */
get irCertificate(): any;
/**
* Send all workers paid calculations to omapalkka
*/
sendPaidCalculationsToOmapalkka(): void;
/** Checks if switch input should be disabled on salarySlipDeliveryMethodsForm*/
disableSwitchInput(): boolean;
/**
* Sets pension number for test account to the given contract
* @param item Pension contract
*/
setPensionNumberForTest(item: PensionContract): void;
/**
* Shows the eInvoice selection dialog
*/
selectEInvoiceAddress(): void;
/**
* Gets the progress of save operation.
* @param section Section to check for saving.
* Note that "all" will check only "all" operations, not underlying sub-sections saving ("any").
*/
isSaving(section: SettingsSection | "all"): boolean;
/**
* Event handler for accounting target selection.
* @param current Settings object to edit/create.
* @param logic Logic object passed to the dialog controller.
* @param logic.isReadOnly Read-only flag in logic.
* @param value Boolean indicating if the item is selected or not.
* @param item The selected item.
* @param allItems All selected items.
*/
onAccountingTargetSelect(current: AccountingTargetSettings_2, logic: {
isReadOnly: boolean;
}, value: boolean, item: AccountingTargetListItem, allItems: AccountingTargetListItem[]): void;
/**
* Event handler for usecase selection.
* @param current Settings object to edit/create.
* @param logic Logic object passed to the dialog controller.
* @param logic.isReadOnly Read-only flag in logic.
* @param value Boolean indicating if the item is selected or not.
* @param item The selected item.
* @param allItems All selected items.
*/
onUsecaseSelect(current: Usecase, logic: {
isReadOnly: boolean;
}, value: boolean, item: UsecaseListItem, allItems: UsecaseListItem[]): void;
/**
* Return Avatar from current.payment.channels ENUM
* @returns Avatar
*/
getPaymentChannelAvatar(item: any): Avatar_2 | undefined;
/**
* Created InputEnumOption [] from current.accounting.targets
* @returns InputEnumOption [] for template
*/
getSelectableAccountingTargets(): InputEnumOption[];
/**
* Created InputEnumOption [] from current.payment.channels
* @returns InputEnumOption [] for template
*/
getSelectablePaymenMethods(): InputEnumOption[];
/**
* Returns true if the payslip is included in worker's SalarySlipDeliveryMethods.
*/
get payslip(): boolean;
/**
* Sets/unsets the payslip as one of worker's SalarySlipDeliveryMethods.
* @param value Boolean value if the payslip should be set.
*/
set payslip(value: boolean);
/**
* Returns true if the omapalkka is included in worker's SalarySlipDeliveryMethods.
*/
get omapalkka(): boolean;
/**
* Sets/unsets the omapalkka as one of worker's SalarySlipDeliveryMethods.
* @param value Boolean value if the payslip should be set.
*/
set omapalkka(value: boolean);
/**
* Confirm service change
*/
confirmServiceModelChange(): void;
/**
* Creates datauri for given image
* @param logo Logo for dataurl
*/
createReportLogoDatauri(logo: any): void;
/**
* Retrieves the report logo.
* @returns The report logo as a html string.
*/
getReportLogo(): string;
private static getActive;
}
/** CompanyType enumeration */
declare enum CompanyType {
Unknown = "unknown",
FiOy = "fiOy",
FiTm = "fiTm",
FiRy = "fiRy",
FiYy = "fiYy"
}
/** Abstract Base class for salaxy components */
export declare abstract class ComponentBase implements angular_2.IComponentOptions {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
abstract bindings: any;
/**
* Controller has the actual implementation of the component.
* Same Controller may be reused between different components with different views and binding.
*/
abstract controller: any;
/** The default template for the component. */
abstract defaultTemplate: any;
/**
* Set the template-url attribute to specify your custom template.
* @ignore
*/
templateUrl: (string | (($element: JQLite, $attrs: angular_2.IAttributes) => any))[];
}
/**
* Provides the method for registering components to the module.
*/
export declare class ComponentsRegistration {
/** Gets the components for Module registration. */
static getComponents(): {
salaxyAccountInfo: any;
salaxyAssurePartner: any;
salaxyAuthCard: any;
salaxyAuthorizedAccounts: any;
salaxyAuthorizingAccounts: any;
salaxyCertificates: any;
salaxyCredentials: any;
salaxyLanguageSelector: any;
salaxyLoginButton: any;
salaxySigning: any;
salaxyUserInfo: any;
salaxyAccountAvatarEdit: any;
salaxyAccountContactEdit: any;
salaxyAccountAuthorizationPerson: any;
salaxyAccountAvatarEditPerson: any;
salaxyAccountContactEditPerson: any;
salaxyAccountDetailsEditPerson: any;
salaxyAccountDetailsPerson: any;
salaxyAccountInfoPerson: any;
salaxyAccountInsuranceEditPerson: any;
salaxyEmployerList: any;
salaxyEmployerSelect: any;
salaxyCalcEmployment: any;
salaxyCalcHouseholdUsecase: any;
salaxyCalcIrRows: any;
salaxyCalcsIrRows: any;
salaxyCalcList: any;
salaxyCalcWorktime: any;
salaxyCalc: any;
salaxyCalcChart: any;
salaxyCalcDashboard: any;
salaxyCalcEditor: any;
salaxyCalcNewIntro: any;
salaxyCalcRepair: any;
salaxyCalcRepairInfo: any;
salaxyCalcReport: any;
salaxyCalcReports: any;
salaxyCalcResults: any;
salaxyCalcRowType: any;
salaxyCalcRowsEditor: any;
salaxyCalcRows2019Editor: any;
salaxyCalcRowFormula: any;
salaxyCalcUsecase: any;
salaxyPayrollDetails: any;
salaxyPayrollDetailsList: any;
salaxyPayrollDetailsSelectList: any;
salaxyPayrollEdit: any;
salaxyPayrollList: any;
salaxyPayrollAssistant: any;
salaxyPayButton: any;
salaxySalaryDateKindButton: any;
salaxyCalcSharing: any;
salaxyCalcSharingInfo: any;
salaxyCalcSharingReceiptAction: any;
salaxyCalcLeaves: any;
salaxyCalcWorkerInfo: any;
salaxyPayrollSelectList: any;
salaxyCalcCostAccounting: any;
salaxyCalcRowCostAccounting: any;
salaxyCalcRowDimensionInput: any;
salaxyCalcRowDocumentation: any;
salaxyCostAccounting: any;
salaxyContactInfo: any;
salaxyHourlyReport: any;
salaxyMessageThread: any;
salaxyMessageThreadList: any;
salaxyTimer: any;
salaxyVarmaBanner: any;
salaxyWelcome: any;
salaxyExpenseReport: any;
sxyAlert: any;
sxyCodeEditor: any;
sxyFieldset: any;
sxyForm: any;
sxyGrid: any;
sxyInput: any;
sxySchemaEditor: any;
sxyTable: any;
salaxyAccountReset: any;
salaxySmokeTest: any;
salaxyDatepicker: any;
salaxyDatepickerPopup: any;
salaxyDateRange: any;
salaxyFormGroup: any;
salaxyInput: any;
salaxyInputAccountingTarget: any;
salaxyInputBoolean: any;
salaxyInputCollectiveBargainAgreement: any;
salaxyInputCredential: any;
salaxyInputDuration: any;
salaxyInputEmployeeGroup: any;
salaxyInputEnum: any;
salaxyInputIncomeType: any;
salaxyInputMarkdown: any;
salaxyMarkdownEditor: any;
salaxyMarkdownViewer: any;
salaxyInputNumber: any;
salaxyInputOccupationType: any;
salaxyInputRrule: any;
salaxyInputTime: any;
salaxyInputTypeahead: any;
salaxyToggleButtons: any;
salaxyTextarea: any;
salaxyValidationSummary: any;
salaxyInputHolidayMultipliers: any;
salaxyInputPayStatsRowType: any;
salaxyActionButton: any;
salaxyAlert: any;
salaxyAvatar: any;
salaxyChart: any;
salaxyCalendar: any;
salaxyDataMapper: any;
salaxyJsonFormatter: any;
salaxyJsonDiff: any;
salaxyNaviSitemap: any;
salaxyNaviStarterLayout: any;
salaxyOdataActions: any;
salaxyOdataFooter: any;
salaxyOdataTable: any;
salaxySpinner: any;
salaxyTabs: any;
salaxyTab: any;
salaxyTabButtons: any;
salaxyUiTranslator: any;
salaxyCalcImport: any;
salaxyCompanyImport: any;
salaxyImportStaging: any;
salaxyWorkerImport: any;
salaxyCreditTransfer: any;
salaxyInvoiceAlerts: any;
salaxyInvoiceEdit: any;
salaxyInvoiceList: any;
salaxyInvoicePreview: any;
salaxyInvoicesCreate: any;
salaxyPaymentChannelInvoicePreview: any;
salaxyInvoiceTools: any;
salaxyInvoiceReport: any;
salaxyInvoicePaymentList: any;
salaxyCompanyInvoices: CompanyInvoices;
salaxyHolidayReport: any;
salaxyHolidayPayReportQuery: any;
salaxyIrEarningsPayment: any;
salaxyIrEarningsPaymentList: any;
salaxyIrPayerSummary: any;
salaxyIrPayerSummaryList: any;
salaxyReportList: any;
salaxySalaryReportList: any;
salaxyAccountingReportQuery: any;
salaxyAccountingHolidayPayDebtReportQuery: any;
salaxyAccountingReportList: any;
salaxyAccountingReportRows: any;
salaxyAccountingReportTools: any;
salaxyAccountingReportViewer: any;
salaxyPayCertificate: any;
salaxyCalculationReport: any;
salaxyAccountingRowReport: any;
salaxyEmployerReport: any;
salaxyWorkerReport: any;
salaxyHouseholdDeductionReport: any;
salaxyHouseholdYearDetails: any;
salaxyHouseholdYearList: any;
salaxySummaryReport: any;
salaxySummaryReportQuery: any;
salaxyWorkerSummaryReport: any;
salaxyPayStatsReportQuery: any;
salaxyAbsencePeriods: any;
salaxyEmploymentDetails: EmploymentDetails;
salaxyEmploymentTaxcards: any;
salaxyHolidayYearAccrual: any;
salaxyHolidayYearHolidays: any;
salaxyHolidayYearPaid: any;
salaxyTaxcardDetails: any;
salaxyTaxcardIncomeLog: any;
salaxyTaxcardManualEdit: any;
salaxyTaxcardList: any;
salaxyTaxCardsList: any;
salaxyWorkerAbsences: any;
salaxyWorkerDetails: any;
salaxyWorkerHolidays: any;
salaxyEmploymentList: any;
salaxyWorkerList: any;
salaxyWorkerAssure: any;
salaxyCalendarEventDetails: any;
salaxyDatasetDetails: any;
salaxyWorkflowButtons: any;
salaxyWorkflowReopen: any;
salaxyWorkflowBadge: any;
salaxyRecords: any;
salaxyAccountant: any;
salaxyRowTypesSettings: any;
salaxyAccountingTargetDetails: any;
salaxyInsurance: any;
salaxyInsuranceSettings: any;
salaxyOwnerSettings: any;
salaxyPaymentChannelSettings: any;
salaxyPaymentSettings: any;
salaxyProSettings: any;
salaxyAccountingTargetSettings: any;
salaxyServiceModelDetails: any;
salaxyUsecaseDetails: any;
salaxyCostAccountingSettings: any;
salaxyAccountingSettings: any;
salaxyHolidaySettings: any;
salaxyPayStatsSettings: any;
salaxyIrDeliverySettings: any;
};
}
/**
* Environment specific configuration for Salaxy API's and JavaScript in general.
* Raw object as stored in the env file.
*/
declare interface Config {
/** The base address of the Salaxy http API server, e.g. https://secure.salaxy.com */
apiServer?: string | null;
/** The base address of the Palkkaus web site, e.g. https://www.palkkaus.fi */
wwwServer?: string | null;
/** A flag indicating if the current configuration is for test environment only. If true, the site is for testing only. */
isTestData?: boolean | null;
/** A flag indicating if the site sets a Salaxy cookie which persists over web sessions. If true, the cookie will be created. */
useCookie?: boolean | null;
/** A flag indicating if the API site uses credentials. If true, the credentials will be used. */
useCredentials?: boolean | null;
/** InstrumentationKey for Application Insight */
instrumentationKey?: string | null;
/** Partner id for site. This is required for example for onboarding with partner specific style. */
partnerSite?: string | null;
/** Pro server site address. e.g. https://pro.palkkaus.fi */
proServer?: string | null;
/** Report server url */
reportServer?: string | null;
/** Application id for invoicing. */
applicationId?: string | null;
/** The base address of the integrations server, e.g. https://integrations.salaxy.com */
integrationsServer?: string | null;
/** The base address of the code editor server, e.g. https://code-editor.salaxy.com */
codeEditor?: string | null;
}
/**
* Controller base class for configurable grid reports.
*/
export declare abstract class ConfigurableGridReportControllerBase implements angular_2.IController {
protected datasets: Datasets;
protected uiHelpers: UiHelpers;
protected sessionService: SessionService;
/** Usecase uri for report templates */
abstract usecaseUri: string;
/** Current grid options. */
abstract gridOptions: any;
/** ID for the element containing grid. */
abstract gridElmentId: any;
/** default templates */
protected abstract defaultTemplates: Template[];
/** Current data */
data: TData;
/** Current grid. */
grid: any;
/** Options for data query. */
queryOptions: {
period: {
/** Period type for the query. */
periodType: PeriodType;
/** Ref date for the period. */
refDate?: string;
/** End date for the custom period. */
endDate?: string;
/** Period date kind */
periodDateKind: PeriodDateKind;
/** Selected workers */
selectedWorkers: WorkerListItem[];
};
calculations: CalculationListItem[];
payrolls: PayrollListItem[];
};
/** Current report template */
templateId: string;
/** All loaded templates */
templates: Template[];
constructor(datasets: Datasets, uiHelpers: UiHelpers, sessionService: SessionService);
/**
* Initialize controller values.
*/
$onInit(): void;
/**
* Returns the template definition
* @param templateId Template id.
*/
getTemplate(templateId: string): Template | undefined;
/**
* Selects the template to show
* @param templateId The selected template.
*/
selectTemplate(templateId: any): void;
/**
* Save template
*/
showSaveTemplate(): void;
/**
* Delete template
*/
showDeleteTemplate(): void;
/**
* Shows the period selection dialog and makes the search.
*/
showPeriodSelection(): void;
/**
* Shows the calculation selection dialog and makes the search.
*/
showCalcsSelection(): void;
/**
* Shows the calculation selection dialog and makes the search.
*/
showPayrollSelection(): void;
/**
* Gets the data based on given set of calculations.
* @param calculationIds - Calculations that are the bases for the report.
* @returns A Promise with result data.
*/
abstract queryDataForCalculationIds(calculationIds: string[]): Promise;
/**
* Gets the monthly / quarterly / yearly cumulative data for the current account.
* @param refDate Reference date for the period. Please note that even if the date is not the first day of the given period, the entire period is returned.
* @param periodType Month, quarter, year or a custom period. The custom period requires endDate. Default value is the month.
* @param endDate End date for the period. Required only for the custom period.
* @param periodDateKind Period date type: paid at date, salary date or work date.
* @param workers List of worker official ids.
* @returns A Promise with result data.
*/
abstract queryDataForPeriod(refDate: string, periodType?: PeriodType | "all", endDate?: string, periodDateKind?: PeriodDateKind, workers?: string[]): Promise;
/**
* Processes and sets the data.
*/
abstract setData(result: TData): any;
private loadTemplates;
private loadTemplateConfig;
private setTemplateStateToGrid;
private setGridStateToTemplate;
}
/** Common contact information object for Person, Company, Location etc. */
declare interface Contact {
/** Contact e-mail address. Always lower invariant, trimmed and empty string set to null. */
email?: string | null;
/** Telephone number */
telephone?: string | null;
/** Street address */
street?: string | null;
/** Postal code */
postalCode?: string | null;
/** City or community (postitoimipaikka) */
city?: string | null;
/** This is the ISO code for country.
Currently, it should always be "fi". */
countryCode?: string | null;
}
/** Advanced contact information with strongly typed country and type information. */
declare interface ContactAdvanced {
/** Type of contact when specification allows several contacts. */
type?: ContactType | null;
/** Contact e-mail address. Always lower invariant, trimmed and empty string set to null. */
email?: string | null;
/** Telephone number */
telephone?: string | null;
/** Street address */
street?: string | null;
/** Postal code */
postalCode?: string | null;
/** City or community (postitoimipaikka) */
city?: string | null;
/** Country as defined as */
country?: Country | null;
/** Name of the country as free text if Country is Other. */
countryOtherName?: string | null;
}
/**
* Shows the customer service contact info and reference to zendesk's help-widget.
* Options to show short content and hide contact info.
* @example
* ```html
*
* ```
*/
export declare class ContactInfo extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/** If true, short version of the content is shown */
showShortContent: string;
/** If true, contact info is hidden */
hideContactInfo: string;
};
/** Uses the AlertController */
controller: typeof ContactInfoController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Controller rendering a contact info box in the page area.
*/
export declare class ContactInfoController implements angular_2.IController {
/**
* For NG-dependency injection
* @ignore
*/
/** If true, short version of the content is shown */
showShortContent: boolean;
/** If true, contact info is hidden */
hideContactInfo: boolean;
/**
* Creates a new ContactInfoController
* @ignore
*/
constructor();
/**
* Implement IController
*/
$onInit: () => void;
}
declare interface ContactPerson {
/** Name */
name?: string | null;
/** Telephone number */
telephone?: string | null;
/** E-mail address
If the ‘Reimbursement application data’ data group is specified for a paid absence and 1 or 2 as the ‘Payment data type’ even in a single report in a record, you must report at least one ‘Contact person for the record’ for whom the ‘E-mail address’ and ‘Field of responsibility’ data items have been specified. */
email?: string | null;
/** Field of responsibility
If the ‘Reimbursement application data’ data group is specified for a paid absence and 1 or 2 as the ‘Payment data type’ even in a single report in a record, you must report at least one ‘‘Contact person for the record’ for whom the ‘E-mail address’ and ‘Field of responsibility’ data items have been specified, with ‘Field of responsibility’ having the value 1 (Content issues). */
responsibilityCode?: ContactPersonResponsibilityCode | null;
}
declare enum ContactPersonResponsibilityCode {
ContentIssues = "contentIssues",
TechnicalIssues = "technicalIssues"
}
/** ContactType enumeration */
declare enum ContactType {
Default = "default",
WorkerAccount = "workerAccount",
EmployerOverride = "employerOverride",
Foreign = "foreign"
}
/** Content for a API object property. */
declare interface ContentPackage {
/** Api Item Type */
type?: ApiItemType | null;
/** Path to the property. */
propertyPath?: string | null;
/** Content for the property. */
content?: any | null;
/** Action to be performed with the content. */
action?: ContentPackageAction | null;
}
/** ContentPackageAction enumeration */
declare enum ContentPackageAction {
Undefined = "undefined",
Overwrite = "overwrite",
Preserve = "preserve",
Append = "append"
}
/** A signing party in a contract. */
declare interface ContractParty {
/** Identifier for the party: Currently always an account, but may be an external ID later. */
id?: string | null;
/** Avatar for the Party.
Note that this is not automatically fetched by all methods: Especially when IsSelf is true. */
avatar?: Avatar_2 | null;
/** Contact information - note that for most signatures, only E-mail and phone number are required. */
contact?: Contact | null;
/** True if Profile is the current Authorization.
If set to true, will set current Authorization as this contract party.
If set to false AND was previously true, will set the Profile properties null (unless explicitly set to something else) */
isSelf?: boolean | null;
/** Official ID if needed in signature */
officialId?: string | null;
/** Role of the person - justification for authorization */
role?: string | null;
/** True if the person has signed the contract. */
isSigned?: boolean | null;
/** Reserved for cases where there are several signees and each has a separate signature document. */
signatureUrl?: string | null;
/** Bank account IBAN number */
iban?: string | null;
/** Party type (Person or Prospect) */
contractPartyType?: ContractPartyType | null;
/** If true, contact is an employer */
isEmployer?: boolean | null;
}
/** ContractPartyType enumeration */
declare enum ContractPartyType {
Person = "person",
CustomContact = "customContact"
}
/**
* Provides methods for registering the Controllers to module
* (and other related metadata in the future).
*/
export declare class ControllersRegistration {
/** Gets the controllers for Module registration. */
static getControllers(): {
AbsencePeriodsController: typeof AbsencePeriodsController;
AccountantController: typeof AccountantController;
AccountantWizardController: typeof AccountantWizardController;
AccountingChannelSettingsController: typeof AccountingChannelSettingsController;
AccountAuthorizationController: typeof AccountAuthorizationController;
AccountingHolidayPayDebtReportQueryController: typeof AccountingHolidayPayDebtReportQueryController;
AccountingReportCrudController: typeof AccountingReportCrudController;
AccountingReportDisplayController: typeof AccountingReportDisplayController;
AccountingReportQueryController: typeof AccountingReportQueryController;
AccountingReportRowsController: typeof AccountingReportRowsController;
AccountingReportToolsController: typeof AccountingReportToolsController;
AccountingRowReportController: typeof AccountingRowReportController;
AccountingTargetCrudController: typeof AccountingTargetCrudController;
AccountResetController: typeof AccountResetController;
ActionButtonController: typeof ActionButtonController;
AlertController: typeof AlertController;
AvatarController: typeof AvatarController;
BatchProcessController: typeof BatchProcessController;
CalcChartController: typeof CalcChartController;
CalcCostAccountingController: typeof CalcCostAccountingController;
CalcEmploymentController: typeof CalcEmploymentController;
CalcHouseholdUsecaseController: typeof CalcHouseholdUsecaseController;
CalcImportController: typeof CalcImportController;
CalcIrRowsController: typeof CalcIrRowsController;
CalcsIrRowsController: typeof CalcsIrRowsController;
CalcWorktimeController: typeof CalcWorktimeController;
CalcRepairController: typeof CalcRepairController;
CalcRepairInfoController: typeof CalcRepairInfoController;
CalcReportController: typeof CalcReportController;
CalcReportsController: typeof CalcReportsController;
CalcReportsDisplayController: typeof CalcReportsDisplayController;
CalcRowCostAccountingController: typeof CalcRowCostAccountingController;
CalcRowDimensionInputController: typeof CalcRowDimensionInputController;
CalcRowDocumentationController: typeof CalcRowDocumentationController;
CalcRowFormulaController: typeof CalcRowFormulaController;
CalcRowTypeController: typeof CalcRowTypeController;
CalcRows2019Controller: typeof CalcRows2019Controller;
CalcSharingController: typeof CalcSharingController;
CalcSharingReceiptActionController: typeof CalcSharingReceiptActionController;
CalculationCrudController: typeof CalculationCrudController;
CalculationEditorController: typeof CalculationEditorController;
CalculationReportController: typeof CalculationReportController;
Calculator2019Controller: typeof Calculator2019Controller;
Calculator2022Controller: typeof Calculator2022Controller;
CalcLeavesController: typeof CalcLeavesController;
CalendarController: typeof CalendarController;
CalendarEventsCrudController: typeof CalendarEventsCrudController;
CertificateController: typeof CertificateController;
ChartController: typeof ChartController;
CompanyAccountController: typeof CompanyAccountController;
CompanyInvoicesController: typeof CompanyInvoicesController;
CompanyImportController: typeof CompanyImportController;
CompanyOnboardingController: typeof CompanyOnboardingController;
CompanySettingsController: typeof CompanySettingsController;
ContactInfoController: typeof ContactInfoController;
CostAccountingController: typeof CostAccountingController;
CredentialController: typeof CredentialController;
CreditTransferController: typeof CreditTransferController;
CustomerInvoiceCrudController: typeof CustomerInvoiceCrudController;
CustomerOnboardingController: typeof CustomerOnboardingController;
DatasetsCrudController: typeof DatasetsCrudController;
DatepickerController: typeof DatepickerController;
DatepickerPopupController: typeof DatepickerPopupController;
DateRangeController: typeof DateRangeController;
EditDialogController: typeof EditDialogController;
EmbeddedUiController: typeof EmbeddedUiController;
EmployerListController: typeof EmployerListController;
EmployerReportController: typeof EmployerReportController;
EmployerSelectController: typeof EmployerSelectController;
EmploymentCrudController: typeof EmploymentCrudController;
EmploymentTaxcardsController: typeof EmploymentTaxcardsController;
EmploymentWizardController: typeof EmploymentWizardController;
ExportController: typeof ExportController;
HolidayPayReportQueryController: typeof HolidayPayReportQueryController;
HolidayReportController: typeof HolidayReportController;
HolidayYearAccrualController: typeof HolidayYearAccrualController;
HolidayYearCrudController: typeof HolidayYearCrudController;
HolidayYearHolidaysController: typeof HolidayYearHolidaysController;
HolidayYearPaidController: typeof HolidayYearPaidController;
HouseholdDeductionReportController: typeof HouseholdDeductionReportController;
HouseholdOnboardingController: typeof HouseholdOnboardingController;
HouseholdYearCrudController: typeof HouseholdYearCrudController;
ImportController: typeof ImportController;
ImportStagingController: typeof ImportStagingController;
InputBooleanController: typeof InputBooleanController;
InputCollectiveBargainAgreementController: typeof InputCollectiveBargainAgreementController;
InputCredentialController: typeof InputCredentialController;
InputDurationController: typeof InputDurationController;
InputEmployeeGroupController: typeof InputEmployeeGroupController;
InputEnumController: typeof InputEnumController;
InputHolidayMultipliersController: typeof InputHolidayMultipliersController;
InputPayStatsRowTypeController: typeof InputPayStatsRowTypeController;
InputIncomeTypeController: typeof InputIncomeTypeController;
InputNumberController: typeof InputNumberController;
InputRruleController: typeof InputRruleController;
InputTimeController: typeof InputTimeController;
InputTypeaheadController: typeof InputTypeaheadController;
InsuranceWizardController: typeof InsuranceWizardController;
InvoiceCrudController: typeof InvoiceCrudController;
InvoicesCreateController: typeof InvoicesCreateController;
InvoiceReportController: typeof InvoiceReportController;
InvoiceSepaController: typeof InvoiceSepaController;
InvoiceToolsController: typeof InvoiceToolsController;
InvoiceAlertsController: typeof InvoiceAlertsController;
InvoicePaymentListController: typeof InvoicePaymentListController;
IrEarningsPaymentCrudController: typeof IrEarningsPaymentCrudController;
IrPayerSummaryCrudController: typeof IrPayerSummaryCrudController;
JsonFormatterController: typeof JsonFormatterController;
JsonDiffController: typeof JsonDiffController;
MarkdownEditorController: typeof MarkdownEditorController;
MarkdownViewerController: typeof MarkdownViewerController;
MessageThreadCrudController: typeof MessageThreadCrudController;
ModalGenericDialogController: typeof ModalGenericDialogController;
MyTaxcardsController: typeof MyTaxcardsController;
NaviController: typeof NaviController;
NewPaymentController: typeof NewPaymentController;
ODataActionsController: typeof ODataActionsController;
ODataHelperController: typeof ODataHelperController;
ODataQueryController: typeof ODataQueryController;
OmapalkkaController: typeof OmapalkkaController;
OwnerSettingsController: typeof OwnerSettingsController;
PartnerController: typeof PartnerController;
PayCertificateController: typeof PayCertificateController;
PaymentController: typeof PaymentController;
PaymentChannelController: typeof PaymentChannelController;
PaymentChannelSettingsController: typeof PaymentChannelSettingsController;
PayrollCrudController: typeof PayrollCrudController;
Payroll4AssistantController: typeof Payroll4AssistantController;
Payroll4CrudController: typeof Payroll4CrudController;
PayStatsReportQueryController: typeof PayStatsReportQueryController;
PalkkausPersonalPaymentOverviewController: typeof PalkkausPersonalPaymentOverviewController;
PersonAccountController: typeof PersonAccountController;
RecordsController: typeof RecordsController;
ReferenceObjectCrudController: typeof ReferenceObjectCrudController;
ReportsController: typeof ReportsController;
RowTypesSettingsController: typeof RowTypesSettingsController;
SalaryBasesController: typeof SalaryBasesController;
SalaryDateKindController: typeof SalaryDateKindController;
SalarySlipDownloadController: typeof SalarySlipDownloadController;
SalaryReportCrudController: typeof SalaryReportCrudController;
SessionController: typeof SessionController;
ServiceModelCrudController: typeof ServiceModelCrudController;
SignatureController: typeof SignatureController;
SigningController: typeof SigningController;
SmokeTestController: typeof SmokeTestController;
SpinnerController: typeof SpinnerController;
SummaryReportController: typeof SummaryReportController;
SummaryReportDisplayController: typeof SummaryReportDisplayController;
SummaryReportQueryController: typeof SummaryReportQueryController;
SxyCodeEditorController: typeof SxyCodeEditorController;
SxyFormController: typeof SxyFormController;
SxyFormElementController: typeof SxyFormElementController;
SxyTableController: typeof SxyTableController;
SxyGridController: typeof SxyGridController;
SxyInputController: typeof SxyInputController;
SxySchemaEditorController: typeof SxySchemaEditorController;
TabController: typeof TabController;
TabsController: typeof TabsController;
TabButtonsController: typeof TabButtonsController;
TaxcardManualEditController: typeof TaxcardManualEditController;
TaxcardCrudController: typeof TaxcardCrudController;
TaxcardIncomeLogController: typeof TaxcardIncomeLogController;
TemplateCrudController: typeof TemplateCrudController;
ToggleButtonsController: typeof ToggleButtonsController;
UiTranslatorController: typeof UiTranslatorController;
UsecasesCrudController: typeof UsecasesCrudController;
VarmaBannerController: typeof VarmaBannerController;
WelcomeController: typeof WelcomeController;
WizardController: typeof WizardController;
WorkerAbsencesCrudController: typeof WorkerAbsencesCrudController;
WorkerAccountCrudController: typeof WorkerAccountCrudController;
WorkerAssureController: typeof WorkerAssureController;
WorkerExpenseReportController: typeof WorkerExpenseReportController;
WorkerHourlyReportController: typeof WorkerHourlyReportController;
WorkerImportController: typeof WorkerImportController;
WorkerOnboardingController: typeof WorkerOnboardingController;
WorkerReportController: typeof WorkerReportController;
WorkerSummaryReportController: typeof WorkerSummaryReportController;
WorkerSummaryReportDisplayController: typeof WorkerSummaryReportDisplayController;
WorkerTimerController: typeof WorkerTimerController;
WorkflowController: typeof WorkflowController;
WorkflowBadgeController: typeof WorkflowBadgeController;
TimesheetWorkerDemoController: typeof TimesheetWorkerDemoController;
ValidationSummaryController: typeof ValidationSummaryController;
};
}
/**
* Shows the cost accounting details for the calculation.
* @example
* ```html
*
* ```
*/
export declare class CostAccounting extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/** Dimension values for edit. */
current: string;
/** Possible inherited dimensions values from upper lever (e.g. calc level to rows) */
inherited: string;
/** Forced read only state */
readOnly: string;
/**
* Optional CostAccountingDimensionDefinitions
* If not set, cost accounting dimensions and their options are read from the settings.
*/
dimensions: string;
/**
* Scope for the cost accounting: calculation or row.
*/
scope: string;
/**
* Style of the inputs.
* Supports empty or 'openClose'. Only available when not readOnly
*/
inputMode: string;
};
/** Uses the CostAccountingController */
controller: typeof CostAccountingController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Handles the user interaction for entering cost accounting data.
*/
export declare class CostAccountingController implements angular_2.IController {
protected sessionService: SessionService;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** Scope for the cost accounting: calculation or row. */
scope: CostAccountingDimensionScope;
/** Dimension values to edit.*/
current: CostAccountingDimension[];
/** Possible upper level (e.g. calculation) dimensions that are inherited */
private _inherited;
/** Bindable read-only */
readOnly?: boolean;
/** CostAccountingDimensionDefinition including label, type and options */
dimensions: CostAccountingDimensionDefinition[];
/**
* Style of inputs.
* If null or empty, displays normal input.
* - "openeClose" shows readOnly-like input with toggle button to open the field for editing.
*/
inputMode: "" | "openClose";
private _definitions;
private _options;
private _values;
private _inheritedValues;
private _obsoleteValues;
private _newDimensions;
/**
* Creates a new CalcCostAccountingController
* @ignore
*/
constructor(sessionService: SessionService);
/**
* Implement IController
*/
$onInit(): void;
/** Copy of inherited dimensions */
get inherited(): CostAccountingDimension[];
/** Copy of inherited dimensions */
set inherited(value: CostAccountingDimension[]);
/** Returns applicable dimensions*/
get definitions(): CostAccountingDimensionDefinition[];
/**
* Returns true, if the dimension exists.
* @param id Id of the dimension.
* @returns True, if the dimension with given id exists.
*/
getDefinition(id: string): CostAccountingDimensionDefinition | undefined;
/**
* Returns total percentage for the dimension
* @param id Name of the dimension.
*/
getSum(id: string): number;
/**
* Returns available options.
* @param id Id of the dimension.
*/
getOptions(id: string): {
/** Option value. */
value: any;
/** Option text. */
text: string;
/** Option description. */
title?: string | undefined;
}[];
/**
* Returns true if options exists for the dimension.
* @param id Id of the dimension.
* @param value Value of the dimension.
* @returns True, if an option exists for the value.
*/
hasOptions(id: string, value: string): boolean;
/**
* Returns single value.
* @param id Id of the dimension.
*/
getSingleValue(id: string): CostAccountingDimension | undefined;
/**
* Sets single value.
* @param id Id of the dimension.
* @param value Value of the dimension.
*/
setSingleValue(id: string, value: string): void;
/**
* Returns current values.
* @param id Id of the dimension.
*/
getValues(id: string): CostAccountingDimension[];
/**
* Sets values.
* @param values Values of the dimension.
*/
setValues(values: CostAccountingDimension[]): void;
/**
* Deletes value from the dimensions
* @param value Value to delete
*/
deleteValue(value: CostAccountingDimension): void;
/**
* Returns true if the dimension values are inherited.
* @param id Id of the dimension.
*/
isInherited(id: string): boolean;
/**
* Returns inherited single value.
* @param id Id of the dimension.
*/
getInheritedSingleValue(id: string): CostAccountingDimension | undefined;
/**
* Returns inherited values.
* @param id Id of the dimension.
*/
getInheritedValues(id: string): CostAccountingDimension[];
/**
* Returns total percentage for the dimension for inherited values
* @param id Name of the dimension.
*/
getInheritedSum(id: string): number;
/**
* Returns current obsolete values.
*/
get obsoleteValues(): CostAccountingDimension[];
/**
* Returns true if the values contains obsolete dimensions.
* @returns True if the values contains obsolete dimensions.
*/
get hasObsoleteValues(): boolean;
private modifyOptions;
private cleanDimensions;
}
/** Id of the cost accounting dimension with optional percentage for shared costs. */
declare interface CostAccountingDimension {
/** Dimension Id. */
id?: string | null;
/** Cost accounting dimension value id. */
value?: string | null;
/** Sharing percent for the dimension. */
percent?: number | null;
}
/** Cost accounting dimension definition. */
declare interface CostAccountingDimensionDefinition {
/** Id for the dimension. */
id?: string | null;
/** Default label for the dimension entry. */
label?: string | null;
/** Hierarchial object containing selection options for dimension values. */
options?: CostAccountingDimensionOption[] | null;
/** If true, multiple values can be set to the dimension and the costs are shared between dimension values. */
allowCostSharing?: boolean | null;
/** Defines the visible scopes of the dimension. For example, Scope.Row shows the dimension on row level only. */
scope?: CostAccountingDimensionScope | null;
}
/** Selectable cost accounting dimension value. */
declare interface CostAccountingDimensionOption {
/** Value for the option. */
value?: string | null;
/** Description of the value. */
text?: string | null;
/** For option hiearchies, path to this option not including the value itself. */
path?: string | null;
/** Defines the visible scopes of the dimension values. For example, Scope.Row shows the dimension value on row level only.
The default is, that the scope is not defined and that the value is visible everywhere. */
scope?: CostAccountingDimensionScope | null;
}
/** CostAccountingDimensionScope enumeration */
declare enum CostAccountingDimensionScope {
None = "none",
Calculation = "calculation",
Row = "row",
Hidden = "hidden"
}
/** Cost accounting models for session. */
declare interface CostAccountingInSession {
/** Cost accounting dimensions */
dimensions?: CostAccountingDimensionDefinition[] | null;
}
/**
* Cost accounting settings.
* @example
* ```html
*
* ```
*/
export declare class CostAccountingSettings extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/** Forced read only state */
isReadOnlyForced: string;
};
/** Uses the CompanySettingsController */
controller: typeof CompanySettingsController;
/** Default template is the view */
defaultTemplate: string;
}
/** Settings related to Cost Accounting */
declare interface CostAccountingSettings_2 {
/** If true, the service model is not applied to this feature. */
denyServiceModel?: boolean | null;
/** Cost accounting dimensions */
dimensions?: CostAccountingDimensionDefinition[] | null;
}
/** Country enumeration */
declare enum Country {
Fi = "fi",
Ae = "ae",
At = "at",
Ba = "ba",
Bg = "bg",
By = "by",
Cn = "cn",
De = "de",
Eg = "eg",
Fr = "fr",
Gg = "gg",
Hr = "hr",
Ie = "ie",
In = "in",
Je = "je",
Kr = "kr",
Lk = "lk",
Lv = "lv",
Me = "me",
Mx = "mx",
No = "no",
Pk = "pk",
Rs = "rs",
Sg = "sg",
Th = "th",
Tr = "tr",
Us = "us",
Vg = "vg",
Zm = "zm",
Am = "am",
Au = "au",
Bb = "bb",
Bm = "bm",
Ca = "ca",
Cy = "cy",
Dk = "dk",
Es = "es",
Gb = "gb",
Gr = "gr",
Hu = "hu",
Il = "il",
Is = "is",
Jp = "jp",
Ky = "ky",
Lt = "lt",
Ma = "ma",
Mk = "mk",
My = "my",
Nz = "nz",
Pl = "pl",
Ru = "ru",
Si = "si",
Tj = "tj",
Tz = "tz",
Uy = "uy",
Vn = "vn",
Ar = "ar",
Az = "az",
Be = "be",
Br = "br",
Ch = "ch",
Cz = "cz",
Ee = "ee",
Ge = "ge",
Hk = "hk",
Id = "id",
Im = "im",
It = "it",
Kg = "kg",
Kz = "kz",
Lu = "lu",
Md = "md",
Mt = "mt",
Nl = "nl",
Ph = "ph",
Ro = "ro",
Se = "se",
Sk = "sk",
Tm = "tm",
Ua = "ua",
Uz = "uz",
Za = "za",
Other = "other"
}
/** Credential controller for listing credentials and removing existing credentials. */
export declare class CredentialController extends CrudControllerBase {
private uploadService;
private credentialService;
private sessionService;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/**
* Translated color options for input enum
*/
colorOptions: any;
private originalAvatar;
/** Constructor for dependency injection */
constructor(uploadService: UploadService, credentialService: CredentialService, sessionService: SessionService, $location: angular_2.ILocationService, $attrs: angular_2.IAttributes, uiHelpers: UiHelpers);
/**
* Uploads avatar image file to the server.
* @param file - selected file
*/
uploadAvatarImage(file: any): void;
/** Called when avatar changes */
emailForAvatarChanged(): void;
/** Called when avatar changes */
typeForAvatarChanged(): void;
/** Set current credential for edit. */
setCurrent(item: SessionUserCredential): void;
/** Saves a new credential */
saveCurrent(): Promise;
}
/**
* Shows a list of all login credentials which can access this account.
* @example
* ```html
*
* ```
*/
export declare class Credentials extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
showEdit: string;
};
/**
* Header is mainly meant for buttons (Usually at least "Add new").
* These are positioned to the right side of the table header (thead).
*/
transclude: {
header: string;
};
/** Uses the CredentialController */
controller: typeof CredentialController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Provides CRUD access for authenticated user to access all credentials which can access this account.
*/
declare class Credentials_2 extends CrudApiBase {
/**
* For NG1-dependency injection
* @ignore
*/
static $inject: string[];
/** Base URL for details etc. */
protected baseUrl: string;
constructor(ajax: Ajax);
/**
* Returns an empty credential without any values.
*/
getBlank(): SessionUserCredential;
/**
* Returns the url where to post the avatar file
*/
getAvatarUploadUrl(credentialId: string): string;
/**
* Gets all credentials from the API.
* @returns A Promise that resolves to an array of SessionUserCredential objects.
*/
getAll(): Promise;
/**
* OData query is not supported for credentials.
* @param _query OData query parameters (not used)
* @throws Error indicating operation is not supported
*/
getOData(_query: any): any;
/**
* Getting a single credential is not supported.
* @param _id Identifier of the credential (not used)
* @throws Error indicating operation is not supported
*/
getSingle(_id: any): any;
}
/**
* CRUD functionality for the Credentials objects and functionality for Credentials in general.
*/
export declare class CredentialService extends BaseService {
private credentialsApi;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/**
* String that identifies the service event (onChange/notify).
* Must be unique for the service class.
*/
protected eventPrefix: string;
constructor($rootScope: angular_2.IRootScopeService, sessionService: SessionService, credentialsApi: Credentials_2);
/**
* Returns the url for uploading the avatar image file to the database
* @returns Id of the credential
*/
getAvatarUploadUrl(credentialId: any): string;
}
/**
* Credit Transfer Form for Invoice visualization.
* @example
* ```html
*
* My custom HTML message
*
* ```
*/
export declare class CreditTransfer extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {
/** Invoice to display in the credit transfer. */
invoice: string;
/** Invoice preview to display in the credit transfer. */
invoicePreview: string;
/**
* Display mode is either
*
* - "official": The official printable credit transfer (Finanssialan keskusliitto)
* - "barcode-copy": The copy-paste input + button (in a div) for copy pasting the the barcode into a web bank
* - "default": Both of the above separted by an explaining text.
*/
mode: string;
};
/**
* Transclusion slots
*/
transclude: {
/**
* HTML to include in the message section
*/
message: string;
};
/** Uses the CreateCompanyAccountWizardController */
controller: typeof CreditTransferController;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Shows an invoice as credit transfer: Either as printable display, copy-pasteable barcode or both.
*/
export declare class CreditTransferController implements angular_2.IController {
private $scope;
private $sce;
private $timeout;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** Invoice that is shown as credit transfer: The main data object. */
invoice: Invoice;
private invoiceQrCode;
/**
* Display mode is either
*
* - "official": The official printable credit transfer (Finanssialan keskusliitto)
* - "barcode-copy": The copy-paste input + button (in a div) for copy pasting the the barcode into a web bank
* - "default": Both of the above separted by an explaining text.
*/
mode: "default" | "official" | "barcode-copy";
private _invoicePreview;
/**
* Creates a new CreditTransferController.
* @ignore
*/
constructor($scope: angular_2.IScope, $sce: angular_2.ISCEService, $timeout: angular_2.ITimeoutService);
/** Copies the barcode from input to clipboard. */
copyBarcode(): void;
/** Gets a unique id for the barcode input (from which the copying to clipboard is done). */
getId(): number;
/**
* Retrieves the QR code for the specified invoice item.
* If the QR code is not already cached, it generates the QR code and caches it for future use.
* @returns The QR code string.
*/
getQrCode(): string;
/**
* Sets the Invoice based on an invoice preview (list item based preview) if the invoice is not empty.
* I.e. if you wish to set to null, you need to set the invoice null separately.
* Gets the original preview object if set.
*/
get invoicePreview(): InvoicePreview_2;
set invoicePreview(value: InvoicePreview_2);
/**
* Retrieves the barcode for the invoice recipient's IBAN.
* If the IBAN does not start with "fi" or is not provided, an empty string is returned.
* The barcode is generated using the Barcodes.createBarcode function.
* @returns The barcode as a string, wrapped in an HTML trust object.
*/
getBarcode(): string;
/** Barcode value */
get bcValue(): string;
/**
* Generates the QR code for the invoice.
*/
generateQrCodeSvgForInvoice(): Promise;
/**
* Returns bic for iban
* @param iban Iban to get bic for
*/
getBicForIban(iban: string): string;
/**
* Determines whether to show the QR code for the invoice.
* @returns A boolean indicating whether to show the QR code.
*/
showQrCode(): boolean;
/**
* Checks if the IBAN of the recipient is an international IBAN.
* @returns {boolean} True if the IBAN is international, false otherwise.
*/
isInternationalIban(): boolean;
/** Maps an invoice preview object to invoice. */
private getInvoice;
}
/**
* Base class for CRUD services.
* Type TItem is the type of the object that is stored in the service (CrudObject).
* Type TListItem is the type of the object that is returned in lists (based on Api).
*/
declare abstract class CrudApiBase {
protected ajax: Ajax;
/**
* Deriving classes should define the baseURl for the method. E.g. "/calculations"
* Ajax implementations will add the beginning (e.g. "https://test-api.salaxy.com/api/v03")
*/
protected abstract baseUrl: string;
/** Constructor creates a new CRUD api with given Ajax-implementation */
constructor(ajax: Ajax);
/**
* Client-side (synchronous) method for getting a new blank CRUD item as bases for UI binding.
* The basic idea is that all the child object properties should be non-null to avoid null reference exceptions.
* In special cases, when null is significant it may be used: e.g. Calculation.result is null untill the recalculation has been done.
* Strings, dates and booleans may be null (false if bool), but typically just undefined.
*/
abstract getBlank(): TItem;
/**
* Makes an OData query to the service's main OData method.
* @param query The options for the query: Filter, search sort etc.
* This is either a strongly typed object or query string that is added directly.
*/
getOData(query: ODataQueryOptions | string): Promise>;
/**
* Makes an OData query to the the given service URL.
* @param baseUrl The service URL that is used, e.g. "/v03/api/taxcards/current".
* @param query The options for the query: Filter, search sort etc.
* This is either a strongly typed object or query string that is added directly.
* @deprecated You should use the OData.getOData() static util method instead.
*/
getODataBase(baseUrl: string, query: ODataQueryOptions | string): Promise>;
/**
* Retrieves the Ajax instance used by this CRUD API.
* @returns {Ajax} The Ajax instance that is used for making HTTP requests.
*/
getAjax(): Ajax;
/**
* Gets a single item based on identier
* @param id - Unique identifier for the object
* @returns A Promise with result data.
*/
getSingle(id: string): Promise;
/**
* Deletes an single item from the sotrage
* @param id - Unique identifier for the object
* @returns A Promise with result data "Object deleted".
*/
delete(id: string): Promise;
/**
* Saves an item to the storage.
* If id is null, this is add/insert. If id exists, this is update.
* @param itemToSave - The item that is updated/inserted.
* @param options - Additional options for the save operation. Can be any object with fields that are used as query parameters.
* @returns A Promise with result data as saved to the storage (contains id, createAt, owner etc.).
*/
save(itemToSave: TItem, options?: any): Promise;
/** Gets the OData URL for v03 compatible services */
getODataUrl(): string;
/** Returns the base url for this api. */
getBaseUrl(): string;
/**
* Adds/updates the workflow event for the item.
*
* @param item - Item for which to set the workflow event.
* @param wfEvent - Event to add or update.
* @returns Workflow data for the item.
*/
saveWorkflowEvent(item: TItem, wfEvent: WorkflowEvent): Promise;
/**
* Deletes the workflow item or items from the item.
* @param item - Item for which to delete workflow events.
* @param wfIdOrType - Event id or type.
* @returns A Promise with result data "Object deleted".
*/
deleteWorkflowEvent(item: TItem, wfIdOrType: string): Promise;
/**
* Gets a single workflow event for the item.
* @param item - Item for which to get the single event.
* @param wfId - Event id.
* @returns A Promise with event data.
*/
getWorkflowEvent(item: TItem, wfId: string): Promise;
/**
* Lists versions for the object.
* @param id - Unique identifier for the object
* @returns A Promise with result data.
*/
getVersions(id: string): Promise;
/**
* Get the given version for the object.
* @param id - Unique identifier for the object
* @param versionId - Version identifier
* @returns A Promise with result data.
*/
getVersion(id: string, versionId: string): Promise;
protected getUrlWithOptions(url: string, options: any): string;
}
/**
* Base class for CRUD controllers of legacy service model: BaseService / IService.
* Most new implementations should use the new API CRUD model instead.
* However, this service model may still be the right choice in certain circumstances where the editable data should be
* cached or is already in session (like account data).
*/
export declare class CrudControllerBase implements angular.IController {
protected crudService: IService;
protected $location: angular.ILocationService;
protected $attrs: angular.IAttributes;
protected uiHelpers: UiHelpers;
/**
* Bindings for the component which uses CRUD controller.
*/
static crudBindings: {
/**
* Function that is called when user selects an item in the list.
* The selected item is the parameter of the function call.
* @example
*/
onListSelect: string;
/**
* Function that is called when an item is deleted.
* The event is intended for user interface logic after delete (promise resolve)
* and potentially when waiting for server to respond (from function call until promise resolve).
* It is not meant for delete validation and/or for preventing deletion.
* If onDelete is not specified, the browser is redirected to listUrl if specified.
* @example
*/
onDelete: string;
/**
* Function that is called after a new item has been created.
* At this point, the item has been created, but not yet selected as current.
* If onCreateNew is not specified the browser is redirected to detailsUrl if specified and if not, only current item is set.
* @example
*/
onCreateNew: string;
/**
* URL to which the component navigates when an item is clicked.
* The "id" or "rowIndex" property of the selected item is added to the URL.
* URL is ignored if onListSelect is set. In this case, you may navigate yourself in that method.
* @example
*/
detailsUrl: string;
/**
* URL for the list view. At the moment, if specified, the browser is redirected here after delete.
* @example
*
*
*/
listUrl: string;
};
/**
* For list-controls, this is the URL for item select event
* as well as the URL where a new item is edited. Basically showing the Details view.
* For more control, use onListSelect or onCreateNew events.
* @example
*/
detailsUrl: string;
/**
* URL for the list view. At the moment, if specified, the browser is redirected here after delete.
* @example
*
*
*/
listUrl: string;
/**
* Angular ng-model **if** the controller is bound to model using ng-model attribute.
*/
model: angular.INgModelController;
/**
* Function that is called when an item is deleted.
* The event is intended for user interface logic after delete (promise resolve)
* and potentially when waiting for server to respond (from function call until promise resolve).
* It is not meant for delete validation and/or for preventing deletion.
* If onDelete is not specified, the browser is redirected to listUrl if specified.
* NOTE: the deleteResult should basically always be Promise or promise failure. Promise does not really make sense here.
* @example
*/
onDelete: (eventData: {
/** The deleteResult should basically always be Promise or promise failure. Promise does not really make sense here. */
deleteResult: Promise;
}) => Promise;
/**
* Function that is called after a new item has been created.
* At this point, the item has been created, but not yet selected as current.
* If onCreateNew is not specified the browser is redirected to detailsUrl if specified and if not, only current item is set.
* @example
*/
onCreateNew: (eventData: {
/** New item which was created. */
item: T;
}) => void;
/**
* For list-controls, this is the function of on-list-select event.
* If onListSelect is not specified, the browser is redirected to detailsUrl if specified.
* If detailsUrl is not specified, only current item is set.
* @example
*/
onListSelect: (eventData: {
/** The selected item. */
item: T;
}) => void;
/**
* Creates a new CrudControllerBase.
* @param crudService The the BaseService instance that is used for communicating to server.
* @param $location Angular.js Location service that is used for navigation. Especially the list views.
* @param $attrs Angular.js Attisbutes for determining whether events have been bound to.
* @param uiHelpers - Salaxy ui helpers service.
*/
constructor(crudService: IService, $location: angular.ILocationService, $attrs: angular.IAttributes, uiHelpers: UiHelpers);
/**
* Implement IController by providing onInit method.
* We currently do nothing here, but if you override this function,
* you should call this method in base class for future compatibility.
*/
$onInit(): void;
/** Gets the Current selected item. */
get current(): T;
/** Gets the list of all CRUD objects listed. */
get list(): T[];
/**
* Creates a new item. The item is not saved in this process yet.
* Item is set as current unless onCreateNew is specified => Then you are responsible for doing it yourself.
* If detailsUrl is specified, the browser is redirectedted there.
* Current item is set also in this case (as opposed to listSelect) because the new item does not yet have an id
* and passing it in current item is the only way using router.
* Use onCreateNew event or crudService.getBlank() if you do not want to set the current item.
* @param newItem Specify the new item if you want to initialize it with specific values.
* In most cases, you should let the system create it with defaults.
*/
createNew(newItem?: T): T;
/** Copies the current item and sets it as the new current */
copyCurrent(): void;
/**
* Creates a copy of a given item and sets it as current
* unless onCreateNew is specified => Then you are responsible for doing it yourself.
* If detailsUrl is specified, the browser is redirectedted there.
* Current item is set also in this case (as opposed to listSelect) because the new item does not yet have an id
* and passing it in current item is the only way using router.
* Use onCreateNew event or crudService.copyAsNew() if you do not want to set the current item.
* @param copySource The item to copy as new.
* @returns The new item that is created.
*/
copyAsNew(copySource: T): T;
/**
* Creates a copy of a given item and sets it as current
* unless onCreateNew is specified => Then you are responsible for doing it yourself.
* If detailsUrl is specified, the browser is redirectedted there.
* Current item is set also in this case (as opposed to listSelect) because the new item does not yet have an id
* and passing it in current item is the only way using router.
* Use onCreateNew event or crudService.copyAsNew() if you do not want to set the current item.
* @param copySourceId The id of the item to copy as new.
* @returns The new item that is created.
*/
copyIdAsNew: (copySourceId: string) => T;
/**
* Mode for data binding is "singleton" by default.
* This means that this.current is bound to crudService.current.
* If ng-model is defined for the component (this.ngModelController),
* this.current is bound to ngModelController view value (as with form controls).
*/
getBindingMode(): "model" | "singleton";
/** Called by the view when the item is clicked. */
listSelect: (selectedItem: T) => void;
/** Called by the view when the item (id) is clicked. */
listSelectId: (selectedItemId: string) => void;
/** Saves the current item. */
saveCurrent(): Promise;
/**
* Sets the current item: Either to ng-model view value or crudService.setCurrent().
* @param item The item to set as Current.
*/
setCurrent(item: T): void;
/**
* Shows the "Are you sure?" dialog and if user clicks OK, deletes the item.
* Cancels the started payment for the payroll too.
* @param id Identifier of the item to be deleted.
* @param confirmMessage Optional custom message for the confirm dialog.
* If not specified, a generic message is shown.
* If set to boolean false, the confirm message is not shown at all.
* @returns Promise that resolves to true if the item is deleted.
* False, if user cancels and fails if the deletion fails.
*/
delete: (id: string, confirmMessage?: string) => Promise;
/**
* Deletes an item without showing the confirm dialog.
* The method shows the "Please wait..." loader, but does not call onDelete
* or move the browser to listUrl. The caller should take care
* of the UX actions after delete if necessary.
* @param id Identifier of the item to be deleted.
* @returns Promise that resolves to true (never false). Fails if the deletion fails.
*/
deleteNoConfirm(id: string): Promise;
}
/**
* Defines the supported cultures in the user interfaces and logic.
* Cultures define how e.g. numbers and dates are presented.
* Currently only imports / exports support Cultures: Finnish culture is used typically in English and Swedish user interfaces.
*/
declare enum Culture {
/** Finnish culture. Number 12,34 / Date: 1.2.2020 / CSV separator is semi-colon (";"). */
Fi = "fi",
/** International (en-US) culture. Number 12.34 / Date: 2020-02-01 / CSV separator is comma (","). */
En = "en"
}
/** Calculation with additional cumulative data. */
declare interface CumulativeCalculation {
/** Cumulative data for the calculation. */
cumulative?: {
[key: string]: CumulativeData;
} | null;
/** The employer object for this calculation.
Typically, you do not need to set this before the actual payment process. */
employer?: CalcEmployer | null;
/** The Worker (employee) that has performed the work. */
worker?: CalcWorker | null;
/** Information about the workflow and state of the calculation. */
workflow?: CalcWorkflow | null;
/** The main salary element.
Alternatively the salary can be set in the Rows object - this will be the only way to set multiple salary rows (not yet supported). */
salary?: Salary | null;
/** Set of rows that make up the salary calculation:
Expenses, Benefits, deductions etc. Note that side costs are not rows. */
rows?: UserDefinedRow[] | null;
/** DEPRECIATED: Usecase will be replacing this functionality in a next major release.
The Framework Agreement (TES) parameters that affect the framework based side costs etc. of this calculation */
framework?: TesParameters | null;
/** A usecase for creating and editing salary calculations.
In practice, a usecase is either a user interface or a microservice that provides a salary calculation
and it may be implemented outside Salaxy.
Provides the possibility to store useacase specific data as part of calculation.
NOTE: This functionality will replace Framework property in a next major release. */
usecase?: UsecaseData | null;
/** The results of the calculation. In the API, this is a read-only object. */
result?: CalculationResult | null;
/** Information about the work that is not directly related to calculating salary and expenses. */
info?: CalcInfo | null;
/** Sharing of the calculation. This object cannot be modified directly,
use specialized methods in Calculations service. */
sharing?: CalculationSharing | null;
/** Contains calculation specific data for accounting (both cost and financial accounting). */
accounting?: CalculationAccounting | null;
/** Worktime data that is stored as part of Salary calculation:
work days, absences, holidays and holiday accrual.
In the future may also contain relevant part of timesheet data (work hours). */
worktime?: CalcWorktime_2 | null;
/** Readonly workflow data, which is exposed to API. */
workflowData?: WorkflowData | null;
/** Identifier of the object. */
id?: string | null;
/** The date when the object was created. */
createdAt?: string | null;
/** The time when the object was last updated.
Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */
updatedAt?: string | null;
/** Owner ID for this data */
owner?: string | null;
/** Indication that for the currently logged-in account, the data is generally read-only. */
isReadOnly?: boolean | null;
/** Primary partner information. Automatically updated from the storage container Partner. */
partner?: string | null;
}
/** Cumulative data for a single calculation */
declare interface CumulativeData {
/** First and last Salary dates (days when Worker receives the salary) and number of payment days. */
salaryDates?: DateRange_2 | null;
/** Working days based on the salary calculations. */
workingDays?: DateRange_2 | null;
/** Dictionary of labels of the current data */
labels?: {
[key: string]: string;
} | null;
/** The cumulative data of the calculations. */
data?: {
[key: string]: number;
} | null;
/** The cumulative units of the calculations. */
units?: {
[key: string]: string;
} | null;
}
/** Contains information about the current sitemap node (if resoved) and other data related to route. */
export declare class CurrentRoute {
constructor(currentPath: SitemapNode[]);
/** The current path if resolved, otherwise an empty array */
path: SitemapNode[];
/** The current sitemap node */
node: SitemapNode;
/** The current section if resolved. */
section: SitemapNode;
/** If true, the route is resolved to current sitemap node. */
isResolved: boolean;
/**
* Gets logical visibility, as used in the views an UI logic, i.e.:
*
* - hidden: Node is null or visibility is Hidden, HiddenReadOnly or Disabled.
* - readOnly: Node is null or visibility is ReadOnly, HiddenReadOnly.
* - disabled: Visibility is Disabled.
* - Visible: Visibility is Visible or null, node is not null.
* - isFullWidth: The node has an isFullWidth boolean flag set to true.
*
* Supports exclamation mark (!) in the beginning to denote negation (true <=> false).
* @param visibility The visibility value to evaluate for.
*/
getVisibility(visibility: SitemapVisibility | string): boolean;
/** Returns true if the page should be displayed read-only */
get readOnly(): boolean;
/**
* Gets a parameter checking the default value from the schema.
* The method fails if the parameter is not defined in the schema.
* @param path Path to the sitemap value / schema definition.
*/
getParam(path: string): any;
/**
* Checks if the value contain the given flag value.
* Typically the value is an array of enum strings and this method checks if it contains an item,
* but the method also checks for a direct match (without being an array).
* @param path Path to the sitemap value / schema definition.
* @param flagValue Text value (typically a string enum) that should be present in the array.
*/
getFlag(path: string, flagValue: string): boolean;
}
/** Settings related to payment methods that use the customer funds account (gross payment). */
declare interface CustomerFundsSettings {
/** If true, worker salary and expense payments are paid directly by the employer. */
isWorkerSelfHandling?: boolean | null;
/** If true, the user handles the reporting and payments himself/herself. */
isPensionSelfHandling?: boolean | null;
/** If true, tax and social security payments are paid directly by the employer. */
isTaxAndSocialSecuritySelfHandling?: boolean | null;
}
/** Customer invoice is an invoice from Palkkaus / Salaxy to Customer / Partner: Invoice for the usage of service. */
declare interface CustomerInvoice {
/** Header-level information about the invoice. */
info?: CustomerInvoiceInfo | null;
/** The data that is the bases for invoicing e.g. calculations, monthly active users etc. */
bases?: CustomerInvoicingBases[] | null;
/** If not null, contains a final invoice in Laskupiste format. */
invoice?: LaskupisteInvoice | null;
/** Readonly workflow data, which is exposed to API. */
workflowData?: WorkflowData | null;
/** Identifier of the object. */
id?: string | null;
/** The date when the object was created. */
createdAt?: string | null;
/** The time when the object was last updated.
Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */
updatedAt?: string | null;
/** Owner ID for this data */
owner?: string | null;
/** Indication that for the currently logged-in account, the data is generally read-only. */
isReadOnly?: boolean | null;
/** Primary partner information. Automatically updated from the storage container Partner. */
partner?: string | null;
}
/**
* Controller for listing and browsing Customer Usecases.
* NOTE: Access save / modify methods is very restricted by design as invoces are created by Palkkaus and cannot be modified by the Customer.
* Typically, you will not be able to save / delete / modify customer invoices in the production environment.
*/
export declare class CustomerInvoiceCrudController extends ApiCrudObjectController {
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/**
* Creates a new DatasetsCrudController
* @ignore
*/
constructor(fullApi: CustomerInvoices, uiHelpers: UiHelpers, $location: angular_2.ILocationService, $routeParams: any);
/**
* Controller initialization
*/
$onInit(): void;
/** Implements the getDefaults of ApiCrudObjectController */
getDefaults(): {
listUrl: string;
detailsUrl: string;
oDataTemplateUrl: string;
oDataOptions: {};
};
}
/** Header level data for the customer invoices. */
declare interface CustomerInvoiceInfo {
/** Status of this invoice entry. */
status?: CustomerInvoiceStatus | null;
/** Count of companies (end-customers) in this invoice. */
companyCount?: number | null;
}
/** Represents a single item in a list of Customer invoices. Customer invoices are service invoices from Palkkaus / Salaxy to customers and partners. */
declare interface CustomerInvoiceListItem {
/** The date when the object was created. */
createdAt?: string | null;
/** The time when the object was last updated.
Typically this should be a logical update by user (UserUpdatedAt in DTO), not technical updates. */
updatedAt?: string | null;
/** Last date of modification of the object. The modification can be produced by the end user or by the system. */
timestamp?: string | null;
/** Person GUID for the owner of the object. */
ownerId?: string | null;
/** Metadata for the owner */
ownerInfo?: AccountInIndex | null;
/** The main status depending on the type of the object. */
status?: CustomerInvoiceStatus | null;
/** The back office status depending on the type of the object. */
backOfficeStatus?: string | null;
/** When the event started. Typically, this is the CreatedAt date, but it may be something else. */
startAt?: string | null;
/** This is the end date of the event.
Typically, it is the UserUpdatedAt date, but it may be something else - e.g PaidAt for the calculation. */
endAt?: string | null;
/** Gross salary if that is relevant to the transaction. */
grossSalary?: number | null;
/** This is the payment from the Owner point-of-view:
Total payment for the Employer and Net salary for the Worker in the case of a calculation.
Only add here the payment, if the payment is really made. */
payment?: number | null;
/** Estimated fee of the transaction to Palkkaus.fi. */
fee?: number | null;
/** The GUID for the other party. Currently, this is always the PersonID. */
otherId?: string | null;
/** The other party (usually a Person) that is involved in the event (e.g Worker if this is a Salary payment by Employer). */
otherPartyInfo?: AccountInIndex | null;
/** A very short description describing the object as an event. E.g. "Paid salary" */
shortText?: string | null;
/** Business object ids related to this object. E.g. calculations and payrolls in the payment. */
businessObjects?: string[] | null;
/** This is valid for calculations only. The estimated date of salary in worker. */
salaryDate?: string | null;
/** Business data to include further information of the object. */
data?: CustomerInvoiceListItemData | null;
/** Version number. May be used in conflicts */
versionNumber?: number | null;
/** Salaxy uri of the resource. */
uri?: string | null;
/** Workflow flags for the object.
Only workflow events with API supported message types are listed. */
flags?: string[] | null;
/** Workflow messages for the object.
Only workflow events with API supported message types are listed.
Shown in format "[MessageType]:[Message] ([User] at [UTC-time])" */
messages?: string[] | null;
/** Sub category for the payload. E.g. Payment Category, MoneyTransfer Source. */
entityType?: string | null;
/** The date for the actual period for which this object is done. */
logicalDate?: string | null;
/** Reference information. E.g. Payment or MoneyTransfer reference number. */
reference?: string | null;
/** External id for the object in 3rd party system. */
externalId?: string | null;
/** Identifier of the object. */
id?: string | null;
/** Owner ID for this data */
owner?: string | null;
/** Indication that for the currently logged-in account, the data is generally read-only. */
isReadOnly?: boolean | null;
/** Primary partner information. Automatically updated from the storage container Partner. */
partner?: string | null;
}
/** Customer Invoice specific business data for index. */
declare interface CustomerInvoiceListItemData {
/** Number of end-companies in the invoice. */
companyCount?: number | null;
}
/**
* Provides CRUD access for Customer invoices
*/
declare class CustomerInvoices extends CrudApiBase {
/**
* For NG1-dependency injection
* @ignore
*/
static $inject: string[];
/** Base URL for details etc. */
protected baseUrl: string;
constructor(ajax: Ajax);
/** Client-side (synchronous) method for getting a new blank item as bases for UI binding. */
getBlank(): CustomerInvoice;
/**
* Saves an item to the storage.
* NOTE: Access to this method is very restricted by design as invoces are created by Palkkaus and cannot be modified by the Customer.
* Typically, you will not be able to save customer invoices in the production environment.
* @param itemToSave - The item that is updated/inserted.
* @returns A Promise with result data as saved to the storage (contains id, createAt, owner etc.).
*/
save(itemToSave: CustomerInvoice): Promise;
}
/** CustomerInvoiceStatus enumeration */
declare enum CustomerInvoiceStatus {
Undefined = "undefined",
Forecast = "forecast",
Preview = "preview",
WaitingPalkkaus = "waitingPalkkaus",
Unread = "unread",
Read = "read",
PaymentStarted = "paymentStarted",
Warning = "warning",
Paid = "paid",
Canceled = "canceled",
Error = "error"
}
/** Represents the data that is the bases for invoicing e.g. calculations, monthly active users etc. */
declare interface CustomerInvoicingBases {
id?: string | null;
date?: string | null;
product?: string | null;
companyId?: string | null;
partnerId?: string | null;
amount?: number | null;
meta?: {
[key: string]: any;
} | null;
}
/**
* Wizard for Creating a new Palkkaus.fi company account by accountant
*/
export declare class CustomerOnboardingController extends WizardController {
private onboardingService;
private sessionService;
private authorizedAccountService;
private ajax;
private $location;
/**
* For NG-dependency injection
* @ignore
*/
static $inject: string[];
/** Form data validity */
formDataValidity: boolean;
/** If true, step is proceeding */
isStepProceeding: boolean;
/** Copy indicator */
linkCopied: boolean;
constructor($scope: angular_2.IScope, wizardService: WizardService, onboardingService: OnboardingService, sessionService: SessionService, authorizedAccountService: AuthorizedAccountService, ajax: Ajax, $location: angular_2.ILocationService, data: any);
/**
* Implement IController
*/
$onInit(): void;
/** Company wizard configuration */
getWizardSteps(): WizardStep[];
/**
* The onboarding model is provided by the onboarding service.
*
*/
get model(): Onboarding;
/**
* Navigates to the next step if possible and saves the data.
*/
goNext(): void;
/**
* Navigates to the previous step if possible and saves the data.
*/
goPrevious(): void;
/** Returns true if user can go forward in wizard */
get canGoNext(): boolean;
/** Sharing link for singing. */
get signingLink(): string;
/** Sharing link for authorization mail. */
get sharingLink(): string;
/** Copies link to clipboard */
copyLink(link: string): void;
/** Mailto-link with sharing link. */
get mailtoLink(): string;
/**
* Existing company alert.
*/
get existingCompanyAlert(): boolean;
/**
* Proceeds to company selection in e-authorization service.
*/
goToCompanySelection(): void;
/** Commit onboarding */
commit(): void;
/** Sets pension fields (defaults) after user input. */
checkPensionCompanySelection(): void;
/** Sets insurance fields (defaults) after user input. */
checkInsuranceCompanySelection(): void;
/**
* Saves the data to server
*/
save(): Promise;
/**
* Sets the pension contract number as a test number according to the selected company.
*/
setPensionNumberForTest(): void;
/**
* Launches the wizard.
* @param accountId Optional account id.
*/
launch(accountId?: string): Promise;
}
/** CustomerWebApp enumeration */
declare enum CustomerWebApp {
Palkkaus = "palkkaus",
CustomSso = "customSso",
CustomPalkkaus = "customPalkkaus",
NoCustomerUi = "noCustomerUi"
}
/**
* Base component for mass data loading.
*/
export declare abstract class DataImportComponentBase extends ComponentBase {
/**
* The following component properties (attributes in HTML) are bound to the Controller.
* For detailed functionality, refer to [controller](#controller) implementation.
*/
bindings: {};
/** No controller */
controller: null;
/** The default template for the component. */
defaultTemplate: string;
}
/**
* Controller for data imports.
*/
export declare abstract class DataImportControllerBase implements angular_2.IController {
/** JsonSchemaService */
protected jsonSchemaService: JsonSchemaService;
/** Angular timeout service */
protected $timeout: angular_2.ITimeoutService;
/** Tabular source row data. */
sourceData: Array;
/** Target objects mapped from source data, and which should be imported */
targetData: Array;
/** Table control*/
table: any;
/** Current action */
action: "upload" | "validate" | "import";
/** Current import count */
importCurrent: number;
/** Total import count */
importTotal: number;
/** Flag for import in progress. */
isImporting: boolean;
/** Flag for cancel. */
isCanceled: boolean;
/** Optional options */
options: TOptions;
/** Template for options */
optionsTemplate: string;
/** Data mapper */
protected mapper: DataMapper_2;
/**
* Creates a new DataImportController
* @ignore
*/
constructor(
/** JsonSchemaService */
jsonSchemaService: JsonSchemaService,
/** Angular timeout service */
$timeout: angular_2.ITimeoutService);
/**
* Implement IController
*/
$onInit(): Promise;
/**
* Download data or template
* @param helpData Help data in the form or array of arrays
*/
download(helpData?: null): Promise;
/** Upload rows to table */
upload(files: any[]): Promise;
/** Reset data */
reset(setData?: boolean): void;
/** Paste data */
paste(): Promise;
/** Map and validate data */
validate(): Promise;
/** Returns extra validator */
getExtraValidators(): Array<{
validate: () => void;
buttonLabel: string;
}>;
/** Enrichs data */
getDataEnrichers(): Array<{
enrich: () => void;
buttonLabel: string;
}>;
/** Cancel import */
cancel(): void;
/**
* Options validation. If required, override this method in the inheritied class.
*/
hasInvalidOptions(): boolean;
/** Import data */
abstract import(): any;
/** Help */
abstract help(): any;
/** Returns number of undefined validation rows */
get validationUndoneRows(): number;
/** Returns number of success rows */
get validationSuccessRows(): number;
/** Returns number of error rows */
get validationErrorRows(): number;
/** Returns number of success rows */
get importSuccessRows(): number;
/** Returns number of error rows */
get importErrorRows(): number;
/** Returns number of warning rows */
get importWarningRows(): number;
/** Returns number of success rows */
get importIgnoredRows(): number;
protected getFieldTitle(field: string): string;
protected getEditor(field: string): any;
protected validateField(field: string, value: any): boolean;
/** Default help data for columns. */
protected getDefaultHelpDataForColumns(): any[];
private setFieldValue;
/** Returns the import mapper */
protected abstract getImportMapper(): Promise>;
private getImportStatusRows;
private init;
private hasData;
}
/**
* User interface for debugging definition and values.
* @example
* ```html
*