- 
                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 4 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.
      
    
  
        
          
          
            88 changes: 88 additions & 0 deletions
          
          88 
        
  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,88 @@ | ||
| 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", | ||
| ], | ||
| optional: true, | ||
| }, | ||
| accountingPackageId: { | ||
| propDefinition: [ | ||
| app, | ||
| "accountingPackageId", | ||
| ], | ||
| optional: true, | ||
| }, | ||
| billingRate: { | ||
| propDefinition: [ | ||
| app, | ||
| "billingRate", | ||
| ], | ||
| description: "The billing rate for the client", | ||
| optional: true, | ||
| }, | ||
| isActive: { | ||
| propDefinition: [ | ||
| app, | ||
| "isActive", | ||
| ], | ||
| description: "Indicates whether the client is currently active", | ||
| optional: true, | ||
| }, | ||
| isEligibleTimeOffAllocation: { | ||
| propDefinition: [ | ||
| app, | ||
| "isEligibleTimeOffAllocation", | ||
| ], | ||
| description: "Determines if the client is eligible for time-off allocation", | ||
| optional: true, | ||
| }, | ||
| name: { | ||
| propDefinition: [ | ||
| app, | ||
| "name", | ||
| ], | ||
| description: "The name of the client", | ||
| }, | ||
| notes: { | ||
| propDefinition: [ | ||
| app, | ||
| "notes", | ||
| ], | ||
| description: "Additional information related to the client", | ||
| optional: true, | ||
| }, | ||
| 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; | ||
| }, | ||
| }; | ||
  
    
      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,154 @@ | ||
| 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", | ||
| ], | ||
| optional: true, | ||
| }, | ||
| billingRate: { | ||
| propDefinition: [ | ||
| app, | ||
| "billingRate", | ||
| ], | ||
| description: "The billing rate for the job", | ||
| optional: true, | ||
| }, | ||
| isActive: { | ||
| propDefinition: [ | ||
| app, | ||
| "isActive", | ||
| ], | ||
| description: "Indicates whether the job is currently active", | ||
| optional: true, | ||
| }, | ||
| isEligibleTimeOffAllocation: { | ||
| propDefinition: [ | ||
| app, | ||
| "isEligibleTimeOffAllocation", | ||
| ], | ||
| description: "Determines if the job is eligible for time-off allocation", | ||
| optional: true, | ||
| }, | ||
| name: { | ||
| propDefinition: [ | ||
| app, | ||
| "name", | ||
| ], | ||
| description: "The name of the job", | ||
| }, | ||
| notes: { | ||
| propDefinition: [ | ||
| app, | ||
| "notes", | ||
| ], | ||
| description: "Additional information related to the job", | ||
| optional: true, | ||
| }, | ||
| limit: { | ||
| propDefinition: [ | ||
| app, | ||
| "limit", | ||
| ], | ||
| optional: true, | ||
| }, | ||
| offset: { | ||
| propDefinition: [ | ||
| app, | ||
| "offset", | ||
| ], | ||
| optional: true, | ||
| }, | ||
| clientId: { | ||
| propDefinition: [ | ||
| app, | ||
| "clientId", | ||
| (c) => ({ | ||
| offset: c.offset, | ||
| limit: c.limit, | ||
| }), | ||
| ], | ||
| }, | ||
| includeInRm: { | ||
| propDefinition: [ | ||
| app, | ||
| "includeInRm", | ||
| ], | ||
| optional: true, | ||
| }, | ||
| isBillable: { | ||
| propDefinition: [ | ||
| app, | ||
| "isBillable", | ||
| ], | ||
| optional: true, | ||
| }, | ||
| jobNumber: { | ||
| propDefinition: [ | ||
| app, | ||
| "jobNumber", | ||
| ], | ||
| }, | ||
| startDate: { | ||
| propDefinition: [ | ||
| app, | ||
| "startDate", | ||
| ], | ||
| description: "The start date of the job, i.e.: `2020-01-01`", | ||
| optional: true, | ||
| }, | ||
| endDate: { | ||
| propDefinition: [ | ||
| app, | ||
| "endDate", | ||
| ], | ||
| optional: true, | ||
| }, | ||
| timeRequiresApproval: { | ||
| propDefinition: [ | ||
| app, | ||
| "timeRequiresApproval", | ||
| ], | ||
| optional: true, | ||
| }, | ||
| useCompanyBillingRate: { | ||
| propDefinition: [ | ||
| app, | ||
| "useCompanyBillingRate", | ||
| ], | ||
| optional: true, | ||
| }, | ||
| }, | ||
| 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 | ||
| }; | ||
        
          
          
            113 changes: 113 additions & 0 deletions
          
          113 
        
  components/clicktime/actions/create-user/create-user.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,113 @@ | ||
| 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", | ||
| optional: true, | ||
| }, | ||
| isActive: { | ||
| propDefinition: [ | ||
| app, | ||
| "isActive", | ||
| ], | ||
| description: "Indicates whether the user is currently active", | ||
| optional: true, | ||
| }, | ||
| 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`", | ||
| optional: true, | ||
| }, | ||
| costModel: { | ||
| propDefinition: [ | ||
| app, | ||
| "costModel", | ||
| ], | ||
| optional: true, | ||
| }, | ||
| costRate: { | ||
| propDefinition: [ | ||
| app, | ||
| "costRate", | ||
| ], | ||
| optional: true, | ||
| }, | ||
| email: { | ||
| propDefinition: [ | ||
| app, | ||
| "email", | ||
| ], | ||
| }, | ||
| limit: { | ||
| propDefinition: [ | ||
| app, | ||
| "limit", | ||
| ], | ||
| optional: true, | ||
| }, | ||
| offset: { | ||
| propDefinition: [ | ||
| app, | ||
| "offset", | ||
| ], | ||
| optional: true, | ||
| }, | ||
| employmentTypeId: { | ||
| propDefinition: [ | ||
| app, | ||
| "employmentTypeId", | ||
| (c) => ({ | ||
| offset: c.offset, | ||
| limit: c.limit, | ||
| }), | ||
| ], | ||
| optional: true, | ||
| }, | ||
| role: { | ||
| propDefinition: [ | ||
| app, | ||
| "role", | ||
| ], | ||
| optional: true, | ||
| }, | ||
| }, | ||
| 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.