UNPKG

@salaxy/ng1

Version:

AngularJS libraries for Salaxy platform (Palkkaus.fi)

1,348 lines (1,300 loc) 1.95 MB
/// <reference types="angular" /> /// <reference types="ng-file-upload" /> 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 * <salaxy-absence-periods></salaxy-absence-periods> * ``` */ 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 * <salaxy-absence-periods></salaxy-absence-periods> * ``` */ 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<WorkerAbsences_2, AbsencePeriod> { /** 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<WorkerAbsences_2, ApiListItem> { /** * 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<WorkerAbsences_2[]>; /** * Gets the Absences for a specific employment relation. * @param employmentId Identifier for the Employment relation. * @returns A Promise with Absences. */ getForEmployment(employmentId: string): Promise<WorkerAbsences_2>; /** * 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<WorkerAbsences_2[]>; } /** * Payment Settings * @example * ```html * <salaxy-accountant></salaxy-accountant> * ``` */ 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<void | undefined>; /** Removes pricing partner using confirmation dialog. */ showConfirmPartnerRemoval(): void; /** Save current accountant. This mainly for email address. */ save(): Promise<void>; 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<any>; /** Launches company wizard. */ launchAccountantWizard(): Promise<any> | undefined; private readTokenFromUrl; } /** * Handles user interaction for viewing and modifying authorized and authorizing accounts. */ export declare class AccountAuthorizationController extends CrudControllerBase<AuthorizedAvatar> { 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<AuthorizedAvatar>; /** * 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 * <salaxy-account-authorization-person></salaxy-account-authorization-person> * ``` */ 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 * <salaxy-account-avatar-edit></salaxy-account-avatar-edit> * ``` */ 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 * <salaxy-account-avatar-edit-person></salaxy-account-avatar-edit-person> * ``` */ 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 * <salaxy-account-contact-edit></salaxy-account-contact-edit> * ``` */ 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 * <salaxy-account-contact-edit-person></salaxy-account-contact-edit-person> * ``` */ 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 * <salaxy-account-details-edit-person></salaxy-account-details-edit-person> * ``` */ 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 * <salaxy-account-details-person></salaxy-account-details-person> * ``` */ 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 * <salaxy-account-info></salaxy-account-info> * ``` */ 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 * <salaxy-account-info-person view-type="details" ng-model=""></salaxy-account-info-person> * ``` */ 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<void>; 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 * <salaxy-accounting-holiday-debt-report-query></salaxy-accounting-holiday-debt-report-query> * ``` */ 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<void>; /** 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<BlobFile, FileListItem> { 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<void>; /** 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<void>; /** 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<void>; /** 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 * <salaxy-accounting-report-list></salaxy-accounting-report-list> * ``` */ 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 * <salaxy-accounting-report-query></salaxy-accounting-report-query> * ``` */ 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<void>; /** 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 * <salaxy-accounting-report-rows data="$ctrl.data"></salaxy-accouting-report-rows> * ``` */ 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 * <salaxy-accounting-report-tools reader="$ctrl.dataReader"></salaxy-accouting-report-tools> * ``` */ 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<void>; /** 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(read