-
Notifications
You must be signed in to change notification settings - Fork 5.5k
[Components] clicktime #13379 #15657
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
2fdbcaf
Added actions
lcaresia dc28f97
Done requests changes
lcaresia ef466b0
Merge branch 'master' into issue-13379
lcaresia cf76d48
Done requests changes
lcaresia af3dba5
prop pagination
michelle0927 a850018
pnpm-lock.yaml
michelle0927 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
82 changes: 82 additions & 0 deletions
82
components/clicktime/actions/create-client/create-client.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| import app from "../../clicktime.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "clicktime-create-client", | ||
| name: "Create Client", | ||
| description: "Create a Client on ClickTime [See the documentation](https://developer.clicktime.com/docs/api/#/Clients)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| app, | ||
| clientNumber: { | ||
| propDefinition: [ | ||
| app, | ||
| "clientNumber", | ||
| ], | ||
| }, | ||
| accountingPackageId: { | ||
| propDefinition: [ | ||
| app, | ||
| "accountingPackageId", | ||
| ], | ||
| }, | ||
| billingRate: { | ||
| propDefinition: [ | ||
| app, | ||
| "billingRate", | ||
| ], | ||
| description: "The billing rate for the client", | ||
| }, | ||
| isActive: { | ||
| propDefinition: [ | ||
| app, | ||
| "isActive", | ||
| ], | ||
| description: "Indicates whether the client is currently active", | ||
| }, | ||
| isEligibleTimeOffAllocation: { | ||
| propDefinition: [ | ||
| app, | ||
| "isEligibleTimeOffAllocation", | ||
| ], | ||
| description: "Determines if the client is eligible for time-off allocation", | ||
| }, | ||
| name: { | ||
| propDefinition: [ | ||
| app, | ||
| "name", | ||
| ], | ||
| description: "The name of the client", | ||
| }, | ||
| notes: { | ||
| propDefinition: [ | ||
| app, | ||
| "notes", | ||
| ], | ||
| description: "Additional information related to the client", | ||
| }, | ||
| shortName: { | ||
| propDefinition: [ | ||
| app, | ||
| "shortName", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.app.createClient({ | ||
| $, | ||
| data: { | ||
| AccountingPackageID: this.accountingPackageId, | ||
| BillingRate: this.billingRate, | ||
| ClientNumber: this.clientNumber, | ||
| IsActive: this.isActive, | ||
| IsEligibleTimeOffAllocation: this.isEligibleTimeOffAllocation, | ||
| Name: this.name, | ||
| Notes: this.notes, | ||
| ShortName: this.shortName, | ||
| }, | ||
| }); | ||
| $.export("$summary", `Successfully created Client with the ID: ${response.data.ID}`); | ||
| return response; | ||
| }, | ||
| }; | ||
michelle0927 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,125 @@ | ||
| import app from "../../clicktime.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "clicktime-create-job", | ||
| name: "Create Job", | ||
| description: "Create a Job on Clicktime. [See the documentation](https://developer.clicktime.com/docs/api/#/operations/Jobs/CreateJob)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| app, | ||
| accountingPackageId: { | ||
michelle0927 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| propDefinition: [ | ||
| app, | ||
| "accountingPackageId", | ||
| ], | ||
| }, | ||
| billingRate: { | ||
| propDefinition: [ | ||
| app, | ||
| "billingRate", | ||
| ], | ||
| description: "The billing rate for the job", | ||
| }, | ||
| isActive: { | ||
| propDefinition: [ | ||
| app, | ||
| "isActive", | ||
| ], | ||
| description: "Indicates whether the job is currently active", | ||
| }, | ||
| isEligibleTimeOffAllocation: { | ||
| propDefinition: [ | ||
| app, | ||
| "isEligibleTimeOffAllocation", | ||
| ], | ||
| description: "Determines if the client is eligible for time-off allocation", | ||
michelle0927 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| }, | ||
| name: { | ||
| propDefinition: [ | ||
| app, | ||
| "name", | ||
| ], | ||
| description: "The name of the job", | ||
| }, | ||
| notes: { | ||
| propDefinition: [ | ||
| app, | ||
| "notes", | ||
| ], | ||
| description: "Additional information related to the job", | ||
| }, | ||
| clientId: { | ||
| propDefinition: [ | ||
| app, | ||
| "clientId", | ||
| ], | ||
| }, | ||
| includeInRm: { | ||
| propDefinition: [ | ||
| app, | ||
| "includeInRm", | ||
| ], | ||
| }, | ||
| isBillable: { | ||
| propDefinition: [ | ||
| app, | ||
| "isBillable", | ||
| ], | ||
| }, | ||
| jobNumber: { | ||
| propDefinition: [ | ||
| app, | ||
| "jobNumber", | ||
| ], | ||
| }, | ||
| startDate: { | ||
| propDefinition: [ | ||
| app, | ||
| "startDate", | ||
| ], | ||
| description: "The start date of the job, i.e.: `2020-01-01`", | ||
| }, | ||
| endDate: { | ||
| propDefinition: [ | ||
| app, | ||
| "endDate", | ||
| ], | ||
| }, | ||
| timeRequiresApproval: { | ||
| propDefinition: [ | ||
| app, | ||
| "timeRequiresApproval", | ||
| ], | ||
| }, | ||
| useCompanyBillingRate: { | ||
| propDefinition: [ | ||
| app, | ||
| "useCompanyBillingRate", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.app.createJob({ | ||
| $, | ||
| data: { | ||
| AccountingPackageID: this.accountingPackageId, | ||
| BillingRate: this.billingRate, | ||
| IsActive: this.isActive, | ||
| IsEligibleTimeOffAllocation: this.isEligibleTimeOffAllocation, | ||
| Name: this.name, | ||
| Notes: this.notes, | ||
| ClientID: this.clientId, | ||
| EndDate: this.endDate, | ||
| IncludeInRM: this.includeInRm, | ||
| IsBillable: this.isBillable, | ||
| JobNumber: this.jobNumber, | ||
| StartDate: this.startDate, | ||
| TimeRequiresApproval: this.timeRequiresApproval, | ||
| UseCompanyBillingRate: this.useCompanyBillingRate, | ||
| }, | ||
| }); | ||
| $.export("$summary", `Successfully created Job with ID: ${response.data.ID}`); | ||
| return response; | ||
| }, | ||
michelle0927 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| import app from "../../clicktime.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "clicktime-create-user", | ||
| name: "Create User", | ||
| description: "Create an User on ClickTime. [See the documentation](https://developer.clicktime.com/docs/api/#/operations/Users/CreateManagedUser)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| app, | ||
| billingRate: { | ||
michelle0927 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| propDefinition: [ | ||
| app, | ||
| "billingRate", | ||
| ], | ||
| description: "The billing rate for the user", | ||
| }, | ||
| isActive: { | ||
| propDefinition: [ | ||
| app, | ||
| "isActive", | ||
| ], | ||
| description: "Indicates whether the user is currently active", | ||
| }, | ||
| name: { | ||
| propDefinition: [ | ||
| app, | ||
| "name", | ||
| ], | ||
| description: "The name of the user", | ||
| }, | ||
| startDate: { | ||
| propDefinition: [ | ||
| app, | ||
| "startDate", | ||
| ], | ||
| description: "The start date of the user, i.e.: `2020-01-01`", | ||
| }, | ||
| costModel: { | ||
| propDefinition: [ | ||
| app, | ||
| "costModel", | ||
| ], | ||
| }, | ||
| costRate: { | ||
| propDefinition: [ | ||
| app, | ||
| "costRate", | ||
| ], | ||
| }, | ||
| email: { | ||
| propDefinition: [ | ||
| app, | ||
| "email", | ||
| ], | ||
| }, | ||
| employmentTypeId: { | ||
| propDefinition: [ | ||
| app, | ||
| "employmentTypeId", | ||
| ], | ||
| }, | ||
| role: { | ||
| propDefinition: [ | ||
| app, | ||
| "role", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.app.createUser({ | ||
| $, | ||
| data: { | ||
| BillingRate: this.billingRate, | ||
| IsActive: this.isActive, | ||
| Name: this.name, | ||
| StartDate: this.startDate, | ||
| CostModel: this.costModel, | ||
| CostRate: this.costRate, | ||
| Email: this.email, | ||
| EmploymentTypeID: this.employmentTypeId, | ||
| Role: this.role, | ||
| }, | ||
| }); | ||
| $.export("$summary", `Successfully created User with the ID: ${response.data.ID}`); | ||
| return response; | ||
| }, | ||
michelle0927 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| }; | ||
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.