{
"version": 3,
"sources": ["apps/frontend/src/app/gapi/services/gapi.service.ts", "apps/frontend/src/app/projects-sale-events/components/sale-event-dialog.component.ts"],
"sourcesContent": ["import { Injectable } from '@angular/core';\nimport { NgGapiClientConfig } from 'ng-gapi';\n\nconst gapi: any = window.gapi;\nexport const gapiClientConfig: NgGapiClientConfig = {\n client_id: '117943661390-lefo445ao3983f2cmghf3fpd0jlh6ka3.apps.googleusercontent.com',\n discoveryDocs: [\"https://www.googleapis.com/discovery/v1/apis/calendar/v3/rest\"],\n scope: [\n \"https://www.googleapis.com/auth/drive\",\n \"https://www.googleapis.com/auth/spreadsheets\",\n \"https://www.googleapis.com/auth/drive\",\n \"https://www.googleapis.com/auth/calendar\"\n ].join(\" \")\n};\n\n@Injectable({\n providedIn: 'root'\n})\nexport class GapiService {\n\n /**\n * Insert event from eventInformation\n */\n async createCalendarEvents(eventInformation: any) {\n await gapi.load('client:auth2', () => {\n gapi.client.init(gapiClientConfig).then(() => {\n if (!gapi.auth2.getAuthInstance().isSignedIn.get()) gapi.auth2.getAuthInstance().signIn();\n gapi.client.load('calendar', 'v3', () => {\n gapi.client.calendar.events.insert({\n 'calendarId': 'primary',\n 'resource': eventInformation\n }).execute((event: any) => {\n // console.log(JSON.stringify('Event created: ' + event.htmlLink, null, 2));\n });\n });\n });\n });\n }\n\n /**\n * Print the summary and start datetime/date of the next ten events in\n * the authorized user's calendar. If no events are found an\n * appropriate message is printed.\n */\n async listUpcomingEvents(upComingEvents: any) {\n await gapi.load('client:auth2', () => {\n gapi.client.init(gapiClientConfig).then(() => {\n if (!gapi.auth2.getAuthInstance().isSignedIn.get()) gapi.auth2.getAuthInstance().signIn();\n gapi.client.load('calendar', 'v3', () => {\n gapi.client.calendar.events.list(upComingEvents).then((response: any) => {\n return response.result.items;\n });\n });\n });\n });\n }\n\n}\n", "import { Component, Inject, OnInit } from '@angular/core';\nimport { MAT_LEGACY_DIALOG_DATA, MatLegacyDialogRef } from '@angular/material/legacy-dialog';\nimport { mapId, prepareRequest, safeMapId, sortBy, includes, deepCopy } from '@proman/utils';\nimport { Entity } from '@proman/services/entity.service';\nimport { QueryExpressionService } from '@proman/services/query-expression.service';\nimport { ModelItemInterface, ModelService } from '@proman/services/model.service';\nimport { PromanStateService } from '@frontend/shared/services/proman-state.service';\nimport { Customer, SaleEvent, SaleOpportunity } from '@proman/interfaces/entity-interfaces';\nimport { GapiService } from '../../gapi/services/gapi.service';\nimport { Store } from '@ngrx/store';\nimport { CurrUser } from '@proman/interfaces/object-interfaces';\nimport { getCurrUser } from '@proman/store/curr-user';\nimport { CreateOnlineMeetingInterface } from '@proman/resources/create_online_meeting';\n\n@Component({\n selector: 'pm-sale-template-dialog',\n template: `\n