Compare commits
1 Commits
form-row-c
...
use-tcpdf-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
685bbf4375 |
@@ -3206,8 +3206,7 @@
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/3755203?v=4",
|
||||
"profile": "https://github.com/swift2512",
|
||||
"contributions": [
|
||||
"bug",
|
||||
"code"
|
||||
"bug"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
137
.github/ISSUE_TEMPLATE/Bug-Report.yml
vendored
137
.github/ISSUE_TEMPLATE/Bug-Report.yml
vendored
@@ -1,137 +0,0 @@
|
||||
name: Bug Report
|
||||
description: File a bug report.
|
||||
title: "[Bug]: "
|
||||
projects: ["grokability/snipe-it"]
|
||||
type: bug
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this bug report! Most issues are documented in the [Snipe-IT repository's issues](https://github.com/grokability/snipe-it/issues) or in the official [Common Issues section of the Documentation](https://snipe-it.readme.io/docs/common-issues#/) and are due to the following:
|
||||
|
||||
- `.env` misconfiguration
|
||||
- [Server Permissions](https://snipe-it.readme.io/docs/debugging-permissions#/)
|
||||
- [Database Migrations](https://snipe-it.readme.io/docs/database-issues#run-migrations)
|
||||
|
||||
Please make sure you've checked these resources before submitting a new issue. If you find an existing issue, please add your context to it instead of opening a new issue. If your issue is more of a question, consider [opening a new discussion](https://github.com/grokability/snipe-it/discussions) or [pop by our Discord](https://discord.gg/yZFtShAcKk) instead of creating an issue.
|
||||
|
||||
**Please write your bug report in English.** You can use tools like [DeepL](https://www.deepl.com) or [Google Translate](https://translate.google.com/) to translate if necessary.
|
||||
|
||||
**If you choose to upload screenshots or videos (which we always encourage), please make sure they do not contain any sensitive information.**
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: Snipe-IT Version
|
||||
description: What version of Snipe-IT are you seeing this issue on? You can find the version number in the footer of any page in Snipe-IT.
|
||||
placeholder: ex. v8.3.1 - build 19577 (master)
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: db-version
|
||||
attributes:
|
||||
label: MySQL/MariaDB version
|
||||
description: What database are you using, and what version?
|
||||
placeholder: ex. MySQL 5.7
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: install-method
|
||||
attributes:
|
||||
label: How did you install Snipe-IT?
|
||||
options:
|
||||
- Git install
|
||||
- Manual install (downloading zip/tar.gz)
|
||||
- Docker
|
||||
- install.sh
|
||||
- Hosted by Grokability
|
||||
- Other
|
||||
- Not sure
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: what-happened
|
||||
attributes:
|
||||
label: What happened?
|
||||
description: Also tell us, what did you expect to happen?
|
||||
placeholder: Tell us what you see! (Be nice!)
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: browsers
|
||||
attributes:
|
||||
label: What browsers are you seeing the problem on?
|
||||
multiple: true
|
||||
options:
|
||||
- Firefox
|
||||
- Chrome
|
||||
- Safari
|
||||
- Microsoft Edge
|
||||
- Other
|
||||
- type: dropdown
|
||||
id: on-demo
|
||||
attributes:
|
||||
label: Can you reproduce this on the public demo?
|
||||
description: You can check this at https://demo.snipeitapp.com.
|
||||
options:
|
||||
- 'Yes'
|
||||
- 'No'
|
||||
- N/A
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: fmcs
|
||||
attributes:
|
||||
label: Do you have full multiple company support enabled?
|
||||
description: You can check this in your Snipe-IT installation at `Admin Settings > General Settings > Scoping`.
|
||||
options:
|
||||
- 'Yes'
|
||||
- 'No'
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: fmcs-location
|
||||
attributes:
|
||||
label: If you have full multiple company support enabled, do you have location scoping to company enabled?
|
||||
description: You can check this in your Snipe-IT installation at `Admin Settings > General Settings > Scoping`.
|
||||
options:
|
||||
- 'Yes'
|
||||
- 'No'
|
||||
- I do not have full multiple company support enabled
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: server-logs
|
||||
attributes:
|
||||
label: Application log output
|
||||
description: Please copy and paste any relevant log output from `storage/logs/laravel.log`. This will be automatically formatted into code, so no need for backticks.
|
||||
render: shell
|
||||
- type: textarea
|
||||
id: browser-logs
|
||||
attributes:
|
||||
label: Browser console output
|
||||
description: Please copy and paste any relevant log output from your browser console. This will be automatically formatted into code, so no need for backticks.
|
||||
render: shell
|
||||
- type: checkboxes
|
||||
id: common-issues
|
||||
attributes:
|
||||
label: Common Issues
|
||||
description: Please make sure you have done the following before submitting your issue.
|
||||
options:
|
||||
- label: I have searched this repo for existing issues related to my issue (including closed issues)
|
||||
required: true
|
||||
- label: My APP_URL is set correctly in my .env file (including http or https and no trailing slash)
|
||||
required: true
|
||||
- label: I have searched the official Snipe-IT documentation and have checked the Common Issues documentation (where applicable)
|
||||
required: true
|
||||
- label: I have run database migrations (where applicable).
|
||||
required: true
|
||||
- label: I have attached screenshots and/or videos of the issue (where applicable)
|
||||
required: true
|
||||
- type: checkboxes
|
||||
id: terms
|
||||
attributes:
|
||||
label: Code of Conduct
|
||||
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/grokability/snipe-it/blob/master/CODE_OF_CONDUCT.md).
|
||||
options:
|
||||
- label: I agree to follow this project's Code of Conduct
|
||||
required: true
|
||||
38
.github/ISSUE_TEMPLATE/Feature-Request.yml
vendored
38
.github/ISSUE_TEMPLATE/Feature-Request.yml
vendored
@@ -1,38 +0,0 @@
|
||||
name: Feature Request
|
||||
description: Request a new feature.
|
||||
title: "[Feature]: "
|
||||
projects: ["grokability/snipe-it"]
|
||||
type: feature
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this feature request! Please make sure to search the existing issues in this repository to see if your feature has already been requested, and feel free to add your context to any existing requests.
|
||||
|
||||
**Please write your issue in English.** You can use tools like [DeepL](https://www.deepl.com) or [Google Translate](https://translate.google.com/) to translate if necessary.
|
||||
|
||||
**If you choose to upload screenshots or videos (which we always encourage), please make sure they do not contain any sensitive information.**
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: Snipe-IT Version
|
||||
description: What version of Snipe-IT are you currently running? You can find the version number in the footer of any page in Snipe-IT.
|
||||
placeholder: ex. v8.3.1 - build 19577 (master)
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: feature-description
|
||||
attributes:
|
||||
label: How can we help?
|
||||
description: Let us know in detail what feature you'd like to see added. While we can't promise to implement every feature request, we do read every one and take them into consideration when planning future releases.
|
||||
placeholder: Tell us what you'd like to see in Snipe-IT! (Be nice!)
|
||||
validations:
|
||||
required: true
|
||||
- type: checkboxes
|
||||
id: terms
|
||||
attributes:
|
||||
label: Code of Conduct
|
||||
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/grokability/snipe-it/blob/master/CODE_OF_CONDUCT.md).
|
||||
options:
|
||||
- label: I agree to follow this project's Code of Conduct
|
||||
required: true
|
||||
2
.github/workflows/stale.yml
vendored
2
.github/workflows/stale.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
issues: write
|
||||
# pull-requests: write
|
||||
steps:
|
||||
- uses: actions/stale@v10
|
||||
- uses: actions/stale@v9
|
||||
with:
|
||||
debug-only: true
|
||||
ascending: true
|
||||
|
||||
@@ -52,7 +52,7 @@ Thanks goes to all of these wonderful people ([emoji key](https://github.com/ken
|
||||
| [<img src="https://avatars.githubusercontent.com/u/2565989?v=4" width="110px;"/><br /><sub>coach1988</sub>](https://github.com/coach1988)<br />[💻](https://github.com/snipe/snipe-it/commits?author=coach1988 "Code") | [<img src="https://avatars.githubusercontent.com/u/11910225?v=4" width="110px;"/><br /><sub>MrM</sub>](https://github.com/mauro-miatello)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mauro-miatello "Code") | [<img src="https://avatars.githubusercontent.com/u/60405354?v=4" width="110px;"/><br /><sub>koiakoia</sub>](https://github.com/koiakoia)<br />[💻](https://github.com/snipe/snipe-it/commits?author=koiakoia "Code") | [<img src="https://avatars.githubusercontent.com/u/5323832?v=4" width="110px;"/><br /><sub>Mustafa Online</sub>](https://github.com/mustafa-online)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mustafa-online "Code") | [<img src="https://avatars.githubusercontent.com/u/104601439?v=4" width="110px;"/><br /><sub>franceslui</sub>](https://github.com/franceslui)<br />[💻](https://github.com/snipe/snipe-it/commits?author=franceslui "Code") | [<img src="https://avatars.githubusercontent.com/u/125313163?v=4" width="110px;"/><br /><sub>Q4kK</sub>](https://github.com/Q4kK)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Q4kK "Code") | [<img src="https://avatars.githubusercontent.com/u/55590532?v=4" width="110px;"/><br /><sub>squintfox</sub>](https://github.com/squintfox)<br />[💻](https://github.com/snipe/snipe-it/commits?author=squintfox "Code") |
|
||||
| [<img src="https://avatars.githubusercontent.com/u/1380084?v=4" width="110px;"/><br /><sub>Jeff Clay</sub>](https://github.com/jeffclay)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jeffclay "Code") | [<img src="https://avatars.githubusercontent.com/u/52716446?v=4" width="110px;"/><br /><sub>Phil J R</sub>](https://github.com/PP-JN-RL)<br />[💻](https://github.com/snipe/snipe-it/commits?author=PP-JN-RL "Code") | [<img src="https://avatars.githubusercontent.com/u/1496725?v=4" width="110px;"/><br /><sub>i_virus</sub>](https://www.corelight.com/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=chandanchowdhury "Code") | [<img src="https://avatars.githubusercontent.com/u/1020541?v=4" width="110px;"/><br /><sub>Paul Grime</sub>](https://github.com/gitgrimbo)<br />[💻](https://github.com/snipe/snipe-it/commits?author=gitgrimbo "Code") | [<img src="https://avatars.githubusercontent.com/u/922815?v=4" width="110px;"/><br /><sub>Lee Porte</sub>](https://leeporte.co.uk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=LeePorte "Code") | [<img src="https://avatars.githubusercontent.com/u/23613427?v=4" width="110px;"/><br /><sub>BRYAN </sub>](https://github.com/bryanlopezinc)<br />[💻](https://github.com/snipe/snipe-it/commits?author=bryanlopezinc "Code") [⚠️](https://github.com/snipe/snipe-it/commits?author=bryanlopezinc "Tests") | [<img src="https://avatars.githubusercontent.com/u/64061710?v=4" width="110px;"/><br /><sub>U-H-T</sub>](https://github.com/U-H-T)<br />[💻](https://github.com/snipe/snipe-it/commits?author=U-H-T "Code") |
|
||||
| [<img src="https://avatars.githubusercontent.com/u/5395363?v=4" width="110px;"/><br /><sub>Matt Tyree</sub>](https://github.com/Tyree)<br />[📖](https://github.com/snipe/snipe-it/commits?author=Tyree "Documentation") | [<img src="https://avatars.githubusercontent.com/u/292081?v=4" width="110px;"/><br /><sub>Florent Bervas</sub>](http://spoontux.net)<br />[💻](https://github.com/snipe/snipe-it/commits?author=FlorentDotMe "Code") | [<img src="https://avatars.githubusercontent.com/u/4498077?v=4" width="110px;"/><br /><sub>Daniel Albertsen</sub>](https://ditscheri.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=dbakan "Code") | [<img src="https://avatars.githubusercontent.com/u/100710244?v=4" width="110px;"/><br /><sub>r-xyz</sub>](https://github.com/r-xyz)<br />[💻](https://github.com/snipe/snipe-it/commits?author=r-xyz "Code") | [<img src="https://avatars.githubusercontent.com/u/47491036?v=4" width="110px;"/><br /><sub>Steven Mainor</sub>](https://github.com/DrekiDegga)<br />[💻](https://github.com/snipe/snipe-it/commits?author=DrekiDegga "Code") | [<img src="https://avatars.githubusercontent.com/u/65785975?v=4" width="110px;"/><br /><sub>arne-kroeger</sub>](https://github.com/arne-kroeger)<br />[💻](https://github.com/snipe/snipe-it/commits?author=arne-kroeger "Code") | [<img src="https://avatars.githubusercontent.com/u/167117705?v=4" width="110px;"/><br /><sub>Glukose1</sub>](https://github.com/Glukose1)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Glukose1 "Code") |
|
||||
| [<img src="https://avatars.githubusercontent.com/u/1197791?v=4" width="110px;"/><br /><sub>Scarzy</sub>](https://github.com/Scarzy)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Scarzy "Code") | [<img src="https://avatars.githubusercontent.com/u/37372069?v=4" width="110px;"/><br /><sub>setpill</sub>](https://github.com/setpill)<br />[💻](https://github.com/snipe/snipe-it/commits?author=setpill "Code") | [<img src="https://avatars.githubusercontent.com/u/3755203?v=4" width="110px;"/><br /><sub>swift2512</sub>](https://github.com/swift2512)<br />[🐛](https://github.com/snipe/snipe-it/issues?q=author%3Aswift2512 "Bug reports") [💻](https://github.com/snipe/snipe-it/commits?author=swift2512 "Code") | [<img src="https://avatars.githubusercontent.com/u/6136439?v=4" width="110px;"/><br /><sub>Darren Rainey</sub>](https://darrenraineys.co.uk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=DarrenRainey "Code") | [<img src="https://avatars.githubusercontent.com/u/133033121?v=4" width="110px;"/><br /><sub>maciej-poleszczyk</sub>](https://github.com/maciej-poleszczyk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=maciej-poleszczyk "Code") | [<img src="https://avatars.githubusercontent.com/u/143394709?v=4" width="110px;"/><br /><sub>Sebastian Groß</sub>](https://github.com/sgross-emlix)<br />[💻](https://github.com/snipe/snipe-it/commits?author=sgross-emlix "Code") | [<img src="https://avatars.githubusercontent.com/u/41107778?v=4" width="110px;"/><br /><sub>Anouar Touati</sub>](https://github.com/AnouarTouati)<br />[💻](https://github.com/snipe/snipe-it/commits?author=AnouarTouati "Code") |
|
||||
| [<img src="https://avatars.githubusercontent.com/u/1197791?v=4" width="110px;"/><br /><sub>Scarzy</sub>](https://github.com/Scarzy)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Scarzy "Code") | [<img src="https://avatars.githubusercontent.com/u/37372069?v=4" width="110px;"/><br /><sub>setpill</sub>](https://github.com/setpill)<br />[💻](https://github.com/snipe/snipe-it/commits?author=setpill "Code") | [<img src="https://avatars.githubusercontent.com/u/3755203?v=4" width="110px;"/><br /><sub>swift2512</sub>](https://github.com/swift2512)<br />[🐛](https://github.com/snipe/snipe-it/issues?q=author%3Aswift2512 "Bug reports") | [<img src="https://avatars.githubusercontent.com/u/6136439?v=4" width="110px;"/><br /><sub>Darren Rainey</sub>](https://darrenraineys.co.uk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=DarrenRainey "Code") | [<img src="https://avatars.githubusercontent.com/u/133033121?v=4" width="110px;"/><br /><sub>maciej-poleszczyk</sub>](https://github.com/maciej-poleszczyk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=maciej-poleszczyk "Code") | [<img src="https://avatars.githubusercontent.com/u/143394709?v=4" width="110px;"/><br /><sub>Sebastian Groß</sub>](https://github.com/sgross-emlix)<br />[💻](https://github.com/snipe/snipe-it/commits?author=sgross-emlix "Code") | [<img src="https://avatars.githubusercontent.com/u/41107778?v=4" width="110px;"/><br /><sub>Anouar Touati</sub>](https://github.com/AnouarTouati)<br />[💻](https://github.com/snipe/snipe-it/commits?author=AnouarTouati "Code") |
|
||||
| [<img src="https://avatars.githubusercontent.com/u/25596663?v=4" width="110px;"/><br /><sub>aHVzY2g</sub>](https://github.com/aHVzY2g)<br />[💻](https://github.com/snipe/snipe-it/commits?author=aHVzY2g "Code") | [<img src="https://avatars.githubusercontent.com/u/13408130?v=4" width="110px;"/><br /><sub>林博仁 Buo-ren Lin</sub>](https://brlin.me)<br />[💻](https://github.com/snipe/snipe-it/commits?author=brlin-tw "Code") | [<img src="https://avatars.githubusercontent.com/u/18550946?v=4" width="110px;"/><br /><sub>Adugna Gizaw</sub>](https://orbalia.pythonanywhere.com/)<br />[🌍](#translation-addex12 "Translation") | [<img src="https://avatars.githubusercontent.com/u/760989?v=4" width="110px;"/><br /><sub>Jesse Ostrander</sub>](https://github.com/jostrander)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jostrander "Code") | [<img src="https://avatars.githubusercontent.com/u/31522486?v=4" width="110px;"/><br /><sub>James M</sub>](https://github.com/azmcnutt)<br />[💻](https://github.com/snipe/snipe-it/commits?author=azmcnutt "Code") | [<img src="https://avatars.githubusercontent.com/u/5183146?v=4" width="110px;"/><br /><sub>Fiala06</sub>](https://github.com/Fiala06)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Fiala06 "Code") | [<img src="https://avatars.githubusercontent.com/u/28693782?v=4" width="110px;"/><br /><sub>Nathan Taylor</sub>](https://github.com/ntaylor-86)<br />[💻](https://github.com/snipe/snipe-it/commits?author=ntaylor-86 "Code") |
|
||||
| [<img src="https://avatars.githubusercontent.com/u/16699443?v=4" width="110px;"/><br /><sub>fvollmer</sub>](https://github.com/fvollmer)<br />[💻](https://github.com/snipe/snipe-it/commits?author=fvollmer "Code") | [<img src="https://avatars.githubusercontent.com/u/109086466?v=4" width="110px;"/><br /><sub>36864</sub>](https://github.com/36864)<br />[💻](https://github.com/snipe/snipe-it/commits?author=36864 "Code") | [<img src="https://avatars.githubusercontent.com/u/365751?v=4" width="110px;"/><br /><sub>Daniel O'Connor</sub>](http://clockwerx.blogspot.com/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=CloCkWeRX "Code") | [<img src="https://avatars.githubusercontent.com/u/102852568?v=4" width="110px;"/><br /><sub>BeatSpark</sub>](https://github.com/BeatSpark)<br />[💻](https://github.com/snipe/snipe-it/commits?author=BeatSpark "Code") | [<img src="https://avatars.githubusercontent.com/u/59203607?v=4" width="110px;"/><br /><sub>mrdahbi</sub>](https://github.com/mrdahbi)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mrdahbi "Code") | [<img src="https://avatars.githubusercontent.com/u/6661332?v=4" width="110px;"/><br /><sub>Fabian Schmid</sub>](http://sr.solutions)<br />[💻](https://github.com/snipe/snipe-it/commits?author=chfsx "Code") | [<img src="https://avatars.githubusercontent.com/u/1288116?v=4" width="110px;"/><br /><sub>Chris Olin</sub>](https://www.chrisolin.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=realchrisolin "Code") |
|
||||
| [<img src="https://avatars.githubusercontent.com/u/3803132?v=4" width="110px;"/><br /><sub>Dan</sub>](https://github.com/mnemonicly)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mnemonicly "Code") | [<img src="https://avatars.githubusercontent.com/u/43917728?v=4" width="110px;"/><br /><sub>Nebel</sub>](https://github.com/NebelKreis)<br />[💻](https://github.com/snipe/snipe-it/commits?author=NebelKreis "Code") | [<img src="https://avatars.githubusercontent.com/u/132433803?v=4" width="110px;"/><br /><sub>test1337ahp</sub>](https://github.com/test1337ahp)<br />[💻](https://github.com/snipe/snipe-it/commits?author=test1337ahp "Code") | [<img src="https://avatars.githubusercontent.com/u/1916566?v=4" width="110px;"/><br /><sub>Jonathon Reinhart</sub>](https://github.com/JonathonReinhart)<br />[💻](https://github.com/snipe/snipe-it/commits?author=JonathonReinhart "Code") | [<img src="https://avatars.githubusercontent.com/u/484742?v=4" width="110px;"/><br /><sub>aranar-pro</sub>](https://github.com/aranar-pro)<br />[💻](https://github.com/snipe/snipe-it/commits?author=aranar-pro "Code") | [<img src="https://avatars.githubusercontent.com/u/27019397?v=4" width="110px;"/><br /><sub>Phil</sub>](https://github.com/phil-flip)<br />[💻](https://github.com/snipe/snipe-it/commits?author=phil-flip "Code") | [<img src="https://avatars.githubusercontent.com/u/6473460?v=4" width="110px;"/><br /><sub>Steffy Fort</sub>](https://fe80.fr/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=fe80 "Code") |
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Helpers\Helper;
|
||||
use App\Mail\ExpiringAssetsMail;
|
||||
use App\Mail\ExpiringLicenseMail;
|
||||
use App\Models\Asset;
|
||||
@@ -53,35 +52,19 @@ class SendExpirationAlerts extends Command
|
||||
->filter(fn($item) => !empty($item))
|
||||
->all();
|
||||
// Expiring Assets
|
||||
$assets = Asset::getExpiringWarrantyOrEol($alert_interval);
|
||||
$assets = Asset::getExpiringWarrantee($alert_interval);
|
||||
|
||||
if ($assets->count() > 0) {
|
||||
|
||||
$this->info(trans_choice('mail.assets_warrantee_alert', $assets->count(), ['count' => $assets->count(), 'threshold' => $alert_interval]));
|
||||
Mail::to($recipients)->send(new ExpiringAssetsMail($assets, $alert_interval));
|
||||
|
||||
$this->table(
|
||||
['ID', 'Tag', 'Model', 'Model Number', 'EOL', 'EOL Months', 'Warranty Expires', 'Warranty Months'],
|
||||
$assets->map(fn($item) => ['ID' => $item->id, 'Tag' => $item->asset_tag, 'Model' => $item->model->name, 'Model Number' => $item->model->model_number, 'EOL' => $item->asset_eol_date, 'EOL Months' => $item->model->eol, 'Warranty Expires' => $item->warranty_expires, 'Warranty Months' => $item->warranty_months])
|
||||
);
|
||||
}
|
||||
|
||||
// Expiring licenses
|
||||
$licenses = License::getExpiringLicenses($alert_interval);
|
||||
if ($licenses->count() > 0) {
|
||||
$this->info(trans_choice('mail.license_expiring_alert', $licenses->count(), ['count' => $licenses->count(), 'threshold' => $alert_interval]));
|
||||
Mail::to($recipients)->send(new ExpiringLicenseMail($licenses, $alert_interval));
|
||||
|
||||
$this->table(
|
||||
['ID', 'Name', 'Expires', 'Termination Date'],
|
||||
$licenses->map(fn($item) => ['ID' => $item->id, 'Name' => $item->name, 'Expires' => $item->expiration_date, 'Termination Date' => $item->termination_date])
|
||||
);
|
||||
}
|
||||
|
||||
// Send a message even if the count is 0
|
||||
$this->info(trans_choice('mail.assets_warrantee_alert', $assets->count(), ['count' => $assets->count(), 'threshold' => $alert_interval]));
|
||||
$this->info(trans_choice('mail.license_expiring_alert', $licenses->count(), ['count' => $licenses->count(), 'threshold' => $alert_interval]));
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
if ($settings->alert_email == '') {
|
||||
$this->error('Could not send email. No alert email configured in settings');
|
||||
|
||||
@@ -82,6 +82,13 @@ class Helper
|
||||
'zu' => 'zu-ZA', // Zulu
|
||||
];
|
||||
|
||||
public static function hasRtl($value) {
|
||||
$rtlChar = '/[\x{0590}-\x{083F}]|[\x{08A0}-\x{08FF}]|[\x{FB1D}-\x{FDFF}]|[\x{FE70}-\x{FEFF}]/u';
|
||||
return preg_match($rtlChar, $value) != 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Simple helper to invoke the markdown parser
|
||||
*
|
||||
@@ -95,7 +102,7 @@ class Helper
|
||||
$Parsedown->setSafeMode(true);
|
||||
|
||||
if ($str) {
|
||||
return $Parsedown->text(strip_tags($str));
|
||||
return $Parsedown->text($str);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,7 +112,7 @@ class Helper
|
||||
$Parsedown->setSafeMode(true);
|
||||
|
||||
if ($str) {
|
||||
return $Parsedown->line(strip_tags($str));
|
||||
return $Parsedown->line($str);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -435,34 +442,6 @@ class Helper
|
||||
return $colors[$index];
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a string has any RTL characters
|
||||
* @param $value
|
||||
* @return bool
|
||||
*/
|
||||
public static function hasRtl($string) {
|
||||
$rtlChar = '/[\x{0590}-\x{083F}]|[\x{08A0}-\x{08FF}]|[\x{FB1D}-\x{FDFF}]|[\x{FE70}-\x{FEFF}]/u';
|
||||
return preg_match($rtlChar, $string) != 0;
|
||||
}
|
||||
|
||||
// is chinese, japanese or korean language
|
||||
public static function isCjk($string) {
|
||||
return Helper::isChinese($string) || Helper::isJapanese($string) || Helper::isKorean($string);
|
||||
}
|
||||
|
||||
public static function isChinese($string) {
|
||||
return preg_match("/\p{Han}+/u", $string);
|
||||
}
|
||||
|
||||
public static function isJapanese($string) {
|
||||
return preg_match('/[\x{4E00}-\x{9FBF}\x{3040}-\x{309F}\x{30A0}-\x{30FF}]/u', $string);
|
||||
}
|
||||
|
||||
public static function isKorean($string) {
|
||||
return preg_match('/[\x{3130}-\x{318F}\x{AC00}-\x{D7AF}]/u', $string);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Increases or decreases the brightness of a color by a percentage of the current brightness.
|
||||
*
|
||||
|
||||
@@ -8,22 +8,33 @@ use App\Events\ItemAccepted;
|
||||
use App\Events\ItemDeclined;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Mail\CheckoutAcceptanceResponseMail;
|
||||
use App\Models\Actionlog;
|
||||
use App\Models\Asset;
|
||||
use App\Models\CheckoutAcceptance;
|
||||
use App\Models\Company;
|
||||
use App\Models\Contracts\Acceptable;
|
||||
use App\Models\Setting;
|
||||
use App\Models\User;
|
||||
use App\Models\AssetModel;
|
||||
use App\Models\Accessory;
|
||||
use App\Models\License;
|
||||
use App\Models\Component;
|
||||
use App\Models\Consumable;
|
||||
use App\Notifications\AcceptanceAssetAcceptedNotification;
|
||||
use App\Notifications\AcceptanceAssetAcceptedToUserNotification;
|
||||
use App\Notifications\AcceptanceAssetDeclinedNotification;
|
||||
use Exception;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Str;
|
||||
use App\Http\Controllers\SettingsController;
|
||||
use Carbon\Carbon;
|
||||
use \Illuminate\Contracts\View\View;
|
||||
use \Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use TCPDF;
|
||||
use App\Helpers\Helper;
|
||||
|
||||
class AcceptanceController extends Controller
|
||||
@@ -75,11 +86,6 @@ class AcceptanceController extends Controller
|
||||
public function store(Request $request, $id) : RedirectResponse
|
||||
{
|
||||
$acceptance = CheckoutAcceptance::find($id);
|
||||
$assigned_user = User::find($acceptance->assigned_to_id);
|
||||
$settings = Setting::getSettings();
|
||||
$path_logo = '';
|
||||
$sig_filename='';
|
||||
|
||||
|
||||
if (is_null($acceptance)) {
|
||||
return redirect()->route('account.accept')->with('error', trans('admin/hardware/message.does_not_exist'));
|
||||
@@ -102,84 +108,225 @@ class AcceptanceController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Check for the signature directory
|
||||
* Get the signature and save it
|
||||
*/
|
||||
if (! Storage::exists('private_uploads/signatures')) {
|
||||
Storage::makeDirectory('private_uploads/signatures', 775);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check for the eula-pdfs directory
|
||||
*/
|
||||
if (! Storage::exists('private_uploads/eula-pdfs')) {
|
||||
Storage::makeDirectory('private_uploads/eula-pdfs', 775);
|
||||
}
|
||||
|
||||
|
||||
$item = $acceptance->checkoutable_type::find($acceptance->checkoutable_id);
|
||||
|
||||
|
||||
|
||||
// If signatures are required, make sure we have one
|
||||
if (Setting::getSettings()->require_accept_signature == '1') {
|
||||
|
||||
// The item was accepted, check for a signature
|
||||
if ($request->filled('signature_output')) {
|
||||
$sig_filename = 'siglog-' . Str::uuid() . '-' . date('Y-m-d-his') . '.png';
|
||||
$data_uri = $request->input('signature_output');
|
||||
$encoded_image = explode(',', $data_uri);
|
||||
$decoded_image = base64_decode($encoded_image[1]);
|
||||
Storage::put('private_uploads/signatures/' . $sig_filename, (string)$decoded_image);
|
||||
|
||||
// No image data is present, kick them back.
|
||||
// This mostly only applies to users on super-duper crapola browsers *cough* IE *cough*
|
||||
} else {
|
||||
return redirect()->back()->with('error', trans('general.shitty_browser'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Get the data array ready for the notifications and PDF generation
|
||||
$data = [
|
||||
'item_tag' => $item->asset_tag,
|
||||
'item_name' => $item->name, // this handles licenses seats, which don't have a 'name' field
|
||||
'item_model' => $item->model?->name,
|
||||
'item_serial' => $item->serial,
|
||||
'item_status' => $item->assetstatus?->name,
|
||||
'eula' => $item->getEula(),
|
||||
'note' => $request->input('note'),
|
||||
'check_out_date' => Helper::getFormattedDateObject($acceptance->created_at, 'datetime', false),
|
||||
'accepted_date' => Helper::getFormattedDateObject(now()->format('Y-m-d H:i:s'), 'datetime', false),
|
||||
'declined_date' => Helper::getFormattedDateObject(now()->format('Y-m-d H:i:s'), 'datetime', false),
|
||||
'assigned_to' => $assigned_user->display_name,
|
||||
'site_name' => $settings->site_name,
|
||||
'company_name' => $item->company?->name?? $settings->site_name,
|
||||
'signature' => ($sig_filename) ? storage_path() . '/private_uploads/signatures/' . $sig_filename : null,
|
||||
'logo' => ($settings->acceptance_pdf_logo) ? public_path() . '/uploads/' . $settings->acceptance_pdf_logo : null,
|
||||
'date_settings' => $settings->date_display_format,
|
||||
'admin' => auth()->user()->present()?->fullName,
|
||||
'qty' => $acceptance->qty ?? 1,
|
||||
];
|
||||
|
||||
$display_model = '';
|
||||
$pdf_view_route = '';
|
||||
$pdf_filename = 'accepted-eula-'.date('Y-m-d-h-i-s').'.pdf';
|
||||
$sig_filename='';
|
||||
|
||||
if ($request->input('asset_acceptance') == 'accepted') {
|
||||
|
||||
/**
|
||||
* Check for the eula-pdfs directory
|
||||
*/
|
||||
if (! Storage::exists('private_uploads/eula-pdfs')) {
|
||||
Storage::makeDirectory('private_uploads/eula-pdfs', 775);
|
||||
}
|
||||
|
||||
$pdf_filename = 'accepted-'.$acceptance->checkoutable_id.'-'.$acceptance->display_checkoutable_type.'-eula-'.date('Y-m-d-h-i-s').'.pdf';
|
||||
if (Setting::getSettings()->require_accept_signature == '1') {
|
||||
|
||||
// Check if the signature directory exists, if not create it
|
||||
if (!Storage::exists('private_uploads/signatures')) {
|
||||
Storage::makeDirectory('private_uploads/signatures', 775);
|
||||
}
|
||||
|
||||
// Generate the PDF content
|
||||
$pdf_content = $acceptance->generateAcceptancePdf($data, $acceptance);
|
||||
Storage::put('private_uploads/eula-pdfs/' .$pdf_filename, $pdf_content);
|
||||
// The item was accepted, check for a signature
|
||||
if ($request->filled('signature_output')) {
|
||||
$sig_filename = 'siglog-' . Str::uuid() . '-' . date('Y-m-d-his') . '.png';
|
||||
$data_uri = $request->input('signature_output');
|
||||
$encoded_image = explode(',', $data_uri);
|
||||
$decoded_image = base64_decode($encoded_image[1]);
|
||||
Storage::put('private_uploads/signatures/' . $sig_filename, (string)$decoded_image);
|
||||
|
||||
// Log the acceptance
|
||||
$acceptance->accept($sig_filename, $item->getEula(), $pdf_filename, $request->input('note'));
|
||||
// No image data is present, kick them back.
|
||||
// This mostly only applies to users on super-duper crapola browsers *cough* IE *cough*
|
||||
} else {
|
||||
return redirect()->back()->with('error', trans('general.shitty_browser'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$assigned_user = User::find($acceptance->assigned_to_id);
|
||||
// this is horrible
|
||||
switch($acceptance->checkoutable_type){
|
||||
case 'App\Models\Asset':
|
||||
$pdf_view_route ='account.accept.accept-asset-eula';
|
||||
$asset_model = AssetModel::find($item->model_id);
|
||||
if (!$asset_model) {
|
||||
return redirect()->back()->with('error', trans('admin/models/message.does_not_exist'));
|
||||
}
|
||||
$display_model = $asset_model->name;
|
||||
break;
|
||||
|
||||
case 'App\Models\Accessory':
|
||||
$pdf_view_route ='account.accept.accept-accessory-eula';
|
||||
$accessory = Accessory::find($item->id);
|
||||
$display_model = $accessory->name;
|
||||
break;
|
||||
|
||||
case 'App\Models\LicenseSeat':
|
||||
$pdf_view_route ='account.accept.accept-license-eula';
|
||||
$license = License::find($item->license_id);
|
||||
$display_model = $license->name;
|
||||
break;
|
||||
|
||||
case 'App\Models\Component':
|
||||
$pdf_view_route = 'account.accept.accept-component-eula';
|
||||
$component = Component::find($item->id);
|
||||
$display_model = $component->name;
|
||||
break;
|
||||
|
||||
case 'App\Models\Consumable':
|
||||
$pdf_view_route ='account.accept.accept-consumable-eula';
|
||||
$consumable = Consumable::find($item->id);
|
||||
$display_model = $consumable->name;
|
||||
break;
|
||||
}
|
||||
// if ($acceptance->checkoutable_type == 'App\Models\Asset') {
|
||||
// $pdf_view_route ='account.accept.accept-asset-eula';
|
||||
// $asset_model = AssetModel::find($item->model_id);
|
||||
// $display_model = $asset_model->name;
|
||||
// $assigned_to = User::find($item->assigned_to)->present()->fullName;
|
||||
//
|
||||
// } elseif ($acceptance->checkoutable_type== 'App\Models\Accessory') {
|
||||
// $pdf_view_route ='account.accept.accept-accessory-eula';
|
||||
// $accessory = Accessory::find($item->id);
|
||||
// $display_model = $accessory->name;
|
||||
// $assigned_to = User::find($item->assignedTo);
|
||||
//
|
||||
// }
|
||||
|
||||
/**
|
||||
* Gather the data for the PDF. We fire this whether there is a signature required or not,
|
||||
* since we want the moment-in-time proof of what the EULA was when they accepted it.
|
||||
*/
|
||||
$branding_settings = SettingsController::getPDFBranding();
|
||||
|
||||
$path_logo = "";
|
||||
|
||||
// Check for the PDF logo path and use that, otherwise use the regular logo path
|
||||
if (!is_null($branding_settings->acceptance_pdf_logo)) {
|
||||
$path_logo = public_path() . '/uploads/' . $branding_settings->acceptance_pdf_logo;
|
||||
} elseif (!is_null($branding_settings->logo)) {
|
||||
$path_logo = public_path() . '/uploads/' . $branding_settings->logo;
|
||||
}
|
||||
|
||||
$data = [
|
||||
'item_tag' => $item->asset_tag,
|
||||
'item_model' => $display_model,
|
||||
'item_serial' => $item->serial,
|
||||
'item_status' => $item->assetstatus?->name,
|
||||
'eula' => $item->getEula(),
|
||||
'note' => $request->input('note'),
|
||||
'check_out_date' => Carbon::parse($acceptance->created_at)->format('Y-m-d H:i:s'),
|
||||
'accepted_date' => Carbon::parse($acceptance->accepted_at)->format('Y-m-d H:i:s'),
|
||||
'assigned_to' => $assigned_user->display_name,
|
||||
'company_name' => $branding_settings->site_name,
|
||||
'signature' => ($sig_filename) ? storage_path() . '/private_uploads/signatures/' . $sig_filename : null,
|
||||
'logo' => $path_logo,
|
||||
'date_settings' => $branding_settings->date_display_format,
|
||||
'admin' => auth()->user()->present()?->fullName,
|
||||
];
|
||||
|
||||
|
||||
if ($pdf_view_route!='') {
|
||||
Log::debug($pdf_filename.' is the filename, and the route was specified.');
|
||||
//$pdf = new PDF;
|
||||
|
||||
// set some language dependent data:
|
||||
$lg = Array();
|
||||
$lg['a_meta_charset'] = 'UTF-8';
|
||||
$lg['w_page'] = 'page';
|
||||
|
||||
$pdf = new TCPDF('P', 'mm', 'A4', true, 'UTF-8', false);
|
||||
// $pdf->SetHeaderData(PDF_HEADER_LOGO, 5, PDF_HEADER_TITLE.' 006', PDF_HEADER_STRING);
|
||||
// $pdf->SetHeaderData('https://snipe-it.test/uploads/snipe-logo.png', '5', $data['company_name'], $item->company?->name);
|
||||
//$pdf->headerText = ('Anything you want ' . date('c'));
|
||||
$pdf->setRTL(false);
|
||||
//$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, $data['company_name'], '');
|
||||
$pdf->setLanguageArray($lg);
|
||||
$pdf->SetCreator('Snipe-IT');
|
||||
$pdf->SetAuthor($data['assigned_to']);
|
||||
$pdf->SetTitle('Asset Acceptance: '.$data['item_tag']);
|
||||
// $pdf->SetSubject('Document Subject');
|
||||
//$pdf->SetKeywords('keywords, here');
|
||||
$pdf->SetFont('dejavusans', '', 8, '', true);
|
||||
|
||||
|
||||
$pdf->SetPrintHeader(false);
|
||||
$pdf->SetPrintFooter(false);
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
$pdf->AddPage();
|
||||
$pdf->writeHTML('<img src="'.$path_logo.'" height="30">', true, 0, true, 0, '');
|
||||
|
||||
// $pdf->writeHTML(trans('general.date').': '.date($data['date_settings']), true, 0, true, 0, '');
|
||||
$pdf->writeHTML("<strong>".trans('general.asset_tag').'</strong>: '.$data['item_tag'], true, 0, true, 0, '');
|
||||
$pdf->writeHTML("<strong>".trans('general.asset_model').'</strong>: '.$data['item_model'], true, 0, true, 0, '');
|
||||
$pdf->writeHTML("<strong>".trans('admin/hardware/form.serial').'</strong>: '.$data['item_serial'], true, 0, true, 0, '');
|
||||
$pdf->writeHTML("<strong>".trans('general.assigned_date').'</strong>: '.$data['check_out_date'], true, 0, true, 0, '');
|
||||
$pdf->writeHTML("<strong>".trans('general.assignee').'</strong>: '.$data['assigned_to'], true, 0, true, 0, '');
|
||||
$pdf->Ln();
|
||||
// $html = view($pdf_view_route, $data)->render();
|
||||
// $pdf->writeHTML($html, true, 0, true, 0, '');
|
||||
|
||||
// $eula_lines = explode("\n\n", $item->getEula());
|
||||
$eula_lines = preg_split("/\r\n|\n|\r/", $item->getEula());
|
||||
|
||||
foreach ($eula_lines as $eula_line) {
|
||||
if (Helper::hasRtl($eula_line)) {
|
||||
$pdf->setRTL(true);
|
||||
} else {
|
||||
$pdf->setRTL(false);
|
||||
}
|
||||
$pdf->writeHTML(Helper::parseEscapedMarkedown($eula_line), true, 0, true, 0, '');
|
||||
}
|
||||
$pdf->Ln();
|
||||
$pdf->Ln();
|
||||
$pdf->setRTL(false);
|
||||
$pdf->writeHTML('<br><br>', true, 0, true, 0, '');
|
||||
|
||||
if ($data['note'] != null) {
|
||||
$pdf->writeHTML("<strong>".trans('general.notes') . '</strong>: ' . $data['note'], true, 0, true, 0, '');
|
||||
$pdf->Ln();
|
||||
}
|
||||
|
||||
if ($data['signature'] != null) {
|
||||
|
||||
$pdf->writeHTML('<img src="'.$data['signature'].'" style="max-width: 600px;">', true, 0, true, 0, '');
|
||||
$pdf->writeHTML('<hr>', true, 0, true, 0, '');
|
||||
}
|
||||
|
||||
$pdf->writeHTML("<strong>".trans('general.accepted_date').'</strong>: '.$data['accepted_date'], true, 0, true, 0, '');
|
||||
|
||||
|
||||
$pdf_content = $pdf->Output($pdf_filename, 'S');
|
||||
|
||||
|
||||
//$html = view($pdf_view_route, $data)->render();
|
||||
//$pdf = PDF::writeHTML($html, true, false, true, false, '');
|
||||
Storage::put('private_uploads/eula-pdfs/' .$pdf_filename, $pdf_content);
|
||||
}
|
||||
|
||||
// $acceptance->accept($sig_filename, $item->getEula(), $pdf_filename, $request->input('note'));
|
||||
|
||||
// Send the PDF to the signing user
|
||||
if (($request->input('send_copy') == '1') && ($assigned_user->email !='')) {
|
||||
|
||||
// Add the attachment for the signing user into the $data array
|
||||
$data['file'] = $pdf_filename;
|
||||
$locale = $assigned_user->locale;
|
||||
try {
|
||||
$assigned_user->notify((new AcceptanceAssetAcceptedToUserNotification($data))->locale($assigned_user->locale));
|
||||
$assigned_user->notify((new AcceptanceAssetAcceptedToUserNotification($data))->locale($locale));
|
||||
} catch (\Exception $e) {
|
||||
Log::warning($e);
|
||||
}
|
||||
@@ -193,21 +340,95 @@ class AcceptanceController extends Controller
|
||||
|
||||
$return_msg = trans('admin/users/message.accepted');
|
||||
|
||||
// Item was declined
|
||||
} else {
|
||||
|
||||
for ($i = 0; $i < ($acceptance->qty ?? 1); $i++) {
|
||||
$acceptance->decline($sig_filename, $request->input('note'));
|
||||
/**
|
||||
* Check for the eula-pdfs directory
|
||||
*/
|
||||
if (! Storage::exists('private_uploads/eula-pdfs')) {
|
||||
Storage::makeDirectory('private_uploads/eula-pdfs', 775);
|
||||
}
|
||||
|
||||
if (Setting::getSettings()->require_accept_signature == '1') {
|
||||
|
||||
// Check if the signature directory exists, if not create it
|
||||
if (!Storage::exists('private_uploads/signatures')) {
|
||||
Storage::makeDirectory('private_uploads/signatures', 775);
|
||||
}
|
||||
|
||||
// The item was accepted, check for a signature
|
||||
if ($request->filled('signature_output')) {
|
||||
$sig_filename = 'siglog-' . Str::uuid() . '-' . date('Y-m-d-his') . '.png';
|
||||
$data_uri = $request->input('signature_output');
|
||||
$encoded_image = explode(',', $data_uri);
|
||||
$decoded_image = base64_decode($encoded_image[1]);
|
||||
Storage::put('private_uploads/signatures/' . $sig_filename, (string)$decoded_image);
|
||||
|
||||
// No image data is present, kick them back.
|
||||
// This mostly only applies to users on super-duper crapola browsers *cough* IE *cough*
|
||||
} else {
|
||||
return redirect()->back()->with('error', trans('general.shitty_browser'));
|
||||
}
|
||||
}
|
||||
|
||||
// Format the data to send the declined notification
|
||||
$branding_settings = SettingsController::getPDFBranding();
|
||||
|
||||
// This is the most horriblest
|
||||
switch($acceptance->checkoutable_type){
|
||||
case 'App\Models\Asset':
|
||||
$asset_model = AssetModel::find($item->model_id);
|
||||
$display_model = $asset_model->name;
|
||||
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
|
||||
break;
|
||||
|
||||
case 'App\Models\Accessory':
|
||||
$accessory = Accessory::find($item->id);
|
||||
$display_model = $accessory->name;
|
||||
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
|
||||
break;
|
||||
|
||||
case 'App\Models\LicenseSeat':
|
||||
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
|
||||
break;
|
||||
|
||||
case 'App\Models\Component':
|
||||
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
|
||||
break;
|
||||
|
||||
case 'App\Models\Consumable':
|
||||
$consumable = Consumable::find($item->id);
|
||||
$display_model = $consumable->name;
|
||||
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
|
||||
break;
|
||||
}
|
||||
|
||||
$data = [
|
||||
'item_tag' => $item->asset_tag,
|
||||
'item_model' => $display_model,
|
||||
'item_serial' => $item->serial,
|
||||
'item_status' => $item->assetstatus?->name,
|
||||
'note' => $request->input('note'),
|
||||
'declined_date' => Carbon::parse($acceptance->declined_at)->format('Y-m-d'),
|
||||
'signature' => ($sig_filename) ? storage_path() . '/private_uploads/signatures/' . $sig_filename : null,
|
||||
'assigned_to' => $assigned_to,
|
||||
'company_name' => $branding_settings->site_name,
|
||||
'date_settings' => $branding_settings->date_display_format,
|
||||
];
|
||||
|
||||
if ($pdf_view_route!='') {
|
||||
Log::debug($pdf_filename.' is the filename, and the route was specified.');
|
||||
$pdf = Pdf::loadView($pdf_view_route, $data);
|
||||
Storage::put('private_uploads/eula-pdfs/' .$pdf_filename, $pdf->output());
|
||||
}
|
||||
|
||||
$acceptance->decline($sig_filename, $request->input('note'));
|
||||
$acceptance->notify(new AcceptanceAssetDeclinedNotification($data));
|
||||
Log::debug('New event acceptance.');
|
||||
event(new CheckoutDeclined($acceptance));
|
||||
$return_msg = trans('admin/users/message.declined');
|
||||
}
|
||||
|
||||
|
||||
// Send an email notification if one is requested
|
||||
if ($acceptance->alert_on_response_id) {
|
||||
try {
|
||||
$recipient = User::find($acceptance->alert_on_response_id);
|
||||
@@ -226,10 +447,9 @@ class AcceptanceController extends Controller
|
||||
Log::warning($e);
|
||||
}
|
||||
}
|
||||
|
||||
return redirect()->to('account/accept')->with('success', $return_msg);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3,13 +3,11 @@
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Helpers\Helper;
|
||||
use App\Models\Actionlog;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
||||
use \Illuminate\Http\Response;
|
||||
|
||||
use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
||||
class ActionlogController extends Controller
|
||||
{
|
||||
public function displaySig($filename) : RedirectResponse | Response | bool
|
||||
@@ -41,29 +39,17 @@ class ActionlogController extends Controller
|
||||
|
||||
public function getStoredEula($filename) : Response | BinaryFileResponse | RedirectResponse
|
||||
{
|
||||
$this->authorize('view', \App\Models\Asset::class);
|
||||
|
||||
if ($actionlog = Actionlog::where('filename', $filename)->with('user')->with('target')->firstOrFail()) {
|
||||
|
||||
$this->authorize('view', $actionlog->target);
|
||||
$this->authorize('view', $actionlog->user);
|
||||
|
||||
|
||||
if (config('filesystems.default') == 's3_private') {
|
||||
return redirect()->away(Storage::disk('s3_private')->temporaryUrl('private_uploads/eula-pdfs/' . $filename, now()->addMinutes(5)));
|
||||
}
|
||||
|
||||
if (Storage::exists('private_uploads/eula-pdfs/' . $filename)) {
|
||||
|
||||
if (request()->input('inline') == 'true') {
|
||||
return response()->file(config('app.private_uploads') . '/eula-pdfs/' . $filename);
|
||||
}
|
||||
|
||||
return response()->download(config('app.private_uploads') . '/eula-pdfs/' . $filename);
|
||||
}
|
||||
|
||||
return redirect()->back()->with('error', trans('general.file_does_not_exist'));
|
||||
if (config('filesystems.default') == 's3_private') {
|
||||
return redirect()->away(Storage::disk('s3_private')->temporaryUrl('private_uploads/eula-pdfs/'.$filename, now()->addMinutes(5)));
|
||||
}
|
||||
|
||||
return redirect()->back()->with('error', trans('general.record_not_found'));
|
||||
if (Storage::exists('private_uploads/eula-pdfs/'.$filename)) {
|
||||
return response()->download(config('app.private_uploads').'/eula-pdfs/'.$filename);
|
||||
}
|
||||
|
||||
return redirect()->back()->with('error', trans('general.file_does_not_exist'));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1290,19 +1290,9 @@ class AssetsController extends Controller
|
||||
|
||||
public function assignedAssets(Request $request, Asset $asset) : JsonResponse | array
|
||||
{
|
||||
$this->authorize('view', Asset::class);
|
||||
$this->authorize('view', $asset);
|
||||
|
||||
$query = Asset::where([
|
||||
'assigned_to' => $asset->id,
|
||||
'assigned_type' => Asset::class,
|
||||
]);
|
||||
|
||||
$total = $query->count();
|
||||
|
||||
$assets = $query->applyOffsetAndLimit($total)->get();
|
||||
|
||||
return (new AssetsTransformer)->transformAssets($assets, $total);
|
||||
return [];
|
||||
// to do
|
||||
}
|
||||
|
||||
public function assignedAccessories(Request $request, Asset $asset) : JsonResponse | array
|
||||
|
||||
@@ -38,8 +38,6 @@ class CategoriesController extends Controller
|
||||
'consumables_count',
|
||||
'components_count',
|
||||
'licenses_count',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'image',
|
||||
'notes',
|
||||
];
|
||||
|
||||
@@ -26,12 +26,6 @@ class LicensesController extends Controller
|
||||
|
||||
$licenses = License::with('company', 'manufacturer', 'supplier','category', 'adminuser')->withCount('freeSeats as free_seats_count');
|
||||
|
||||
if ($request->input('status')=='inactive') {
|
||||
$licenses->ExpiredLicenses();
|
||||
} else {
|
||||
$licenses->ActiveLicenses();
|
||||
}
|
||||
|
||||
if ($request->filled('company_id')) {
|
||||
$licenses->where('licenses.company_id', '=', $request->input('company_id'));
|
||||
}
|
||||
@@ -100,8 +94,6 @@ class LicensesController extends Controller
|
||||
$licenses->onlyTrashed();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Make sure the offset and limit are actually integers and do not exceed system limits
|
||||
$offset = ($request->input('offset') > $licenses->count()) ? $licenses->count() : app('api_offset_value');
|
||||
$limit = app('api_limit_value');
|
||||
|
||||
@@ -37,14 +37,10 @@ class LocationsController extends Controller
|
||||
'address',
|
||||
'address2',
|
||||
'assets_count',
|
||||
'assigned_assets_count',
|
||||
'rtd_assets_count',
|
||||
'accessories_count',
|
||||
'assets_count',
|
||||
'assigned_accessories_count',
|
||||
'components_count',
|
||||
'consumables_count',
|
||||
'users_count',
|
||||
'children_count',
|
||||
'assigned_assets_count',
|
||||
'assigned_assets_count',
|
||||
'city',
|
||||
'country',
|
||||
'created_at',
|
||||
@@ -58,6 +54,7 @@ class LocationsController extends Controller
|
||||
'rtd_assets_count',
|
||||
'state',
|
||||
'updated_at',
|
||||
'users_count',
|
||||
'zip',
|
||||
'notes',
|
||||
];
|
||||
@@ -82,9 +79,8 @@ class LocationsController extends Controller
|
||||
'locations.currency',
|
||||
'locations.company_id',
|
||||
'locations.notes',
|
||||
'locations.created_by',
|
||||
'locations.deleted_at',
|
||||
])
|
||||
->withCount('assignedAssets as assigned_assets_count')
|
||||
->withCount('assignedAssets as assigned_assets_count')
|
||||
->withCount('assets as assets_count')
|
||||
->withCount('assignedAccessories as assigned_accessories_count')
|
||||
@@ -92,8 +88,6 @@ class LocationsController extends Controller
|
||||
->withCount('rtd_assets as rtd_assets_count')
|
||||
->withCount('children as children_count')
|
||||
->withCount('users as users_count')
|
||||
->withCount('consumables as consumables_count')
|
||||
->withCount('components as components_count')
|
||||
->with('adminuser');
|
||||
|
||||
// Only scope locations if the setting is enabled
|
||||
@@ -137,14 +131,6 @@ class LocationsController extends Controller
|
||||
$locations->where('locations.company_id', '=', $request->input('company_id'));
|
||||
}
|
||||
|
||||
if ($request->filled('parent_id')) {
|
||||
$locations->where('locations.parent_id', '=', $request->input('parent_id'));
|
||||
}
|
||||
|
||||
if ($request->input('status') == 'deleted') {
|
||||
$locations->onlyTrashed();
|
||||
}
|
||||
|
||||
// Make sure the offset and limit are actually integers and do not exceed system limits
|
||||
$offset = ($request->input('offset') > $locations->count()) ? $locations->count() : app('api_offset_value');
|
||||
$limit = app('api_limit_value');
|
||||
@@ -238,13 +224,8 @@ class LocationsController extends Controller
|
||||
])
|
||||
->withCount('assignedAssets as assigned_assets_count')
|
||||
->withCount('assets as assets_count')
|
||||
->withCount('assignedAccessories as assigned_accessories_count')
|
||||
->withCount('accessories as accessories_count')
|
||||
->withCount('rtd_assets as rtd_assets_count')
|
||||
->withCount('children as children_count')
|
||||
->withCount('users as users_count')
|
||||
->withCount('consumables as consumables_count')
|
||||
->withCount('components as components_count')
|
||||
->findOrFail($id);
|
||||
|
||||
return (new LocationsTransformer)->transformLocation($location);
|
||||
@@ -339,15 +320,11 @@ class LocationsController extends Controller
|
||||
{
|
||||
$this->authorize('delete', Location::class);
|
||||
$location = Location::withCount('assignedAssets as assigned_assets_count')
|
||||
->withCount('assignedAssets as assigned_assets_count')
|
||||
->withCount('assets as assets_count')
|
||||
->withCount('assignedAccessories as assigned_accessories_count')
|
||||
->withCount('accessories as accessories_count')
|
||||
->withCount('rtd_assets as rtd_assets_count')
|
||||
->withCount('children as children_count')
|
||||
->withCount('users as users_count')
|
||||
->withCount('consumables as consumables_count')
|
||||
->withCount('components as components_count')
|
||||
->withCount('accessories as accessories_count')
|
||||
->findOrFail($id);
|
||||
|
||||
if (! $location->isDeletable()) {
|
||||
|
||||
@@ -647,15 +647,6 @@ class BulkAssetsController extends Controller
|
||||
|
||||
$assets = Asset::findOrFail($asset_ids);
|
||||
|
||||
// Prevent checking out assets that are already checked out
|
||||
if ($assets->pluck('assigned_to')->unique()->filter()->isNotEmpty()) {
|
||||
// re-add the asset ids so the assets select is re-populated
|
||||
$request->session()->flashInput(['selected_assets' => $asset_ids]);
|
||||
|
||||
return redirect(route('hardware.bulkcheckout.show'))
|
||||
->with('error', trans('general.error_assets_already_checked_out'));
|
||||
}
|
||||
|
||||
if (request('checkout_to_type') == 'asset') {
|
||||
foreach ($asset_ids as $asset_id) {
|
||||
if ($target->id == $asset_id) {
|
||||
|
||||
@@ -102,15 +102,13 @@ class ComponentCheckoutController extends Controller
|
||||
return redirect()->route('components.checkout.show', $componentId)->with('error', trans('general.error_user_company'));
|
||||
}
|
||||
|
||||
$component->checkout_qty = $request->input('assigned_qty');
|
||||
|
||||
// Update the component data
|
||||
$component->asset_id = $request->input('asset_id');
|
||||
$component->assets()->attach($component->id, [
|
||||
'component_id' => $component->id,
|
||||
'created_by' => auth()->user()->id,
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'assigned_qty' => $component->checkout_qty,
|
||||
'assigned_qty' => $request->input('assigned_qty'),
|
||||
'asset_id' => $request->input('asset_id'),
|
||||
'note' => $request->input('note'),
|
||||
]);
|
||||
|
||||
@@ -25,7 +25,7 @@ class LicenseCheckoutController extends Controller
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v1.0]
|
||||
* @param $id
|
||||
* @return \Illuminate\Contracts\View\View |\Illuminate\Http\RedirectResponse
|
||||
* @return \Illuminate\Contracts\View\View
|
||||
* @throws \Illuminate\Auth\Access\AuthorizationException
|
||||
*/
|
||||
public function create(License $license)
|
||||
@@ -39,11 +39,6 @@ class LicenseCheckoutController extends Controller
|
||||
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.checkout.not_enough_seats'));
|
||||
}
|
||||
|
||||
// Make sure the license is expired or terminated
|
||||
if ($license->isInactive()) {
|
||||
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.checkout.license_is_inactive'));
|
||||
}
|
||||
|
||||
// We don't currently allow checking out licenses to locations, so we'll reset that to user if needed
|
||||
if (session()->get('checkout_to_type') == 'location') {
|
||||
session()->put(['checkout_to_type' => 'user']);
|
||||
@@ -75,19 +70,8 @@ class LicenseCheckoutController extends Controller
|
||||
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.not_found'));
|
||||
}
|
||||
|
||||
|
||||
$this->authorize('checkout', $license);
|
||||
|
||||
// Make sure there is at least one available to checkout
|
||||
if ($license->availCount()->count() < 1) {
|
||||
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.checkout.not_enough_seats'));
|
||||
}
|
||||
|
||||
// Make sure the license is expired or terminated
|
||||
if ($license->isInactive()) {
|
||||
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.checkout.license_is_inactive'));
|
||||
}
|
||||
|
||||
$licenseSeat = $this->findLicenseSeatToCheckout($license, $seatId);
|
||||
$licenseSeat->created_by = auth()->id();
|
||||
$licenseSeat->notes = $request->input('notes');
|
||||
@@ -130,7 +114,6 @@ class LicenseCheckoutController extends Controller
|
||||
throw new \Illuminate\Http\Exceptions\HttpResponseException(redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.checkout.not_enough_seats')));
|
||||
}
|
||||
|
||||
|
||||
if (! $licenseSeat->license->is($license)) {
|
||||
throw new \Illuminate\Http\Exceptions\HttpResponseException(redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.checkout.mismatch')));
|
||||
}
|
||||
|
||||
@@ -256,9 +256,6 @@ class LicensesController extends Controller
|
||||
else {
|
||||
$checkedout_seats_count = ($total_seats_count - $available_seats_count);
|
||||
}
|
||||
if($license->isInactive()){
|
||||
session()->flash('warning', (trans('admin/licenses/message.checkout.license_is_inactive')));
|
||||
}
|
||||
|
||||
$this->authorize('view', $license);
|
||||
return view('licenses.view', compact('license'))
|
||||
|
||||
@@ -189,36 +189,30 @@ class LocationsController extends Controller
|
||||
{
|
||||
$this->authorize('delete', Location::class);
|
||||
|
||||
$location = Location::withCount('assignedAssets as assigned_assets_count')
|
||||
->withCount('assets as assets_count')
|
||||
->withCount('assignedAccessories as assigned_accessories_count')
|
||||
->withCount('accessories as accessories_count')
|
||||
->withCount('rtd_assets as rtd_assets_count')
|
||||
->withCount('children as children_count')
|
||||
->withCount('users as users_count')
|
||||
->withCount('consumables as consumables_count')
|
||||
->withCount('components as components_count')
|
||||
->find($locationId);
|
||||
|
||||
if (!$location) {
|
||||
if (is_null($location = Location::find($locationId))) {
|
||||
return redirect()->to(route('locations.index'))->with('error', trans('admin/locations/message.does_not_exist'));
|
||||
}
|
||||
|
||||
if ($location->isDeletable()) {
|
||||
|
||||
if ($location->image) {
|
||||
try {
|
||||
Storage::disk('public')->delete('locations/'.$location->image);
|
||||
} catch (\Exception $e) {
|
||||
Log::error($e);
|
||||
}
|
||||
}
|
||||
$location->delete();
|
||||
return redirect()->to(route('locations.index'))->with('success', trans('admin/locations/message.delete.success'));
|
||||
} else {
|
||||
if ($location->users()->count() > 0) {
|
||||
return redirect()->to(route('locations.index'))->with('error', trans('admin/locations/message.assoc_users'));
|
||||
} elseif ($location->children()->count() > 0) {
|
||||
return redirect()->to(route('locations.index'))->with('error', trans('admin/locations/message.assoc_child_loc'));
|
||||
} elseif ($location->assets()->count() > 0) {
|
||||
return redirect()->to(route('locations.index'))->with('error', trans('admin/locations/message.assoc_assets'));
|
||||
} elseif ($location->assignedassets()->count() > 0) {
|
||||
return redirect()->to(route('locations.index'))->with('error', trans('admin/locations/message.assoc_assets'));
|
||||
}
|
||||
|
||||
if ($location->image) {
|
||||
try {
|
||||
Storage::disk('public')->delete('locations/'.$location->image);
|
||||
} catch (\Exception $e) {
|
||||
Log::error($e);
|
||||
}
|
||||
}
|
||||
$location->delete();
|
||||
|
||||
return redirect()->to(route('locations.index'))->with('success', trans('admin/locations/message.delete.success'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -253,41 +247,23 @@ class LocationsController extends Controller
|
||||
$this->authorize('view', Location::class);
|
||||
|
||||
if ($location = Location::where('id', $id)->first()) {
|
||||
$parent = Location::where('id', $location->parent_id)->first();
|
||||
$manager = User::where('id', $location->manager_id)->first();
|
||||
$company = Company::where('id', $location->company_id)->first();
|
||||
$users = User::where('location_id', $id)->with('company', 'department', 'location')->get();
|
||||
$assets = Asset::where('assigned_to', $id)->where('assigned_type', Location::class)->with('model', 'model.category')->get();
|
||||
return view('locations/print')
|
||||
->with('assigned', false)
|
||||
->with('assets', $location->assets)
|
||||
->with('assignedAssets', $location->assignedAssets)
|
||||
->with('accessories', $location->accessories)
|
||||
->with('assignedAccessories', $location->assignedAccessories)
|
||||
->with('users',$location->users)
|
||||
->with('assets', $assets)
|
||||
->with('users',$users)
|
||||
->with('location', $location)
|
||||
->with('consumables', $location->consumables)
|
||||
->with('components', $location->components)
|
||||
->with('children', $location->children);
|
||||
->with('parent', $parent)
|
||||
->with('manager', $manager)
|
||||
->with('company', $company);
|
||||
}
|
||||
|
||||
return redirect()->route('locations.index')->with('error', trans('admin/locations/message.does_not_exist'));
|
||||
}
|
||||
|
||||
public function print_all_assigned($id) : View | RedirectResponse
|
||||
{
|
||||
$this->authorize('view', Location::class);
|
||||
if ($location = Location::where('id', $id)->first()) {
|
||||
return view('locations/print')
|
||||
->with('assigned', true)
|
||||
->with('assets', $location->assets)
|
||||
->with('assignedAssets', $location->assignedAssets)
|
||||
->with('accessories', $location->accessories)
|
||||
->with('assignedAccessories', $location->assignedAccessories)
|
||||
->with('users',$location->users)
|
||||
->with('location', $location)
|
||||
->with('consumables', $location->consumables)
|
||||
->with('components', $location->components)
|
||||
->with('children', $location->children);
|
||||
}
|
||||
return redirect()->route('locations.index')->with('error', trans('admin/locations/message.does_not_exist'));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns a view that presents a form to clone a location.
|
||||
@@ -345,12 +321,33 @@ class LocationsController extends Controller
|
||||
return redirect()->route('locations.index')->with('success', trans('admin/locations/message.restore.success'));
|
||||
}
|
||||
|
||||
// Check validation
|
||||
return redirect()->back()->with('error', trans('general.could_not_restore', ['item_type' => trans('general.location'), 'error' => $location->getErrors()->first()]));
|
||||
}
|
||||
|
||||
return redirect()->back()->with('error', trans('admin/models/message.does_not_exist'));
|
||||
|
||||
}
|
||||
public function print_all_assigned($id) : View | RedirectResponse
|
||||
{
|
||||
$this->authorize('view', Location::class);
|
||||
if ($location = Location::where('id', $id)->first()) {
|
||||
$parent = Location::where('id', $location->parent_id)->first();
|
||||
$manager = User::where('id', $location->manager_id)->first();
|
||||
$company = Company::where('id', $location->company_id)->first();
|
||||
$users = User::where('location_id', $id)->with('company', 'department', 'location')->get();
|
||||
$assets = Asset::where('location_id', $id)->with('model', 'model.category')->get();
|
||||
return view('locations/print')
|
||||
->with('assets', $assets)
|
||||
->with('users',$users)
|
||||
->with('location', $location)
|
||||
->with('parent', $parent)
|
||||
->with('manager', $manager)
|
||||
->with('company', $company);
|
||||
}
|
||||
return redirect()->route('locations.index')->with('error', trans('admin/locations/message.does_not_exist'));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns a view that allows the user to bulk delete locations
|
||||
@@ -369,12 +366,8 @@ class LocationsController extends Controller
|
||||
$locations = Location::whereIn('id', $locations_raw_array)
|
||||
->withCount('assignedAssets as assigned_assets_count')
|
||||
->withCount('assets as assets_count')
|
||||
->withCount('assignedAccessories as assigned_accessories_count')
|
||||
->withCount('accessories as accessories_count')
|
||||
->withCount('rtd_assets as rtd_assets_count')
|
||||
->withCount('children as children_count')
|
||||
->withCount('consumables as consumables_count')
|
||||
->withCount('components as components_count')
|
||||
->withCount('users as users_count')->get();
|
||||
|
||||
$valid_count = 0;
|
||||
@@ -407,13 +400,9 @@ class LocationsController extends Controller
|
||||
$locations = Location::whereIn('id', $locations_raw_array)
|
||||
->withCount('assignedAssets as assigned_assets_count')
|
||||
->withCount('assets as assets_count')
|
||||
->withCount('assignedAccessories as assigned_accessories_count')
|
||||
->withCount('accessories as accessories_count')
|
||||
->withCount('rtd_assets as rtd_assets_count')
|
||||
->withCount('children as children_count')
|
||||
->withCount('users as users_count')
|
||||
->withCount('consumables as consumables_count')
|
||||
->withCount('components as components_count')->get();
|
||||
->withCount('users as users_count')->get();
|
||||
|
||||
$success_count = 0;
|
||||
$error_count = 0;
|
||||
|
||||
@@ -274,18 +274,22 @@ class ReportsController extends Controller
|
||||
$target_name = '';
|
||||
|
||||
if ($actionlog->target) {
|
||||
$target_name = $actionlog->target->display_name;
|
||||
if ($actionlog->targetType() == 'user') {
|
||||
$target_name = $actionlog->target->display_name;
|
||||
} else {
|
||||
$target_name = $actionlog->target->getDisplayNameAttribute();
|
||||
}
|
||||
}
|
||||
|
||||
if ($actionlog->item){
|
||||
$item_name = e($actionlog->item->display_name);
|
||||
if($actionlog->item){
|
||||
$item_name = e($actionlog->item->getDisplayNameAttribute());
|
||||
} else {
|
||||
$item_name = '';
|
||||
}
|
||||
|
||||
$row = [
|
||||
$actionlog->created_at,
|
||||
($actionlog->adminuser) ? $actionlog->adminuser->display_name : '',
|
||||
($actionlog->adminuser) ? e($actionlog->adminuser->display_name) : '',
|
||||
$actionlog->present()->actionType(),
|
||||
e($actionlog->itemType()),
|
||||
($actionlog->itemType() == 'user') ? $actionlog->filename : $item_name,
|
||||
@@ -294,10 +298,10 @@ class ReportsController extends Controller
|
||||
(($actionlog->item) && ($actionlog->item->model)) ? $actionlog->item->model->model_number : null,
|
||||
$target_name,
|
||||
($actionlog->note) ? e($actionlog->note) : '',
|
||||
$actionlog->log_meta,
|
||||
$actionlog->remote_ip,
|
||||
$actionlog->user_agent,
|
||||
$actionlog->action_source,
|
||||
$actionlog->log_meta,
|
||||
];
|
||||
fputcsv($handle, $row);
|
||||
}
|
||||
|
||||
@@ -34,7 +34,10 @@ class AssetCountForSidebar
|
||||
}
|
||||
|
||||
try {
|
||||
$total_assets = Asset::AssetsForShow()->count();
|
||||
$total_assets = Asset::count();
|
||||
if ($settings->show_archived_in_list != '1') {
|
||||
$total_assets -= Asset::Archived()->count();
|
||||
}
|
||||
view()->share('total_assets', $total_assets);
|
||||
} catch (\Exception $e) {
|
||||
Log::debug($e);
|
||||
|
||||
@@ -36,7 +36,6 @@ class AccessoriesTransformer
|
||||
'qty' => ($accessory->qty) ? (int) $accessory->qty : null,
|
||||
'purchase_date' => ($accessory->purchase_date) ? Helper::getFormattedDateObject($accessory->purchase_date, 'date') : null,
|
||||
'purchase_cost' => Helper::formatCurrencyOutput($accessory->purchase_cost),
|
||||
'total_cost' => Helper::formatCurrencyOutput($accessory->totalCostSum()),
|
||||
'order_number' => ($accessory->order_number) ? e($accessory->order_number) : null,
|
||||
'min_qty' => ($accessory->min_amt) ? (int) $accessory->min_amt : null, // Legacy - should phase out - replaced by below, for the bootstrap table formatter
|
||||
'min_amt' => ($accessory->min_amt) ? (int) $accessory->min_amt : null,
|
||||
|
||||
@@ -147,7 +147,7 @@ class ActionlogsTransformer
|
||||
[
|
||||
'url' => $actionlog->uploads_file_url(),
|
||||
'filename' => $actionlog->filename,
|
||||
'inlineable' => StorageHelper::allowSafeInline($actionlog->uploads_file_path()),
|
||||
'inlineable' => StorageHelper::allowSafeInline($actionlog->uploads_file_url()),
|
||||
'exists_on_disk' => Storage::exists($actionlog->uploads_file_path()) ? true : false,
|
||||
] : null,
|
||||
|
||||
@@ -155,7 +155,7 @@ class ActionlogsTransformer
|
||||
'id' => (int) $actionlog->item->id,
|
||||
'name' => e($actionlog->item->display_name) ?? null,
|
||||
'type' => e($actionlog->itemType()),
|
||||
'serial' => e($actionlog->item->serial) ? e($actionlog->item->serial) : null
|
||||
'serial' =>e($actionlog->item->serial) ? e($actionlog->item->serial) : null
|
||||
] : null,
|
||||
'location' => ($actionlog->location) ? [
|
||||
'id' => (int) $actionlog->location->id,
|
||||
@@ -168,7 +168,7 @@ class ActionlogsTransformer
|
||||
'action_type' => $actionlog->present()->actionType(),
|
||||
'admin' => ($actionlog->adminuser) ? [
|
||||
'id' => (int) $actionlog->adminuser->id,
|
||||
'name' => e($actionlog->adminuser->display_name) ?? null,
|
||||
'name' => e($actionlog->adminuser->display_name),
|
||||
'first_name'=> e($actionlog->adminuser->first_name),
|
||||
'last_name'=> e($actionlog->adminuser->last_name)
|
||||
] : null,
|
||||
@@ -180,7 +180,7 @@ class ActionlogsTransformer
|
||||
] : null,
|
||||
'target' => ($actionlog->target) ? [
|
||||
'id' => (int) $actionlog->target->id,
|
||||
'name' => e($actionlog->target->display_name) ?? null,
|
||||
'name' => ($actionlog->target->display_name) ?? null,
|
||||
'type' => e($actionlog->targetType()),
|
||||
] : null,
|
||||
|
||||
|
||||
@@ -43,7 +43,6 @@ class ComponentsTransformer
|
||||
'order_number' => e($component->order_number),
|
||||
'purchase_date' => Helper::getFormattedDateObject($component->purchase_date, 'date'),
|
||||
'purchase_cost' => Helper::formatCurrencyOutput($component->purchase_cost),
|
||||
'total_cost' => Helper::formatCurrencyOutput($component->totalCostSum()),
|
||||
'remaining' => (int) $component->numRemaining(),
|
||||
'company' => ($component->company) ? [
|
||||
'id' => (int) $component->company->id,
|
||||
|
||||
@@ -37,7 +37,6 @@ class ConsumablesTransformer
|
||||
'remaining' => $consumable->numRemaining(),
|
||||
'order_number' => e($consumable->order_number),
|
||||
'purchase_cost' => Helper::formatCurrencyOutput($consumable->purchase_cost),
|
||||
'total_cost' => Helper::formatCurrencyOutput($consumable->totalCostSum()),
|
||||
'purchase_date' => Helper::getFormattedDateObject($consumable->purchase_date, 'date'),
|
||||
'qty' => (int) $consumable->qty,
|
||||
'notes' => ($consumable->notes) ? Helper::parseEscapedMarkedownInline($consumable->notes) : null,
|
||||
|
||||
@@ -51,7 +51,7 @@ class LicenseSeatsTransformer
|
||||
'reassignable' => (bool) $seat->license->reassignable,
|
||||
'notes' => e($seat->notes),
|
||||
'user_can_checkout' => (($seat->assigned_to == '') && ($seat->asset_id == '')),
|
||||
'disabled' => $seat->unreassignable_seat || $seat->license->isInactive(),
|
||||
'disabled' => $seat->unreassignable_seat,
|
||||
];
|
||||
|
||||
$permissions_array['available_actions'] = [
|
||||
|
||||
@@ -31,11 +31,11 @@ class LicensesTransformer
|
||||
'purchase_order' => ($license->purchase_order) ? e($license->purchase_order) : null,
|
||||
'purchase_date' => Helper::getFormattedDateObject($license->purchase_date, 'date'),
|
||||
'termination_date' => Helper::getFormattedDateObject($license->termination_date, 'date'),
|
||||
'expiration_date' => Helper::getFormattedDateObject($license->expiration_date, 'date'),
|
||||
'depreciation' => ($license->depreciation) ? ['id' => (int) $license->depreciation->id,'name'=> e($license->depreciation->name)] : null,
|
||||
'purchase_cost' => Helper::formatCurrencyOutput($license->purchase_cost),
|
||||
'purchase_cost_numeric' => $license->purchase_cost,
|
||||
'notes' => Helper::parseEscapedMarkedownInline($license->notes),
|
||||
'expiration_date' => Helper::getFormattedDateObject($license->expiration_date, 'date'),
|
||||
'seats' => (int) $license->seats,
|
||||
'free_seats_count' => (int) $license->free_seats_count - License::unReassignableCount($license),
|
||||
'remaining' => (int) $license->free_seats_count,
|
||||
@@ -54,7 +54,7 @@ class LicensesTransformer
|
||||
'updated_at' => Helper::getFormattedDateObject($license->updated_at, 'datetime'),
|
||||
'deleted_at' => Helper::getFormattedDateObject($license->deleted_at, 'datetime'),
|
||||
'user_can_checkout' => (bool) ($license->free_seats_count > 0),
|
||||
'disabled' => $license->isInactive(),
|
||||
|
||||
];
|
||||
|
||||
$permissions_array['available_actions'] = [
|
||||
|
||||
@@ -53,9 +53,6 @@ class LocationsTransformer
|
||||
'assets_count' => (int) $location->assets_count,
|
||||
'rtd_assets_count' => (int) $location->rtd_assets_count,
|
||||
'users_count' => (int) $location->users_count,
|
||||
'consumables_count' => (int) $location->consumables_count,
|
||||
'components_count' => (int) $location->components_count,
|
||||
'children_count' => (int) $location->children_count,
|
||||
'currency' => ($location->currency) ? e($location->currency) : null,
|
||||
'ldap_ou' => ($location->ldap_ou) ? e($location->ldap_ou) : null,
|
||||
'notes' => Helper::parseEscapedMarkedownInline($location->notes),
|
||||
@@ -79,13 +76,12 @@ class LocationsTransformer
|
||||
];
|
||||
|
||||
$permissions_array['available_actions'] = [
|
||||
'update' => (Gate::allows('update', Location::class) && ($location->deleted_at == '')),
|
||||
'update' => Gate::allows('update', Location::class) ? true : false,
|
||||
'delete' => $location->isDeletable(),
|
||||
'bulk_selectable' => [
|
||||
'delete' => $location->isDeletable()
|
||||
],
|
||||
'clone' => (Gate::allows('create', Location::class) && ($location->deleted_at == '')),
|
||||
'restore' => (Gate::allows('create', Location::class) && ($location->deleted_at != '')),
|
||||
];
|
||||
|
||||
$array += $permissions_array;
|
||||
|
||||
@@ -96,8 +96,8 @@ class CheckoutableListener
|
||||
|
||||
if (!empty($to)) {
|
||||
try {
|
||||
$toMail = (clone $mailable)->locale($notifiable->locale);
|
||||
Mail::to(array_flatten($to))->send($toMail);
|
||||
Mail::to(array_flatten($to))->send($mailable->locale($notifiable->locale));
|
||||
Mail::to(array_flatten($cc))->send($mailable->locale(Setting::getSettings()->locale));
|
||||
Log::info('Checkout Mail sent to checkout target');
|
||||
} catch (ClientException $e) {
|
||||
Log::debug("Exception caught during checkout email: " . $e->getMessage());
|
||||
@@ -105,16 +105,6 @@ class CheckoutableListener
|
||||
Log::debug("Exception caught during checkout email: " . $e->getMessage());
|
||||
}
|
||||
}
|
||||
if (!empty($cc)) {
|
||||
try {
|
||||
$ccMail = (clone $mailable)->locale(Setting::getSettings()->locale);
|
||||
Mail::to(array_flatten($cc))->send($ccMail);
|
||||
} catch (ClientException $e) {
|
||||
Log::debug("Exception caught during checkout email: " . $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
Log::debug("Exception caught during checkout email: " . $e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($shouldSendWebhookNotification) {
|
||||
@@ -189,26 +179,16 @@ class CheckoutableListener
|
||||
|
||||
[$to, $cc] = $this->generateEmailRecipients($shouldSendEmailToUser, $shouldSendEmailToAlertAddress, $notifiable);
|
||||
|
||||
if (!empty($to)) {
|
||||
try {
|
||||
$toMail = (clone $mailable)->locale($notifiable->locale);
|
||||
Mail::to(array_flatten($to))->send($toMail);
|
||||
Log::info('Checkin Mail sent to checkin target');
|
||||
} catch (ClientException $e) {
|
||||
Log::debug("Exception caught during checkin email: " . $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
Log::debug("Exception caught during checkin email: " . $e->getMessage());
|
||||
}
|
||||
}
|
||||
if (!empty($cc)) {
|
||||
try {
|
||||
$ccMail = (clone $mailable)->locale(Setting::getSettings()->locale);
|
||||
Mail::to(array_flatten($cc))->send($ccMail);
|
||||
} catch (ClientException $e) {
|
||||
Log::debug("Exception caught during checkin email: " . $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
Log::debug("Exception caught during checkin email: " . $e->getMessage());
|
||||
try {
|
||||
if (!empty($to)) {
|
||||
Mail::to(array_flatten($to))->send($mailable->locale($notifiable->locale));
|
||||
Mail::to(array_flatten($cc))->send($mailable->locale(Setting::getSettings()->locale));
|
||||
Log::info('Checkin Mail sent to CC addresses');
|
||||
}
|
||||
} catch (ClientException $e) {
|
||||
Log::debug("Exception caught during checkin email: " . $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
Log::debug("Exception caught during checkin email: " . $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -262,12 +242,6 @@ class CheckoutableListener
|
||||
$acceptance->checkoutable()->associate($event->checkoutable);
|
||||
$acceptance->assignedTo()->associate($event->checkedOutTo);
|
||||
|
||||
$acceptance->qty = 1;
|
||||
|
||||
if (isset($event->checkoutable->checkout_qty)) {
|
||||
$acceptance->qty = $event->checkoutable->checkout_qty;
|
||||
}
|
||||
|
||||
$category = $this->getCategoryFromCheckoutable($event->checkoutable);
|
||||
|
||||
if ($category?->alert_on_response) {
|
||||
|
||||
@@ -43,7 +43,7 @@ class CheckoutAccessoryMail extends Mailable
|
||||
|
||||
return new Envelope(
|
||||
from: $from,
|
||||
subject: trans_choice('mail.Accessory_Checkout_Notification', $this->checkout_qty),
|
||||
subject: trans('mail.Accessory_Checkout_Notification'),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -83,19 +83,17 @@ class CheckoutAccessoryMail extends Mailable
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
private function introductionLine(): string
|
||||
{
|
||||
if ($this->target instanceof Location) {
|
||||
return trans_choice('mail.new_item_checked_location', $this->checkout_qty, ['location' => $this->target->name]);
|
||||
return trans('mail.new_item_checked_location', ['location' => $this->target->name ]);
|
||||
}
|
||||
|
||||
if ($this->requiresAcceptance()) {
|
||||
return trans_choice('mail.new_item_checked_with_acceptance', $this->checkout_qty);
|
||||
return trans('mail.new_item_checked_with_acceptance');
|
||||
}
|
||||
|
||||
if (!$this->requiresAcceptance()) {
|
||||
return trans_choice('mail.new_item_checked', $this->checkout_qty);
|
||||
return trans('mail.new_item_checked');
|
||||
}
|
||||
|
||||
// we shouldn't get here but let's send a default message just in case
|
||||
|
||||
@@ -138,15 +138,14 @@ class CheckoutAssetMail extends Mailable
|
||||
private function introductionLine(): string
|
||||
{
|
||||
if ($this->firstTimeSending && $this->target instanceof Location) {
|
||||
return trans_choice('mail.new_item_checked_location', 1, ['location' => $this->target->name]);
|
||||
return trans('mail.new_item_checked_location', ['location' => $this->target->name ]);
|
||||
}
|
||||
|
||||
if ($this->firstTimeSending && $this->requiresAcceptance()) {
|
||||
return trans_choice('mail.new_item_checked_with_acceptance', 1);
|
||||
return trans('mail.new_item_checked_with_acceptance');
|
||||
}
|
||||
|
||||
if ($this->firstTimeSending && !$this->requiresAcceptance()) {
|
||||
return trans_choice('mail.new_item_checked', 1);
|
||||
return trans('mail.new_item_checked');
|
||||
}
|
||||
|
||||
if (!$this->firstTimeSending && $this->requiresAcceptance()) {
|
||||
|
||||
@@ -26,7 +26,7 @@ class CheckoutComponentMail extends Mailable
|
||||
$this->note = $note;
|
||||
$this->target = $checkedOutTo;
|
||||
$this->acceptance = $acceptance;
|
||||
$this->qty = $component->checkout_qty;
|
||||
$this->qty = $component->assets->first()?->pivot?->assigned_qty;
|
||||
|
||||
$this->settings = Setting::getSettings();
|
||||
}
|
||||
|
||||
@@ -309,6 +309,27 @@ class Accessory extends SnipeModel
|
||||
return $this->category->require_acceptance ?? false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks for a category-specific EULA, and if that doesn't exist,
|
||||
* checks for a settings level EULA
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v3.0]
|
||||
* @return string
|
||||
*/
|
||||
public function getEula()
|
||||
{
|
||||
|
||||
if ($this->category->eula_text) {
|
||||
return Helper::parseEscapedMarkedown($this->category->eula_text);
|
||||
} elseif ((Setting::getSettings()->default_eula_text) && ($this->category->use_default_eula == '1')) {
|
||||
return Helper::parseEscapedMarkedown(Setting::getSettings()->default_eula_text);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check how many items within an accessory are checked out
|
||||
*
|
||||
@@ -357,10 +378,6 @@ class Accessory extends SnipeModel
|
||||
|
||||
$accessory_checkout->limit(1)->delete();
|
||||
}
|
||||
public function totalCostSum() {
|
||||
|
||||
return $this->purchase_cost !== null ? $this->qty * $this->purchase_cost : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* -----------------------------------------------
|
||||
|
||||
@@ -161,6 +161,7 @@ class Asset extends Depreciable
|
||||
'eol_explicit',
|
||||
'last_audit_date',
|
||||
'next_audit_date',
|
||||
'asset_eol_date',
|
||||
'last_checkin',
|
||||
'last_checkout',
|
||||
];
|
||||
@@ -823,26 +824,21 @@ class Asset extends Depreciable
|
||||
* @since [v2.0]
|
||||
* @return mixed
|
||||
*/
|
||||
public static function getExpiringWarrantyOrEol($days = 30)
|
||||
public static function getExpiringWarrantee($days = 30)
|
||||
{
|
||||
|
||||
return self::where('archived', '=', '0')
|
||||
->NotArchived()
|
||||
$days = (is_null($days)) ? 30 : $days;
|
||||
|
||||
return self::where('archived', '=', '0') // this can stay for right now, as `archived` defaults to 0 at the db level, but should probably be replaced with assetstatus->archived?
|
||||
->whereNotNull('warranty_months')
|
||||
->whereNotNull('purchase_date')
|
||||
->whereNull('deleted_at')
|
||||
->where(function ($query) use ($days) {
|
||||
// Check for manual asset EOL first
|
||||
$query->where(function ($query) use ($days) {
|
||||
$query->whereNotNull('asset_eol_date')
|
||||
->whereBetween('asset_eol_date', [Carbon::now(), Carbon::now()->addDays($days)]);
|
||||
// Otherwise use the warranty months + purchase date + threshold
|
||||
})->orWhere(function ($query) use ($days) {
|
||||
$query->whereNotNull('purchase_date')
|
||||
->whereNotNull('warranty_months')
|
||||
->whereBetween('purchase_date', [Carbon::now(), Carbon::now()->addMonths('assets.warranty_months')->addDays($days)]);
|
||||
});
|
||||
})
|
||||
->orderBy('asset_eol_date', 'ASC')
|
||||
->orderBy('purchase_date', 'ASC')
|
||||
->NotArchived()
|
||||
->whereRaw(
|
||||
'DATE_ADD(`purchase_date`, INTERVAL `warranty_months` MONTH) <= DATE_ADD(NOW(), INTERVAL '
|
||||
. $days
|
||||
. ' DAY) AND DATE_ADD(`purchase_date`, INTERVAL `warranty_months` MONTH) > NOW()'
|
||||
)
|
||||
->orderByRaw('DATE_ADD(`purchase_date`,INTERVAL `warranty_months` MONTH)')
|
||||
->get();
|
||||
}
|
||||
|
||||
@@ -1023,6 +1019,31 @@ class Asset extends Depreciable
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Checks for a category-specific EULA, and if that doesn't exist,
|
||||
* checks for a settings level EULA
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @return string | false
|
||||
*/
|
||||
public function getEula()
|
||||
{
|
||||
|
||||
if (($this->model) && ($this->model->category)) {
|
||||
if (($this->model->category->eula_text) && ($this->model->category->use_default_eula == 0)) {
|
||||
return $this->model->category->eula_text;
|
||||
} elseif ($this->model->category->use_default_eula == 1) {
|
||||
return Setting::getSettings()->default_eula_text;
|
||||
} else {
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
public function getComponentCost()
|
||||
{
|
||||
$cost = 0;
|
||||
@@ -1872,30 +1893,6 @@ class Asset extends Depreciable
|
||||
);
|
||||
}
|
||||
|
||||
if ($fieldname == 'jobtitle') {
|
||||
$query->where(function ($query) use ($search_val) {
|
||||
if (is_array($search_val)) {
|
||||
$query->whereHasMorph(
|
||||
'assignedTo',
|
||||
[User::class],
|
||||
function ($query) use ($search_val) {
|
||||
$query->whereIn('users.jobtitle', $search_val);
|
||||
}
|
||||
);
|
||||
} else {
|
||||
$query->whereHasMorph(
|
||||
'assignedTo',
|
||||
[User::class],
|
||||
function ($query) use ($search_val) {
|
||||
$query->where(function ($query) use ($search_val) {
|
||||
$query->where('users.jobtitle', 'LIKE', '%' . $search_val . '%');
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* THIS CLUNKY BIT IS VERY IMPORTANT
|
||||
@@ -1920,7 +1917,7 @@ class Asset extends Depreciable
|
||||
*/
|
||||
|
||||
if (($fieldname!='category') && ($fieldname!='model_number') && ($fieldname!='rtd_location') && ($fieldname!='location') && ($fieldname!='supplier')
|
||||
&& ($fieldname!='status_label') && ($fieldname!='assigned_to') && ($fieldname!='model') && ($fieldname!='jobtitle') && ($fieldname!='company') && ($fieldname!='manufacturer')
|
||||
&& ($fieldname!='status_label') && ($fieldname!='assigned_to') && ($fieldname!='model') && ($fieldname!='company') && ($fieldname!='manufacturer')
|
||||
) {
|
||||
$query->where('assets.'.$fieldname, 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
@@ -2,14 +2,11 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Helpers\Helper;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use TCPDF;
|
||||
|
||||
class CheckoutAcceptance extends Model
|
||||
{
|
||||
@@ -132,7 +129,8 @@ class CheckoutAcceptance extends Model
|
||||
/**
|
||||
* Filter checkout acceptences by the user
|
||||
*
|
||||
* @param User $user
|
||||
* @param Illuminate\Database\Eloquent\Builder $query
|
||||
* @param User $user
|
||||
* @return \Illuminate\Database\Eloquent\Builder
|
||||
*/
|
||||
public function scopeForUser(Builder $query, User $user)
|
||||
@@ -143,111 +141,11 @@ class CheckoutAcceptance extends Model
|
||||
/**
|
||||
* Filter to only get pending acceptances
|
||||
*
|
||||
* @param Illuminate\Database\Eloquent\Builder $query
|
||||
* @return \Illuminate\Database\Eloquent\Builder
|
||||
*/
|
||||
public function scopePending(Builder $query)
|
||||
{
|
||||
return $query->whereNull('accepted_at')->whereNull('declined_at');
|
||||
}
|
||||
|
||||
public function scopeDeclined(Builder $query)
|
||||
{
|
||||
return $query->whereNull('accepted_at')->whereNotNull('declined_at');
|
||||
}
|
||||
|
||||
protected function displayCheckoutableType(): Attribute
|
||||
{
|
||||
return Attribute:: make(
|
||||
get: fn(mixed $value) => strtolower(str_replace('App\Models\\', '', $this->checkoutable_type)),
|
||||
);
|
||||
}
|
||||
|
||||
public function generateAcceptancePdf($data, $pdf_filename) {
|
||||
|
||||
// set some language dependent data:
|
||||
$lg = Array();
|
||||
$lg['a_meta_charset'] = 'UTF-8';
|
||||
$lg['w_page'] = 'page';
|
||||
|
||||
$pdf = new TCPDF('P', 'mm', 'A4', true, 'UTF-8', false);
|
||||
$pdf->setRTL(false);
|
||||
$pdf->setLanguageArray($lg);
|
||||
$pdf->SetFontSubsetting(true);
|
||||
$pdf->SetCreator('Snipe-IT Asset Management System');
|
||||
$pdf->SetAuthor($data['assigned_to']);
|
||||
$pdf->SetTitle('Asset Acceptance: '.$data['item_tag']);
|
||||
$pdf->SetSubject('Asset Acceptance: '.$data['item_tag']);
|
||||
$pdf->SetKeywords('Snipe-IT, assets, acceptance, eula, tos');
|
||||
$pdf->SetFont('dejavusans', '', 8, '', true);
|
||||
$pdf->SetPrintHeader(false);
|
||||
$pdf->SetPrintFooter(false);
|
||||
|
||||
$pdf->AddPage();
|
||||
if ($data['logo'] != null) {
|
||||
$pdf->writeHTML('<img src="'.$data['logo'].'">', true, 0, true, 0, '');
|
||||
} else {
|
||||
$pdf->writeHTML('<h3>'.$data['site_name'].'</h3><br /><br />', true, 0, true, 0, 'C');
|
||||
}
|
||||
|
||||
$pdf->Ln();
|
||||
$pdf->writeHTML(trans('general.date') . ': ' . Helper::getFormattedDateObject(now(), 'datetime', false), true, 0, true, 0, '');
|
||||
|
||||
if ($data['company_name'] != null) {
|
||||
$pdf->writeHTML(trans('general.company') . ': ' . e($data['company_name']), true, 0, true, 0, '');
|
||||
}
|
||||
if ($data['item_tag'] != null) {
|
||||
$pdf->writeHTML(trans('general.asset_tag') . ': ' . e($data['item_tag']), true, 0, true, 0, '');
|
||||
}
|
||||
if ($data['item_name'] != null) {
|
||||
$pdf->writeHTML(trans('general.name') . ': ' . e($data['item_name']), true, 0, true, 0, '');
|
||||
}
|
||||
if ($data['item_model'] != null) {
|
||||
$pdf->writeHTML(trans('general.asset_model') . ': ' . e($data['item_model']), true, 0, true, 0, '');
|
||||
}
|
||||
if ($data['item_serial'] != null) {
|
||||
$pdf->writeHTML(trans('admin/hardware/form.serial').': '.e($data['item_serial']), true, 0, true, 0, '');
|
||||
}
|
||||
if (($data['qty'] != null) && ($data['qty'] > 1)) {
|
||||
$pdf->writeHTML(trans('general.qty').': '.e($data['qty']), true, 0, true, 0, '');
|
||||
}
|
||||
$pdf->writeHTML(trans('general.assignee').': '.e($data['assigned_to']), true, 0, true, 0, '');
|
||||
$pdf->Ln();
|
||||
$pdf->writeHTML('<hr>', true, 0, true, 0, '');
|
||||
|
||||
|
||||
// Break the EULA into lines based on newlines, and check each line for RTL or CJK characters
|
||||
$eula_lines = preg_split("/\r\n|\n|\r/", $data['eula']);
|
||||
|
||||
foreach ($eula_lines as $eula_line) {
|
||||
Helper::hasRtl($eula_line) ? $pdf->setRTL(true) : $pdf->setRTL(false);
|
||||
Helper::isCjk($eula_line) ? $pdf->SetFont('cid0cs', '', 9) : $pdf->SetFont('dejavusans', '', 8, '', true);
|
||||
|
||||
$pdf->writeHTML(Helper::parseEscapedMarkedown($eula_line), true, 0, true, 0, '');
|
||||
}
|
||||
$pdf->Ln();
|
||||
$pdf->Ln();
|
||||
$pdf->setRTL(false);
|
||||
$pdf->Ln();
|
||||
|
||||
if ($data['signature'] != null) {
|
||||
$pdf->writeHTML('<img src="'.$data['signature'].'">', true, 0, true, 0, '');
|
||||
$pdf->writeHTML('<hr>', true, 0, true, 0, '');
|
||||
$pdf->writeHTML(e($data['assigned_to']), true, 0, true, 0, 'C');
|
||||
$pdf->Ln();
|
||||
}
|
||||
|
||||
if ($data['note'] != null) {
|
||||
Helper::isCjk($data['note']) ? $pdf->SetFont('cid0cs', '', 9) : $pdf->SetFont('dejavusans', '', 8, '', true);
|
||||
$pdf->writeHTML(trans('general.notes') . ': ' . e($data['note']), true, 0, true, 0, '');
|
||||
$pdf->Ln();
|
||||
}
|
||||
|
||||
|
||||
$pdf->writeHTML(trans('general.assigned_date').': '.e($data['check_out_date']), true, 0, true, 0, '');
|
||||
$pdf->writeHTML(trans('general.accepted_date').': '.e($data['accepted_date']), true, 0, true, 0, '');
|
||||
|
||||
return $pdf->Output($pdf_filename, 'S');
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -217,6 +217,24 @@ class Component extends SnipeModel
|
||||
return $this->category->require_acceptance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks for a category-specific EULA, and if that doesn't exist,
|
||||
* checks for a settings level EULA
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @return string | false
|
||||
*/
|
||||
public function getEula()
|
||||
{
|
||||
if ($this->category->eula_text) {
|
||||
return Helper::parseEscapedMarkedown($this->category->eula_text);
|
||||
} elseif ((Setting::getSettings()->default_eula_text) && ($this->category->use_default_eula == '1')) {
|
||||
return Helper::parseEscapedMarkedown(Setting::getSettings()->default_eula_text);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Establishes the component -> action logs relationship
|
||||
@@ -288,10 +306,7 @@ class Component extends SnipeModel
|
||||
return $this->qty - $this->numCheckedOut();
|
||||
}
|
||||
|
||||
public function totalCostSum() {
|
||||
|
||||
return $this->purchase_cost !== null ? $this->qty * $this->purchase_cost : null;
|
||||
}
|
||||
/**
|
||||
* -----------------------------------------------
|
||||
* BEGIN MUTATORS
|
||||
|
||||
@@ -285,6 +285,25 @@ class Consumable extends SnipeModel
|
||||
return $this->category->require_acceptance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks for a category-specific EULA, and if that doesn't exist,
|
||||
* checks for a settings level EULA
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @return string | false
|
||||
*/
|
||||
public function getEula()
|
||||
{
|
||||
if ($this->category->eula_text) {
|
||||
return Helper::parseEscapedMarkedown($this->category->eula_text);
|
||||
} elseif ((Setting::getSettings()->default_eula_text) && ($this->category->use_default_eula == '1')) {
|
||||
return Helper::parseEscapedMarkedown(Setting::getSettings()->default_eula_text);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check how many items within a consumable are checked out
|
||||
*
|
||||
@@ -312,10 +331,7 @@ class Consumable extends SnipeModel
|
||||
|
||||
return $remaining;
|
||||
}
|
||||
public function totalCostSum() {
|
||||
|
||||
return $this->purchase_cost !== null ? $this->qty * $this->purchase_cost : null;
|
||||
}
|
||||
/**
|
||||
* -----------------------------------------------
|
||||
* BEGIN MUTATORS
|
||||
|
||||
@@ -78,13 +78,6 @@ class Ldap extends Model
|
||||
if (env('LDAPTLS_CACERT')) {
|
||||
putenv('LDAPTLS_CACERT='.env('LDAPTLS_CACERT'));
|
||||
}
|
||||
// You _were_ allowed to do this *after* the ldap_connect() in some versions of PHP, but it's not how they want
|
||||
// you to anymore, and it seems to not work at all in later PHP versions.
|
||||
if (Setting::getSettings()->ldap_client_tls_cert && Setting::getSettings()->ldap_client_tls_key) {
|
||||
ldap_set_option(null, LDAP_OPT_X_TLS_CERTFILE, Setting::get_client_side_cert_path());
|
||||
ldap_set_option(null, LDAP_OPT_X_TLS_KEYFILE, Setting::get_client_side_key_path());
|
||||
}
|
||||
|
||||
$connection = @ldap_connect($ldap_host);
|
||||
|
||||
if (! $connection) {
|
||||
@@ -96,6 +89,11 @@ class Ldap extends Model
|
||||
ldap_set_option($connection, LDAP_OPT_PROTOCOL_VERSION, $ldap_version);
|
||||
ldap_set_option($connection, LDAP_OPT_NETWORK_TIMEOUT, 20);
|
||||
|
||||
if (Setting::getSettings()->ldap_client_tls_cert && Setting::getSettings()->ldap_client_tls_key) {
|
||||
ldap_set_option(null, LDAP_OPT_X_TLS_CERTFILE, Setting::get_client_side_cert_path());
|
||||
ldap_set_option(null, LDAP_OPT_X_TLS_KEYFILE, Setting::get_client_side_key_path());
|
||||
}
|
||||
|
||||
if ($ldap_use_tls=='1') {
|
||||
ldap_start_tls($connection);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
use Watson\Validating\ValidatingTrait;
|
||||
|
||||
|
||||
class License extends Depreciable
|
||||
{
|
||||
use HasFactory;
|
||||
@@ -297,38 +296,6 @@ class License extends Depreciable
|
||||
}
|
||||
$this->attributes['termination_date'] = $value;
|
||||
}
|
||||
|
||||
public function isInactive(): bool
|
||||
{
|
||||
$day = now()->startOfDay();
|
||||
|
||||
$expired = $this->expiration_date && $this->asDateTime($this->expiration_date)->startofDay()->lessThanOrEqualTo($day);
|
||||
|
||||
$terminated = $this->termination_date && $this->asDateTime($this->termination_date)->startofDay()->lessThanOrEqualTo($day);
|
||||
|
||||
|
||||
return $this->isExpired() || $this->isTerminated();
|
||||
}
|
||||
|
||||
public function isExpired(): bool
|
||||
{
|
||||
$day = now()->startOfDay();
|
||||
|
||||
$expired = $this->expiration_date && $this->asDateTime($this->expiration_date)->startofDay()->lessThanOrEqualTo($day);
|
||||
|
||||
return $expired;
|
||||
}
|
||||
|
||||
public function isTerminated(): bool
|
||||
{
|
||||
$day = now()->startOfDay();
|
||||
|
||||
$terminated = $this->termination_date && $this->asDateTime($this->termination_date)->startofDay()->lessThanOrEqualTo($day);
|
||||
|
||||
|
||||
return $terminated;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets free_seat_count attribute
|
||||
*
|
||||
@@ -408,6 +375,27 @@ class License extends Depreciable
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks for a category-specific EULA, and if that doesn't exist,
|
||||
* checks for a settings level EULA
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @return string | false
|
||||
*/
|
||||
public function getEula()
|
||||
{
|
||||
if ($this->category) {
|
||||
if ($this->category->eula_text) {
|
||||
return Helper::parseEscapedMarkedown($this->category->eula_text);
|
||||
} elseif ($this->category->use_default_eula == '1') {
|
||||
return Helper::parseEscapedMarkedown(Setting::getSettings()->default_eula_text);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Establishes the license -> assigned user relationship
|
||||
@@ -608,7 +596,7 @@ class License extends Depreciable
|
||||
{
|
||||
$count = 0;
|
||||
if (!$license->reassignable) {
|
||||
$count = LicenseSeat::query()->where('unreassignable_seat', '=', true)
|
||||
$count = licenseSeat::query()->where('unreassignable_seat', '=', true)
|
||||
->where('license_id', '=', $license->id)
|
||||
->count();
|
||||
}
|
||||
@@ -707,80 +695,26 @@ class License extends Depreciable
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns expiring licenses.
|
||||
* Returns expiring licenses
|
||||
*
|
||||
* This checks if:
|
||||
*
|
||||
* 1) The license has not been deleted
|
||||
* 2) The expiration date is between now and the number of days specified
|
||||
* 3) There is an expiration date set and the termination date has not passed
|
||||
* 4) The license termination date is null or has not passed
|
||||
* @todo should refactor. I don't like get() in model methods
|
||||
*
|
||||
* @author A. Gianotto <snipe@snipe.net>
|
||||
* @since [v1.0]
|
||||
* @return \Illuminate\Database\Eloquent\Relations\Relation
|
||||
* @see \App\Console\Commands\SendExpiringLicenseNotifications
|
||||
*/
|
||||
public static function getExpiringLicenses($days = 60)
|
||||
{
|
||||
$days = (is_null($days)) ? 60 : $days;
|
||||
|
||||
return self::whereNull('licenses.deleted_at')
|
||||
|
||||
// The termination date is null or within range
|
||||
->where(function ($query) use ($days) {
|
||||
$query->whereNull('termination_date')
|
||||
->orWhereBetween('termination_date', [Carbon::now(), Carbon::now()->addDays($days)]);
|
||||
})
|
||||
->where(function ($query) use ($days) {
|
||||
$query->whereNotNull('expiration_date')
|
||||
// Handle expired licenses without termination dates
|
||||
->where(function ($query) use ($days) {
|
||||
$query->whereNull('termination_date')
|
||||
->whereBetween('expiration_date', [Carbon::now(), Carbon::now()->addDays($days)]);
|
||||
})
|
||||
|
||||
// Handle expired licenses with termination dates in the future
|
||||
->orWhere(function ($query) use ($days) {
|
||||
$query->whereBetween('termination_date', [Carbon::now(), Carbon::now()->addDays($days)]);
|
||||
});
|
||||
})
|
||||
return self::whereNotNull('expiration_date')
|
||||
->whereNull('deleted_at')
|
||||
->whereRaw('DATE_SUB(`expiration_date`,INTERVAL '.$days.' DAY) <= DATE(NOW()) ')
|
||||
->where('expiration_date', '>', date('Y-m-d'))
|
||||
->orderBy('expiration_date', 'ASC')
|
||||
->orderBy('termination_date', 'ASC')
|
||||
->get();
|
||||
}
|
||||
|
||||
public function scopeActiveLicenses($query)
|
||||
{
|
||||
|
||||
return $query->whereNull('licenses.deleted_at')
|
||||
|
||||
// The termination date is null or within range
|
||||
->where(function ($query) {
|
||||
$query->whereNull('termination_date')
|
||||
->orWhereDate('termination_date', '>', [Carbon::now()]);
|
||||
})
|
||||
->where(function ($query) {
|
||||
$query->whereNull('expiration_date')
|
||||
->orWhereDate('expiration_date', '>', [Carbon::now()]);
|
||||
});
|
||||
}
|
||||
|
||||
public function scopeExpiredLicenses($query)
|
||||
{
|
||||
|
||||
return $query->whereNull('licenses.deleted_at')
|
||||
|
||||
// The termination date is null or within range
|
||||
->where(function ($query) {
|
||||
$query->whereNull('termination_date')
|
||||
->orWhereDate('termination_date', '<=', [Carbon::now()]);
|
||||
})
|
||||
->orWhere(function ($query) {
|
||||
$query->whereNull('expiration_date')
|
||||
->orWhereDate('expiration_date', '<=', [Carbon::now()]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Query builder scope to order on manufacturer
|
||||
*
|
||||
|
||||
@@ -7,7 +7,6 @@ use App\Models\Traits\CompanyableChildTrait;
|
||||
use App\Notifications\CheckinLicenseNotification;
|
||||
use App\Notifications\CheckoutLicenseNotification;
|
||||
use App\Presenters\Presentable;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
@@ -65,21 +64,6 @@ class LicenseSeat extends SnipeModel implements ICompanyableChild
|
||||
return $this->license->getEula();
|
||||
}
|
||||
|
||||
protected function name(): Attribute
|
||||
{
|
||||
return Attribute:: make(
|
||||
get: fn(mixed $value) => $this->license->name,
|
||||
);
|
||||
}
|
||||
|
||||
protected function displayName(): Attribute
|
||||
{
|
||||
return Attribute:: make(
|
||||
get: fn(mixed $value) => $this->license->name,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Establishes the seat -> license relationship
|
||||
*
|
||||
|
||||
@@ -43,7 +43,6 @@ class Location extends SnipeModel
|
||||
'company_id' => 'integer',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* Whether the model should inject its identifier to the unique
|
||||
* validation rules before attempting validation. If this property
|
||||
@@ -114,19 +113,13 @@ class Location extends SnipeModel
|
||||
{
|
||||
|
||||
return Gate::allows('delete', $this)
|
||||
&& ($this->deleted_at == '')
|
||||
&& (($this->assets_count ?? $this->assets()->count()) === 0)
|
||||
&& (($this->assigned_assets_count ?? $this->assignedAssets()->count()) === 0)
|
||||
&& (($this->accessories_count ?? $this->accessories()->count()) === 0)
|
||||
&& (($this->assigned_accessories_count ?? $this->assignedAccessories()->count()) === 0)
|
||||
&& (($this->children_count ?? $this->children()->count()) === 0)
|
||||
&& (($this->components_count ?? $this->components()->count()) === 0)
|
||||
&& (($this->consumables_count ?? $this->consumables()->count()) === 0)
|
||||
&& (($this->rtd_assets_count ?? $this->rtd_assets()->count()) === 0)
|
||||
&& (($this->users_count ?? $this->users()->count()) === 0);
|
||||
&& ($this->assets_count == 0)
|
||||
&& ($this->assigned_assets_count == 0)
|
||||
&& ($this->children_count == 0)
|
||||
&& ($this->accessories_count == 0)
|
||||
&& ($this->users_count == 0);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Establishes the user -> location relationship
|
||||
*
|
||||
|
||||
@@ -3,10 +3,8 @@
|
||||
namespace App\Models;
|
||||
|
||||
use App\Helpers\Helper;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Facades\Request;
|
||||
|
||||
class SnipeModel extends Model
|
||||
{
|
||||
@@ -158,20 +156,6 @@ class SnipeModel extends Model
|
||||
$this->attributes['status_id'] = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies offset (from request) and limit to query.
|
||||
*
|
||||
* @param Builder $query
|
||||
* @param int $total
|
||||
* @return void
|
||||
*/
|
||||
public function scopeApplyOffsetAndLimit(Builder $query, int $total)
|
||||
{
|
||||
$offset = (Request::input('offset') > $total) ? $total : app('api_offset_value');
|
||||
$limit = app('api_limit_value');
|
||||
|
||||
$query->skip($offset)->take($limit);
|
||||
}
|
||||
|
||||
protected function displayName(): Attribute
|
||||
{
|
||||
@@ -180,27 +164,5 @@ class SnipeModel extends Model
|
||||
);
|
||||
}
|
||||
|
||||
public function getEula()
|
||||
{
|
||||
|
||||
// This is - for now - only for assets, where the asset model is the thing tied to the category
|
||||
if (($this->model) && ($this->model->category)) {
|
||||
if (($this->model->category->eula_text) && ($this->model->category->use_default_eula == 0)) {
|
||||
return $this->model->category->eula_text;
|
||||
} elseif ($this->model->category->use_default_eula == 1) {
|
||||
return Setting::getSettings()->default_eula_text;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
// For everything else, just check the category for EULA info
|
||||
} elseif (($this->category) && ($this->category->eula_text)) {
|
||||
return $this->category->eula_text;
|
||||
} elseif ((Setting::getSettings()->default_eula_text) && (($this->category) && ($this->category->use_default_eula == '1'))) {
|
||||
return Setting::getSettings()->default_eula_text;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Notifications;
|
||||
|
||||
use AllowDynamicProperties;
|
||||
use App\Helpers\Helper;
|
||||
use App\Models\Setting;
|
||||
use Illuminate\Bus\Queueable;
|
||||
@@ -11,7 +10,7 @@ use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Messages\SlackMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
|
||||
#[AllowDynamicProperties] class AcceptanceAssetAcceptedNotification extends Notification
|
||||
class AcceptanceAssetAcceptedNotification extends Notification
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
@@ -23,18 +22,15 @@ use Illuminate\Notifications\Notification;
|
||||
public function __construct($params)
|
||||
{
|
||||
$this->item_tag = $params['item_tag'];
|
||||
$this->item_name = $params['item_name'];
|
||||
$this->item_model = $params['item_model'];
|
||||
$this->item_serial = $params['item_serial'];
|
||||
$this->item_status = $params['item_status'];
|
||||
$this->accepted_date = Helper::getFormattedDateObject($params['accepted_date'], 'datetime', false);
|
||||
$this->accepted_date = Helper::getFormattedDateObject($params['accepted_date'], 'date', false);
|
||||
$this->assigned_to = $params['assigned_to'];
|
||||
$this->note = $params['note'];
|
||||
$this->company_name = $params['company_name'];
|
||||
$this->settings = Setting::getSettings();
|
||||
$this->file = $params['file'] ?? null;
|
||||
$this->qty = $params['qty'] ?? null;
|
||||
$this->note = $params['note'] ?? null;
|
||||
$this->admin = $params['admin'] ?? null;
|
||||
$this->settings = Setting::getSettings();
|
||||
|
||||
}
|
||||
|
||||
@@ -69,7 +65,6 @@ use Illuminate\Notifications\Notification;
|
||||
$message = (new MailMessage)->markdown('notifications.markdown.asset-acceptance',
|
||||
[
|
||||
'item_tag' => $this->item_tag,
|
||||
'item_name' => $this->item_name,
|
||||
'item_model' => $this->item_model,
|
||||
'item_serial' => $this->item_serial,
|
||||
'item_status' => $this->item_status,
|
||||
@@ -77,9 +72,8 @@ use Illuminate\Notifications\Notification;
|
||||
'accepted_date' => $this->accepted_date,
|
||||
'assigned_to' => $this->assigned_to,
|
||||
'company_name' => $this->company_name,
|
||||
'admin' => $this->admin,
|
||||
'qty' => $this->qty,
|
||||
'intro_text' => trans('mail.acceptance_asset_accepted'),
|
||||
'admin' => $this->admin,
|
||||
])
|
||||
->subject(trans('mail.acceptance_asset_accepted'));
|
||||
|
||||
|
||||
@@ -2,14 +2,13 @@
|
||||
|
||||
namespace App\Notifications;
|
||||
|
||||
use AllowDynamicProperties;
|
||||
use App\Helpers\Helper;
|
||||
use App\Models\Setting;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
|
||||
#[AllowDynamicProperties] class AcceptanceAssetAcceptedToUserNotification extends Notification
|
||||
class AcceptanceAssetAcceptedToUserNotification extends Notification
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
@@ -21,18 +20,16 @@ use Illuminate\Notifications\Notification;
|
||||
public function __construct($params)
|
||||
{
|
||||
$this->item_tag = $params['item_tag'];
|
||||
$this->item_name = $params['item_name'];
|
||||
$this->item_model = $params['item_model'];
|
||||
$this->item_serial = $params['item_serial'];
|
||||
$this->item_status = $params['item_status'];
|
||||
$this->accepted_date = Helper::getFormattedDateObject($params['accepted_date'], 'datetime', false);
|
||||
$this->accepted_date = Helper::getFormattedDateObject($params['accepted_date'], 'date', false);
|
||||
$this->assigned_to = $params['assigned_to'];
|
||||
$this->note = $params['note'] ?? null;
|
||||
$this->note = $params['note'];
|
||||
$this->company_name = $params['company_name'];
|
||||
$this->settings = Setting::getSettings();
|
||||
$this->file = $params['file'] ?? null;
|
||||
$this->qty = $params['qty'] ?? null;
|
||||
$this->admin = $params['admin'] ?? null;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -62,7 +59,6 @@ use Illuminate\Notifications\Notification;
|
||||
$message = (new MailMessage)->markdown('notifications.markdown.asset-acceptance',
|
||||
[
|
||||
'item_tag' => $this->item_tag,
|
||||
'item_name' => $this->item_name,
|
||||
'item_model' => $this->item_model,
|
||||
'item_serial' => $this->item_serial,
|
||||
'item_status' => $this->item_status,
|
||||
@@ -70,12 +66,10 @@ use Illuminate\Notifications\Notification;
|
||||
'accepted_date' => $this->accepted_date,
|
||||
'assigned_to' => $this->assigned_to,
|
||||
'company_name' => $this->company_name,
|
||||
'admin' => $this->admin,
|
||||
'qty' => $this->qty,
|
||||
'intro_text' => trans_choice('mail.acceptance_asset_accepted_to_user', $this->qty, ['qty' => $this->qty, 'site_name' => $this->settings->site_name]),
|
||||
'intro_text' => trans('mail.acceptance_asset_accepted_to_user', ['site_name' => $this->company_name ?? $this->settings->site_name]),
|
||||
])
|
||||
->attach($pdf_path)
|
||||
->subject(trans_choice('mail.acceptance_asset_accepted_to_user', $this->qty, ['qty' => $this->qty, 'site_name' => $this->settings->site_name]));
|
||||
->subject(trans('mail.acceptance_asset_accepted_to_user', ['site_name' => $this->settings->site_name]));
|
||||
|
||||
return $message;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,6 @@ class AcceptanceAssetDeclinedNotification extends Notification
|
||||
$this->assigned_to = $params['assigned_to'];
|
||||
$this->company_name = $params['company_name'];
|
||||
$this->settings = Setting::getSettings();
|
||||
$this->qty = $params['qty'] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -70,7 +69,6 @@ class AcceptanceAssetDeclinedNotification extends Notification
|
||||
'declined_date' => $this->declined_date,
|
||||
'assigned_to' => $this->assigned_to,
|
||||
'company_name' => $this->company_name,
|
||||
'qty' => $this->qty,
|
||||
'intro_text' => trans('mail.acceptance_asset_declined'),
|
||||
])
|
||||
->subject(trans('mail.acceptance_asset_declined'));
|
||||
|
||||
@@ -61,7 +61,7 @@ use NotificationChannels\MicrosoftTeams\MicrosoftTeamsMessage;
|
||||
->from(($this->settings->webhook_botname) ? $this->settings->webhook_botname : 'Snipe-Bot')
|
||||
->to($channel)
|
||||
->attachment(function ($attachment) {
|
||||
$item = $this->params['item'] ?? null;
|
||||
$item = $this->params['item'];
|
||||
$admin_user = $this->params['admin'];
|
||||
$fields = [
|
||||
'By' => '<'.$admin_user->present()->viewUrl().'|'.$admin_user->display_name.'>',
|
||||
|
||||
@@ -120,13 +120,7 @@ class AccessoryPresenter extends Presenter
|
||||
'field' => 'purchase_cost',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'title' => trans('general.unit_cost'),
|
||||
'class' => 'text-right text-padding-number-cell',
|
||||
], [
|
||||
'field' => 'total_cost',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'title' => trans('general.total_cost'),
|
||||
'title' => trans('general.purchase_cost'),
|
||||
'footerFormatter' => 'sumFormatterQuantity',
|
||||
'class' => 'text-right text-padding-number-cell',
|
||||
], [
|
||||
|
||||
@@ -79,25 +79,6 @@ class ComponentPresenter extends Presenter
|
||||
'title' => trans('general.manufacturer'),
|
||||
'visible' => false,
|
||||
'formatter' => 'manufacturersLinkObjFormatter',
|
||||
], [
|
||||
'field' => 'location',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'title' => trans('general.location'),
|
||||
'formatter' => 'locationsLinkObjFormatter',
|
||||
], [
|
||||
'field' => 'order_number',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'title' => trans('general.order_number'),
|
||||
'visible' => true,
|
||||
], [
|
||||
'field' => 'purchase_date',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'title' => trans('general.purchase_date'),
|
||||
'visible' => true,
|
||||
'formatter' => 'dateDisplayFormatter',
|
||||
], [
|
||||
'field' => 'min_amt',
|
||||
'searchable' => false,
|
||||
@@ -122,20 +103,33 @@ class ComponentPresenter extends Presenter
|
||||
'visible' => true,
|
||||
'class' => 'text-right text-padding-number-cell',
|
||||
'footerFormatter' => 'qtySumFormatter',
|
||||
], [
|
||||
'field' => 'location',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'title' => trans('general.location'),
|
||||
'formatter' => 'locationsLinkObjFormatter',
|
||||
], [
|
||||
'field' => 'order_number',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'title' => trans('general.order_number'),
|
||||
'visible' => true,
|
||||
], [
|
||||
'field' => 'purchase_date',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'title' => trans('general.purchase_date'),
|
||||
'visible' => true,
|
||||
'formatter' => 'dateDisplayFormatter',
|
||||
], [
|
||||
'field' => 'purchase_cost',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'title' => trans('general.unit_cost'),
|
||||
'title' => trans('general.purchase_cost'),
|
||||
'visible' => true,
|
||||
'class' => 'text-right',
|
||||
], [
|
||||
'field' => 'total_cost',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'title' => trans('general.total_cost'),
|
||||
'footerFormatter' => 'sumFormatterQuantity',
|
||||
'class' => 'text-right text-padding-number-cell',
|
||||
'class' => 'text-right',
|
||||
], [
|
||||
'field' => 'notes',
|
||||
'searchable' => true,
|
||||
|
||||
@@ -67,6 +67,35 @@ class ConsumablePresenter extends Presenter
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'title' => trans('general.model_no'),
|
||||
], [
|
||||
'field' => 'item_no',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'title' => trans('admin/consumables/general.item_no'),
|
||||
], [
|
||||
'field' => 'qty',
|
||||
'searchable' => false,
|
||||
'sortable' => true,
|
||||
'title' => trans('admin/components/general.total'),
|
||||
'visible' => true,
|
||||
'class' => 'text-right text-padding-number-cell',
|
||||
'footerFormatter' => 'qtySumFormatter',
|
||||
], [
|
||||
'field' => 'remaining',
|
||||
'searchable' => false,
|
||||
'sortable' => true,
|
||||
'title' => trans('admin/components/general.remaining'),
|
||||
'visible' => true,
|
||||
'class' => 'text-right text-padding-number-cell',
|
||||
'footerFormatter' => 'qtySumFormatter',
|
||||
], [
|
||||
'field' => 'min_amt',
|
||||
'searchable' => false,
|
||||
'sortable' => true,
|
||||
'title' => trans('general.min_amt'),
|
||||
'visible' => true,
|
||||
'formatter' => 'minAmtFormatter',
|
||||
'class' => 'text-right text-padding-number-cell',
|
||||
], [
|
||||
'field' => 'location',
|
||||
'searchable' => true,
|
||||
@@ -74,12 +103,6 @@ class ConsumablePresenter extends Presenter
|
||||
'title' => trans('general.location'),
|
||||
'formatter' => 'locationsLinkObjFormatter',
|
||||
], [
|
||||
'field' => 'item_no',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'title' => trans('admin/consumables/general.item_no'),
|
||||
], [
|
||||
|
||||
'field' => 'manufacturer',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
@@ -99,42 +122,12 @@ class ConsumablePresenter extends Presenter
|
||||
'title' => trans('general.purchase_date'),
|
||||
'visible' => true,
|
||||
'formatter' => 'dateDisplayFormatter',
|
||||
], [
|
||||
'field' => 'min_amt',
|
||||
'searchable' => false,
|
||||
'sortable' => true,
|
||||
'title' => trans('general.min_amt'),
|
||||
'visible' => true,
|
||||
'formatter' => 'minAmtFormatter',
|
||||
'class' => 'text-right text-padding-number-cell',
|
||||
], [
|
||||
'field' => 'qty',
|
||||
'searchable' => false,
|
||||
'sortable' => true,
|
||||
'title' => trans('admin/components/general.total'),
|
||||
'visible' => true,
|
||||
'class' => 'text-right text-padding-number-cell',
|
||||
'footerFormatter' => 'qtySumFormatter',
|
||||
], [
|
||||
'field' => 'remaining',
|
||||
'searchable' => false,
|
||||
'sortable' => true,
|
||||
'title' => trans('admin/components/general.remaining'),
|
||||
'visible' => true,
|
||||
'class' => 'text-right text-padding-number-cell',
|
||||
'footerFormatter' => 'qtySumFormatter',
|
||||
], [
|
||||
'field' => 'purchase_cost',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'title' => trans('general.unit_cost'),
|
||||
'title' => trans('general.purchase_cost'),
|
||||
'visible' => true,
|
||||
'class' => 'text-right text-padding-number-cell',
|
||||
], [
|
||||
'field' => 'total_cost',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'title' => trans('general.total_cost'),
|
||||
'footerFormatter' => 'sumFormatterQuantity',
|
||||
'class' => 'text-right text-padding-number-cell',
|
||||
], [
|
||||
|
||||
@@ -202,7 +202,7 @@ class LicensePresenter extends Presenter
|
||||
'switchable' => false,
|
||||
'title' => trans('general.checkin').'/'.trans('general.checkout'),
|
||||
'visible' => true,
|
||||
'formatter' => 'licenseInOutFormatter',
|
||||
'formatter' => 'licensesInOutFormatter',
|
||||
'printIgnore' => true,
|
||||
];
|
||||
|
||||
|
||||
@@ -61,15 +61,6 @@ class LocationPresenter extends Presenter
|
||||
'title' => trans('admin/locations/table.parent'),
|
||||
'visible' => true,
|
||||
'formatter' => 'locationsLinkObjFormatter',
|
||||
], [
|
||||
'field' => 'users_count',
|
||||
'searchable' => false,
|
||||
'sortable' => true,
|
||||
'switchable' => true,
|
||||
'title' => trans('general.people'),
|
||||
'titleTooltip' => trans('general.people'),
|
||||
'visible' => true,
|
||||
'class' => 'css-house-user',
|
||||
], [
|
||||
'field' => 'assets_count',
|
||||
'searchable' => false,
|
||||
@@ -107,7 +98,7 @@ class LocationPresenter extends Presenter
|
||||
'titleTooltip' => trans('general.accessories'),
|
||||
'visible' => true,
|
||||
'class' => 'css-accessory',
|
||||
],[
|
||||
], [
|
||||
'field' => 'assigned_accessories_count',
|
||||
'searchable' => false,
|
||||
'sortable' => true,
|
||||
@@ -117,34 +108,14 @@ class LocationPresenter extends Presenter
|
||||
'visible' => true,
|
||||
'class' => 'css-accessory-alt',
|
||||
], [
|
||||
'field' => 'components_count',
|
||||
'field' => 'users_count',
|
||||
'searchable' => false,
|
||||
'sortable' => true,
|
||||
'switchable' => true,
|
||||
'title' => trans('general.components'),
|
||||
'titleTooltip' => trans('general.components'),
|
||||
'title' => trans('general.people'),
|
||||
'titleTooltip' => trans('general.people'),
|
||||
'visible' => true,
|
||||
'class' => 'css-component',
|
||||
],
|
||||
[
|
||||
'field' => 'consumables_count',
|
||||
'searchable' => false,
|
||||
'sortable' => true,
|
||||
'switchable' => true,
|
||||
'title' => trans('general.consumables'),
|
||||
'titleTooltip' => trans('general.consumables'),
|
||||
'visible' => true,
|
||||
'class' => 'css-consumable',
|
||||
],
|
||||
[
|
||||
'field' => 'children_count',
|
||||
'searchable' => false,
|
||||
'sortable' => true,
|
||||
'switchable' => true,
|
||||
'title' => trans('general.child_locations'),
|
||||
'titleTooltip' => trans('general.child_locations'),
|
||||
'visible' => true,
|
||||
'class' => 'css-child-locations',
|
||||
'class' => 'css-house-user',
|
||||
], [
|
||||
'field' => 'currency',
|
||||
'searchable' => true,
|
||||
|
||||
@@ -60,14 +60,18 @@ class UserPresenter extends Presenter
|
||||
'title' => trans('admin/users/table.name'),
|
||||
'visible' => true,
|
||||
'formatter' => 'usersLinkFormatter',
|
||||
], [
|
||||
],
|
||||
|
||||
[
|
||||
'field' => 'first_name',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'title' => trans('general.first_name'),
|
||||
'visible' => false,
|
||||
'formatter' => 'usersLinkFormatter',
|
||||
], [
|
||||
],
|
||||
|
||||
[
|
||||
'field' => 'last_name',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
@@ -81,23 +85,7 @@ class UserPresenter extends Presenter
|
||||
'sortable' => true,
|
||||
'switchable' => false,
|
||||
'title' => trans('admin/users/table.display_name'),
|
||||
'visible' => false,
|
||||
], [
|
||||
'field' => 'username',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'switchable' => false,
|
||||
'title' => trans('admin/users/table.username'),
|
||||
'visible' => true,
|
||||
'formatter' => 'usernameRoleLinkFormatter',
|
||||
],
|
||||
[
|
||||
'field' => 'employee_num',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'switchable' => true,
|
||||
'title' => trans('general.employee_number'),
|
||||
'visible' => false,
|
||||
],
|
||||
[
|
||||
'field' => 'jobtitle',
|
||||
@@ -141,7 +129,7 @@ class UserPresenter extends Presenter
|
||||
'sortable' => true,
|
||||
'switchable' => true,
|
||||
'title' => trans('admin/users/table.phone'),
|
||||
'visible' => false,
|
||||
'visible' => true,
|
||||
'formatter' => 'phoneFormatter',
|
||||
],
|
||||
[
|
||||
@@ -202,7 +190,24 @@ class UserPresenter extends Presenter
|
||||
'title' => trans('general.zip'),
|
||||
'visible' => false,
|
||||
],
|
||||
[
|
||||
'field' => 'username',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'switchable' => false,
|
||||
'title' => trans('admin/users/table.username'),
|
||||
'visible' => true,
|
||||
'formatter' => 'usernameRoleLinkFormatter',
|
||||
],
|
||||
|
||||
[
|
||||
'field' => 'employee_num',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'switchable' => true,
|
||||
'title' => trans('general.employee_number'),
|
||||
'visible' => false,
|
||||
],
|
||||
[
|
||||
'field' => 'locale',
|
||||
'searchable' => true,
|
||||
@@ -226,7 +231,7 @@ class UserPresenter extends Presenter
|
||||
'sortable' => true,
|
||||
'switchable' => true,
|
||||
'title' => trans('admin/users/general.department_manager'),
|
||||
'visible' => false,
|
||||
'visible' => true,
|
||||
'formatter' => 'usersLinkObjFormatter',
|
||||
],
|
||||
[
|
||||
@@ -243,7 +248,7 @@ class UserPresenter extends Presenter
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'title' => trans('admin/users/table.manager'),
|
||||
'visible' => false,
|
||||
'visible' => true,
|
||||
'formatter' => 'usersLinkObjFormatter',
|
||||
],
|
||||
[
|
||||
|
||||
@@ -349,19 +349,10 @@ class BreadcrumbsServiceProvider extends ServiceProvider
|
||||
/**
|
||||
* Licenses Breadcrumbs
|
||||
*/
|
||||
if ((request()->is('licenses*')) && (request()->status=='inactive')) {
|
||||
Breadcrumbs::for('licenses.index', fn (Trail $trail) =>
|
||||
$trail->parent('home', route('home'))
|
||||
->push(trans('general.licenses'), route('licenses.index'))
|
||||
->push(trans('general.show_inactive'), route('licenses.index'))
|
||||
);
|
||||
} else {
|
||||
Breadcrumbs::for('licenses.index', fn (Trail $trail) =>
|
||||
$trail->parent('home', route('home'))
|
||||
->push(trans('general.licenses'), route('licenses.index'))
|
||||
);
|
||||
}
|
||||
|
||||
Breadcrumbs::for('licenses.index', fn (Trail $trail) =>
|
||||
$trail->parent('home', route('home'))
|
||||
->push(trans('general.licenses'), route('licenses.index'))
|
||||
);
|
||||
|
||||
Breadcrumbs::for('licenses.create', fn (Trail $trail) =>
|
||||
$trail->parent('licenses.index', route('licenses.index'))
|
||||
|
||||
@@ -73,7 +73,6 @@
|
||||
"spatie/laravel-ignition": "^2.0",
|
||||
"tabuna/breadcrumbs": "^4.2",
|
||||
"tecnickcom/tc-lib-barcode": "^1.15",
|
||||
"tecnickcom/tc-lib-pdf-font": "^2.6",
|
||||
"tecnickcom/tcpdf": "^6.5",
|
||||
"unicodeveloper/laravel-password": "^1.0",
|
||||
"watson/validating": "^8.1"
|
||||
|
||||
413
composer.lock
generated
413
composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "553ce69c21704905c568769de08fffe4",
|
||||
"content-hash": "1eb239d3c2ef234a07167a8bef9230d8",
|
||||
"packages": [
|
||||
{
|
||||
"name": "alek13/slack",
|
||||
@@ -190,16 +190,16 @@
|
||||
},
|
||||
{
|
||||
"name": "aws/aws-sdk-php",
|
||||
"version": "3.356.17",
|
||||
"version": "3.356.11",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/aws/aws-sdk-php.git",
|
||||
"reference": "d0357fbe2535bb7d832e594a4ff2ff8da29d229c"
|
||||
"reference": "9dcb228185d441cedd4e6fe76905f6a6cdf83a9c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/d0357fbe2535bb7d832e594a4ff2ff8da29d229c",
|
||||
"reference": "d0357fbe2535bb7d832e594a4ff2ff8da29d229c",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/9dcb228185d441cedd4e6fe76905f6a6cdf83a9c",
|
||||
"reference": "9dcb228185d441cedd4e6fe76905f6a6cdf83a9c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -212,7 +212,7 @@
|
||||
"guzzlehttp/psr7": "^2.4.5",
|
||||
"mtdowling/jmespath.php": "^2.8.0",
|
||||
"php": ">=8.1",
|
||||
"psr/http-message": "^1.0 || ^2.0"
|
||||
"psr/http-message": "^2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"andrewsville/php-token-reflection": "^1.4",
|
||||
@@ -281,9 +281,9 @@
|
||||
"support": {
|
||||
"forum": "https://github.com/aws/aws-sdk-php/discussions",
|
||||
"issues": "https://github.com/aws/aws-sdk-php/issues",
|
||||
"source": "https://github.com/aws/aws-sdk-php/tree/3.356.17"
|
||||
"source": "https://github.com/aws/aws-sdk-php/tree/3.356.11"
|
||||
},
|
||||
"time": "2025-09-12T18:07:37+00:00"
|
||||
"time": "2025-09-04T18:06:33+00:00"
|
||||
},
|
||||
{
|
||||
"name": "bacon/bacon-qr-code",
|
||||
@@ -2662,16 +2662,16 @@
|
||||
},
|
||||
{
|
||||
"name": "laravel/framework",
|
||||
"version": "v11.46.0",
|
||||
"version": "v11.45.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/framework.git",
|
||||
"reference": "2c6d85f22d08123ad45aa3a6726b16f06e68eecd"
|
||||
"reference": "f88bacee8daae65774ca8aa0f0bd32293e4f82b0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/2c6d85f22d08123ad45aa3a6726b16f06e68eecd",
|
||||
"reference": "2c6d85f22d08123ad45aa3a6726b16f06e68eecd",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/f88bacee8daae65774ca8aa0f0bd32293e4f82b0",
|
||||
"reference": "f88bacee8daae65774ca8aa0f0bd32293e4f82b0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2873,7 +2873,7 @@
|
||||
"issues": "https://github.com/laravel/framework/issues",
|
||||
"source": "https://github.com/laravel/framework"
|
||||
},
|
||||
"time": "2025-09-08T21:54:34+00:00"
|
||||
"time": "2025-09-02T23:56:44+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/helpers",
|
||||
@@ -3731,16 +3731,16 @@
|
||||
},
|
||||
{
|
||||
"name": "league/csv",
|
||||
"version": "9.25.0",
|
||||
"version": "9.24.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/csv.git",
|
||||
"reference": "f856f532866369fb1debe4e7c5a1db185f40ef86"
|
||||
"reference": "e0221a3f16aa2a823047d59fab5809d552e29bc8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/csv/zipball/f856f532866369fb1debe4e7c5a1db185f40ef86",
|
||||
"reference": "f856f532866369fb1debe4e7c5a1db185f40ef86",
|
||||
"url": "https://api.github.com/repos/thephpleague/csv/zipball/e0221a3f16aa2a823047d59fab5809d552e29bc8",
|
||||
"reference": "e0221a3f16aa2a823047d59fab5809d552e29bc8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3756,7 +3756,7 @@
|
||||
"phpstan/phpstan-deprecation-rules": "^1.2.1",
|
||||
"phpstan/phpstan-phpunit": "^1.4.2",
|
||||
"phpstan/phpstan-strict-rules": "^1.6.2",
|
||||
"phpunit/phpunit": "^10.5.16 || ^11.5.22 || ^12.3.6",
|
||||
"phpunit/phpunit": "^10.5.16 || ^11.5.22",
|
||||
"symfony/var-dumper": "^6.4.8 || ^7.3.0"
|
||||
},
|
||||
"suggest": {
|
||||
@@ -3818,7 +3818,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2025-09-11T08:29:08+00:00"
|
||||
"time": "2025-06-25T14:53:51+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/event",
|
||||
@@ -4810,16 +4810,16 @@
|
||||
},
|
||||
{
|
||||
"name": "nesbot/carbon",
|
||||
"version": "3.10.3",
|
||||
"version": "3.10.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/CarbonPHP/carbon.git",
|
||||
"reference": "8e3643dcd149ae0fe1d2ff4f2c8e4bbfad7c165f"
|
||||
"reference": "76b5c07b8a9d2025ed1610e14cef1f3fd6ad2c24"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/8e3643dcd149ae0fe1d2ff4f2c8e4bbfad7c165f",
|
||||
"reference": "8e3643dcd149ae0fe1d2ff4f2c8e4bbfad7c165f",
|
||||
"url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/76b5c07b8a9d2025ed1610e14cef1f3fd6ad2c24",
|
||||
"reference": "76b5c07b8a9d2025ed1610e14cef1f3fd6ad2c24",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -4837,13 +4837,13 @@
|
||||
"require-dev": {
|
||||
"doctrine/dbal": "^3.6.3 || ^4.0",
|
||||
"doctrine/orm": "^2.15.2 || ^3.0",
|
||||
"friendsofphp/php-cs-fixer": "^v3.87.1",
|
||||
"friendsofphp/php-cs-fixer": "^3.75.0",
|
||||
"kylekatarnls/multi-tester": "^2.5.3",
|
||||
"phpmd/phpmd": "^2.15.0",
|
||||
"phpstan/extension-installer": "^1.4.3",
|
||||
"phpstan/phpstan": "^2.1.22",
|
||||
"phpunit/phpunit": "^10.5.53",
|
||||
"squizlabs/php_codesniffer": "^3.13.4"
|
||||
"phpstan/phpstan": "^2.1.17",
|
||||
"phpunit/phpunit": "^10.5.46",
|
||||
"squizlabs/php_codesniffer": "^3.13.0"
|
||||
},
|
||||
"bin": [
|
||||
"bin/carbon"
|
||||
@@ -4911,7 +4911,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-09-06T13:39:36+00:00"
|
||||
"time": "2025-08-02T09:36:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nette/schema",
|
||||
@@ -7494,16 +7494,16 @@
|
||||
},
|
||||
{
|
||||
"name": "sebastian/comparator",
|
||||
"version": "5.0.4",
|
||||
"version": "5.0.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/comparator.git",
|
||||
"reference": "e8e53097718d2b53cfb2aa859b06a41abf58c62e"
|
||||
"reference": "a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/e8e53097718d2b53cfb2aa859b06a41abf58c62e",
|
||||
"reference": "e8e53097718d2b53cfb2aa859b06a41abf58c62e",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e",
|
||||
"reference": "a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -7559,27 +7559,15 @@
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/comparator/issues",
|
||||
"security": "https://github.com/sebastianbergmann/comparator/security/policy",
|
||||
"source": "https://github.com/sebastianbergmann/comparator/tree/5.0.4"
|
||||
"source": "https://github.com/sebastianbergmann/comparator/tree/5.0.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/sebastianbergmann",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://liberapay.com/sebastianbergmann",
|
||||
"type": "liberapay"
|
||||
},
|
||||
{
|
||||
"url": "https://thanks.dev/u/gh/sebastianbergmann",
|
||||
"type": "thanks_dev"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/sebastian/comparator",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-09-07T05:25:07+00:00"
|
||||
"time": "2024-10-18T14:56:07+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/diff",
|
||||
@@ -11181,271 +11169,6 @@
|
||||
],
|
||||
"time": "2023-10-23T09:28:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "tecnickcom/tc-lib-file",
|
||||
"version": "2.2.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/tecnickcom/tc-lib-file.git",
|
||||
"reference": "ec6989700b77baa8a8d88952ad4fd8f53211c370"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/tecnickcom/tc-lib-file/zipball/ec6989700b77baa8a8d88952ad4fd8f53211c370",
|
||||
"reference": "ec6989700b77baa8a8d88952ad4fd8f53211c370",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-curl": "*",
|
||||
"ext-pcre": "*",
|
||||
"php": ">=8.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"pdepend/pdepend": "2.16.2",
|
||||
"phpmd/phpmd": "2.15.0",
|
||||
"phpunit/phpunit": "12.2.0 || 11.5.7 || 10.5.40",
|
||||
"squizlabs/php_codesniffer": "3.13.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Com\\Tecnick\\File\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL-3.0-or-later"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicola Asuni",
|
||||
"email": "info@tecnick.com",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "PHP library to read byte-level data from files",
|
||||
"homepage": "http://www.tecnick.com",
|
||||
"keywords": [
|
||||
"Double",
|
||||
"bit",
|
||||
"byte",
|
||||
"file",
|
||||
"long",
|
||||
"read",
|
||||
"short",
|
||||
"tc-lib-file"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/tecnickcom/tc-lib-file/issues",
|
||||
"source": "https://github.com/tecnickcom/tc-lib-file/tree/2.2.2"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://www.paypal.com/donate/?hosted_button_id=NZUEC5XS8MFBJ",
|
||||
"type": "custom"
|
||||
}
|
||||
],
|
||||
"time": "2025-06-06T11:33:32+00:00"
|
||||
},
|
||||
{
|
||||
"name": "tecnickcom/tc-lib-pdf-encrypt",
|
||||
"version": "2.1.16",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/tecnickcom/tc-lib-pdf-encrypt.git",
|
||||
"reference": "4e154df154e586523033187dfc54a2a8e113a7db"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/tecnickcom/tc-lib-pdf-encrypt/zipball/4e154df154e586523033187dfc54a2a8e113a7db",
|
||||
"reference": "4e154df154e586523033187dfc54a2a8e113a7db",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-date": "*",
|
||||
"ext-hash": "*",
|
||||
"ext-openssl": "*",
|
||||
"ext-pcre": "*",
|
||||
"php": ">=8.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"pdepend/pdepend": "2.16.2",
|
||||
"phpmd/phpmd": "2.15.0",
|
||||
"phpunit/phpunit": "12.2.0 || 11.5.7 || 10.5.40",
|
||||
"squizlabs/php_codesniffer": "3.13.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-posix": "*"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Com\\Tecnick\\Pdf\\Encrypt\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL-3.0-or-later"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicola Asuni",
|
||||
"email": "info@tecnick.com",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "PHP library to encrypt data for PDF",
|
||||
"homepage": "http://www.tecnick.com",
|
||||
"keywords": [
|
||||
"aes",
|
||||
"encrypt",
|
||||
"encryption",
|
||||
"pdf",
|
||||
"rc4",
|
||||
"tc-lib-pdf-encrypt"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/tecnickcom/tc-lib-pdf-encrypt/issues",
|
||||
"source": "https://github.com/tecnickcom/tc-lib-pdf-encrypt/tree/2.1.16"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://www.paypal.com/donate/?hosted_button_id=NZUEC5XS8MFBJ",
|
||||
"type": "custom"
|
||||
}
|
||||
],
|
||||
"time": "2025-06-06T11:33:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "tecnickcom/tc-lib-pdf-font",
|
||||
"version": "2.6.12",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/tecnickcom/tc-lib-pdf-font.git",
|
||||
"reference": "961ddeb8f02c7186e9efcf37693cbd1f21af1dc1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/tecnickcom/tc-lib-pdf-font/zipball/961ddeb8f02c7186e9efcf37693cbd1f21af1dc1",
|
||||
"reference": "961ddeb8f02c7186e9efcf37693cbd1f21af1dc1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"ext-pcre": "*",
|
||||
"ext-zlib": "*",
|
||||
"php": ">=8.1",
|
||||
"tecnickcom/tc-lib-file": "^2.2",
|
||||
"tecnickcom/tc-lib-pdf-encrypt": "^2.1",
|
||||
"tecnickcom/tc-lib-unicode-data": "^2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"pdepend/pdepend": "2.16.2",
|
||||
"phpmd/phpmd": "2.15.0",
|
||||
"phpunit/phpunit": "12.2.0 || 11.5.7 || 10.5.40",
|
||||
"squizlabs/php_codesniffer": "3.13.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Com\\Tecnick\\Pdf\\Font\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL-3.0-or-later"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicola Asuni",
|
||||
"email": "info@tecnick.com",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "PHP library containing PDF page formats and definitions",
|
||||
"homepage": "http://www.tecnick.com",
|
||||
"keywords": [
|
||||
"PFB",
|
||||
"afm",
|
||||
"font",
|
||||
"import",
|
||||
"pdf",
|
||||
"tc-lib-pdf-font",
|
||||
"ttf"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/tecnickcom/tc-lib-pdf-font/issues",
|
||||
"source": "https://github.com/tecnickcom/tc-lib-pdf-font/tree/2.6.12"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://www.paypal.com/donate/?hosted_button_id=NZUEC5XS8MFBJ",
|
||||
"type": "custom"
|
||||
}
|
||||
],
|
||||
"time": "2025-06-06T12:19:35+00:00"
|
||||
},
|
||||
{
|
||||
"name": "tecnickcom/tc-lib-unicode-data",
|
||||
"version": "2.0.24",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/tecnickcom/tc-lib-unicode-data.git",
|
||||
"reference": "cc0ac553b70ecfda9ffeda71ca2f490bfaff5036"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/tecnickcom/tc-lib-unicode-data/zipball/cc0ac553b70ecfda9ffeda71ca2f490bfaff5036",
|
||||
"reference": "cc0ac553b70ecfda9ffeda71ca2f490bfaff5036",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=8.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"pdepend/pdepend": "2.16.2",
|
||||
"phpmd/phpmd": "2.15.0",
|
||||
"phpunit/phpunit": "12.2.0 || 11.5.7 || 10.5.40",
|
||||
"squizlabs/php_codesniffer": "3.13.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Com\\Tecnick\\Unicode\\Data\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL-3.0-or-later"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicola Asuni",
|
||||
"email": "info@tecnick.com",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "PHP library containing Unicode definitions",
|
||||
"homepage": "http://www.tecnick.com",
|
||||
"keywords": [
|
||||
"font",
|
||||
"pdf",
|
||||
"tc-lib-unicode-data",
|
||||
"unicode",
|
||||
"utf-8"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/tecnickcom/tc-lib-unicode-data/issues",
|
||||
"source": "https://github.com/tecnickcom/tc-lib-unicode-data/tree/2.0.24"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://www.paypal.com/donate/?hosted_button_id=NZUEC5XS8MFBJ",
|
||||
"type": "custom"
|
||||
}
|
||||
],
|
||||
"time": "2025-06-06T11:34:15+00:00"
|
||||
},
|
||||
{
|
||||
"name": "tecnickcom/tcpdf",
|
||||
"version": "6.10.0",
|
||||
@@ -12656,16 +12379,16 @@
|
||||
},
|
||||
{
|
||||
"name": "friendsofphp/php-cs-fixer",
|
||||
"version": "v3.87.2",
|
||||
"version": "v3.87.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
|
||||
"reference": "da5f0a7858c79b56fc0b8c36d3efcfe5f37f0992"
|
||||
"reference": "2f5170365e2a422d0c5421f9c8818b2c078105f6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/da5f0a7858c79b56fc0b8c36d3efcfe5f37f0992",
|
||||
"reference": "da5f0a7858c79b56fc0b8c36d3efcfe5f37f0992",
|
||||
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/2f5170365e2a422d0c5421f9c8818b2c078105f6",
|
||||
"reference": "2f5170365e2a422d0c5421f9c8818b2c078105f6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -12748,7 +12471,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues",
|
||||
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.87.2"
|
||||
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.87.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -12756,7 +12479,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2025-09-10T09:51:40+00:00"
|
||||
"time": "2025-09-02T15:27:36+00:00"
|
||||
},
|
||||
{
|
||||
"name": "hamcrest/hamcrest-php",
|
||||
@@ -12852,16 +12575,16 @@
|
||||
},
|
||||
{
|
||||
"name": "justinrainbow/json-schema",
|
||||
"version": "6.5.2",
|
||||
"version": "6.5.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/jsonrainbow/json-schema.git",
|
||||
"reference": "ac0d369c09653cf7af561f6d91a705bc617a87b8"
|
||||
"reference": "b5ab21e431594897e5bb86343c01f140ba862c26"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/ac0d369c09653cf7af561f6d91a705bc617a87b8",
|
||||
"reference": "ac0d369c09653cf7af561f6d91a705bc617a87b8",
|
||||
"url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/b5ab21e431594897e5bb86343c01f140ba862c26",
|
||||
"reference": "b5ab21e431594897e5bb86343c01f140ba862c26",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -12921,9 +12644,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/jsonrainbow/json-schema/issues",
|
||||
"source": "https://github.com/jsonrainbow/json-schema/tree/6.5.2"
|
||||
"source": "https://github.com/jsonrainbow/json-schema/tree/6.5.1"
|
||||
},
|
||||
"time": "2025-09-09T09:42:27+00:00"
|
||||
"time": "2025-08-29T10:58:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "larastan/larastan",
|
||||
@@ -13168,16 +12891,16 @@
|
||||
},
|
||||
{
|
||||
"name": "marc-mabe/php-enum",
|
||||
"version": "v4.7.2",
|
||||
"version": "v4.7.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/marc-mabe/php-enum.git",
|
||||
"reference": "bb426fcdd65c60fb3638ef741e8782508fda7eef"
|
||||
"reference": "7159809e5cfa041dca28e61f7f7ae58063aae8ed"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/marc-mabe/php-enum/zipball/bb426fcdd65c60fb3638ef741e8782508fda7eef",
|
||||
"reference": "bb426fcdd65c60fb3638ef741e8782508fda7eef",
|
||||
"url": "https://api.github.com/repos/marc-mabe/php-enum/zipball/7159809e5cfa041dca28e61f7f7ae58063aae8ed",
|
||||
"reference": "7159809e5cfa041dca28e61f7f7ae58063aae8ed",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -13235,9 +12958,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/marc-mabe/php-enum/issues",
|
||||
"source": "https://github.com/marc-mabe/php-enum/tree/v4.7.2"
|
||||
"source": "https://github.com/marc-mabe/php-enum/tree/v4.7.1"
|
||||
},
|
||||
"time": "2025-09-14T11:18:39+00:00"
|
||||
"time": "2024-11-28T04:54:44+00:00"
|
||||
},
|
||||
{
|
||||
"name": "mockery/mockery",
|
||||
@@ -14244,16 +13967,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "10.5.55",
|
||||
"version": "10.5.53",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "4b2d546b336876bd9562f24641b08a25335b06b6"
|
||||
"reference": "32768472ebfb6969e6c7399f1c7b09009723f653"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/4b2d546b336876bd9562f24641b08a25335b06b6",
|
||||
"reference": "4b2d546b336876bd9562f24641b08a25335b06b6",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/32768472ebfb6969e6c7399f1c7b09009723f653",
|
||||
"reference": "32768472ebfb6969e6c7399f1c7b09009723f653",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -14274,7 +13997,7 @@
|
||||
"phpunit/php-timer": "^6.0.0",
|
||||
"sebastian/cli-parser": "^2.0.1",
|
||||
"sebastian/code-unit": "^2.0.0",
|
||||
"sebastian/comparator": "^5.0.4",
|
||||
"sebastian/comparator": "^5.0.3",
|
||||
"sebastian/diff": "^5.1.1",
|
||||
"sebastian/environment": "^6.1.0",
|
||||
"sebastian/exporter": "^5.1.2",
|
||||
@@ -14325,7 +14048,7 @@
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
||||
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.55"
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.53"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -14349,7 +14072,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-09-14T06:19:20+00:00"
|
||||
"time": "2025-08-20T14:40:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "react/cache",
|
||||
@@ -15510,32 +15233,32 @@
|
||||
},
|
||||
{
|
||||
"name": "slevomat/coding-standard",
|
||||
"version": "8.22.1",
|
||||
"version": "8.21.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/slevomat/coding-standard.git",
|
||||
"reference": "1dd80bf3b93692bedb21a6623c496887fad05fec"
|
||||
"reference": "2b801e950ae1cceb30bb3c0373141f553c99d3c3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/slevomat/coding-standard/zipball/1dd80bf3b93692bedb21a6623c496887fad05fec",
|
||||
"reference": "1dd80bf3b93692bedb21a6623c496887fad05fec",
|
||||
"url": "https://api.github.com/repos/slevomat/coding-standard/zipball/2b801e950ae1cceb30bb3c0373141f553c99d3c3",
|
||||
"reference": "2b801e950ae1cceb30bb3c0373141f553c99d3c3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7 || ^1.1.2",
|
||||
"php": "^7.4 || ^8.0",
|
||||
"phpstan/phpdoc-parser": "^2.3.0",
|
||||
"squizlabs/php_codesniffer": "^3.13.4"
|
||||
"squizlabs/php_codesniffer": "^3.13.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"phing/phing": "3.0.1|3.1.0",
|
||||
"php-parallel-lint/php-parallel-lint": "1.4.0",
|
||||
"phpstan/phpstan": "2.1.24",
|
||||
"phpstan/phpstan": "2.1.22",
|
||||
"phpstan/phpstan-deprecation-rules": "2.0.3",
|
||||
"phpstan/phpstan-phpunit": "2.0.7",
|
||||
"phpstan/phpstan-strict-rules": "2.0.6",
|
||||
"phpunit/phpunit": "9.6.8|10.5.48|11.4.4|11.5.36|12.3.10"
|
||||
"phpunit/phpunit": "9.6.8|10.5.48|11.4.4|11.5.27|12.3.7"
|
||||
},
|
||||
"type": "phpcodesniffer-standard",
|
||||
"extra": {
|
||||
@@ -15559,7 +15282,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/slevomat/coding-standard/issues",
|
||||
"source": "https://github.com/slevomat/coding-standard/tree/8.22.1"
|
||||
"source": "https://github.com/slevomat/coding-standard/tree/8.21.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -15571,7 +15294,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-09-13T08:53:30+00:00"
|
||||
"time": "2025-08-31T13:32:28+00:00"
|
||||
},
|
||||
{
|
||||
"name": "squizlabs/php_codesniffer",
|
||||
|
||||
@@ -316,7 +316,6 @@ return [
|
||||
Laravel\Socialite\SocialiteServiceProvider::class,
|
||||
Elibyy\TCPDF\ServiceProvider::class,
|
||||
|
||||
|
||||
/*
|
||||
* Application Service Providers...
|
||||
*/
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'mode' => 'utf-8',
|
||||
'format' => 'A4',
|
||||
'author' => '',
|
||||
'subject' => '',
|
||||
'keywords' => '',
|
||||
'creator' => 'Snipe-IT',
|
||||
'display_mode' => 'fullpage',
|
||||
'tempDir' => base_path('../temp/'),
|
||||
'pdf_a' => false,
|
||||
'pdf_a_auto' => false,
|
||||
'icc_profile_path' => '',
|
||||
'mode' => 'utf-8',
|
||||
'format' => 'A4',
|
||||
'author' => '',
|
||||
'subject' => '',
|
||||
'keywords' => '',
|
||||
'creator' => 'Laravel Pdf',
|
||||
'display_mode' => 'fullpage',
|
||||
'tempDir' => base_path('../temp/'),
|
||||
'pdf_a' => false,
|
||||
'pdf_a_auto' => false,
|
||||
'icc_profile_path' => '',
|
||||
'defaultCssFile' => false,
|
||||
'pdfWrapper' => 'misterspelik\LaravelPdf\Wrapper\PdfWrapper',
|
||||
];
|
||||
];
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
return array (
|
||||
'app_version' => 'v8.3.2',
|
||||
'full_app_version' => 'v8.3.2 - build 19905-g028b4e7b7',
|
||||
'build_version' => '19905',
|
||||
'app_version' => 'v8.3.1',
|
||||
'full_app_version' => 'v8.3.1 - build 19577-g7dd493da3',
|
||||
'build_version' => '19577',
|
||||
'prerelease_version' => '',
|
||||
'hash_version' => 'g028b4e7b7',
|
||||
'full_hash' => 'v8.3.2-319-g028b4e7b7',
|
||||
'hash_version' => 'g7dd493da3',
|
||||
'full_hash' => 'v8.3.1-15-g7dd493da3',
|
||||
'branch' => 'develop',
|
||||
);
|
||||
@@ -33,9 +33,9 @@ class LicenseFactory extends Factory
|
||||
'seats' => $this->faker->numberBetween(1, 10),
|
||||
'purchase_date' => $this->faker->dateTimeBetween('-1 years', 'now', date_default_timezone_get())->format('Y-m-d'),
|
||||
'order_number' => $this->faker->numberBetween(1000000, 50000000),
|
||||
'expiration_date' => null,
|
||||
'expiration_date' => $this->faker->dateTimeBetween('now', '+3 years', date_default_timezone_get())->format('Y-m-d H:i:s'),
|
||||
'reassignable' => $this->faker->boolean(),
|
||||
'termination_date' => null,
|
||||
'termination_date' => $this->faker->dateTimeBetween('-1 years', 'now', date_default_timezone_get())->format('Y-m-d H:i:s'),
|
||||
'supplier_id' => Supplier::factory(),
|
||||
'category_id' => Category::factory(),
|
||||
];
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::whenTableDoesntHaveColumn('checkout_acceptances', 'qty', function () {
|
||||
Schema::table('checkout_acceptances', function (Blueprint $table) {
|
||||
$table->unsignedInteger('qty')->nullable()->after('assigned_to_id')->default(null);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::whenTableHasColumn('checkout_acceptances', 'qty', function () {
|
||||
Schema::table('checkout_acceptances', function (Blueprint $table) {
|
||||
$table->dropColumn('qty');
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
// We are doing 'deleted_at' *first* here because that way this index can do double-duty -
|
||||
// handling queries for 'all undeleted users' as well as 'users who are deleted in this location'
|
||||
// and 'users who are not-deleted in this location'
|
||||
$table->index(['deleted_at','location_id']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropIndex(['deleted_at','location_id']);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -21,11 +21,11 @@ class SettingsSeeder extends Seeder
|
||||
$settings->header_color = null;
|
||||
$settings->label2_2d_type = 'QRCODE';
|
||||
$settings->default_currency = 'USD';
|
||||
$settings->brand = 2;
|
||||
$settings->brand = 3;
|
||||
$settings->ldap_enabled = 0;
|
||||
$settings->full_multiple_companies_support = 0;
|
||||
$settings->label2_1d_type = 'C128';
|
||||
$settings->skin = 'blue';
|
||||
$settings->skin = '';
|
||||
$settings->email_domain = 'example.org';
|
||||
$settings->email_format = 'filastname';
|
||||
$settings->username_format = 'filastname';
|
||||
@@ -41,8 +41,6 @@ class SettingsSeeder extends Seeder
|
||||
|
||||
if ($user = User::where('username', '=', 'admin')->first()) {
|
||||
$user->locale = 'en-US';
|
||||
$user->enable_sound = 1;
|
||||
$user->enable_confetti = 1;
|
||||
$user->save();
|
||||
}
|
||||
|
||||
|
||||
@@ -1049,7 +1049,6 @@ th.css-license > .th-inner,
|
||||
th.css-location > .th-inner,
|
||||
th.css-users > .th-inner,
|
||||
th.css-currency > .th-inner,
|
||||
th.css-child-locations > .th-inner,
|
||||
th.css-history > .th-inner {
|
||||
font-size: 0px;
|
||||
line-height: 0.75 !important;
|
||||
@@ -1072,7 +1071,6 @@ th.css-license > .th-inner::before,
|
||||
th.css-location > .th-inner::before,
|
||||
th.css-users > .th-inner::before,
|
||||
th.css-currency > .th-inner::before,
|
||||
th.css-child-locations > .th-inner::before,
|
||||
th.css-history > .th-inner::before {
|
||||
display: inline-block;
|
||||
font-size: 20px;
|
||||
@@ -1154,12 +1152,6 @@ th.css-accessory-alt > .th-inner::before {
|
||||
font-size: 19px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
th.css-child-locations > .th-inner::before {
|
||||
content: "\f64f";
|
||||
font-family: "Font Awesome 5 Free";
|
||||
font-size: 19px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
th.css-currency > .th-inner::before {
|
||||
content: "\24";
|
||||
font-family: "Font Awesome 5 Free";
|
||||
@@ -1501,9 +1493,6 @@ caption.tableCaption {
|
||||
white-space: preserve;
|
||||
display: inline-block;
|
||||
}
|
||||
input[name="columnsSearch"] {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
|
||||
/*# sourceMappingURL=app.css.map*/
|
||||
File diff suppressed because one or more lines are too long
@@ -673,7 +673,6 @@ th.css-license > .th-inner,
|
||||
th.css-location > .th-inner,
|
||||
th.css-users > .th-inner,
|
||||
th.css-currency > .th-inner,
|
||||
th.css-child-locations > .th-inner,
|
||||
th.css-history > .th-inner {
|
||||
font-size: 0px;
|
||||
line-height: 0.75 !important;
|
||||
@@ -696,7 +695,6 @@ th.css-license > .th-inner::before,
|
||||
th.css-location > .th-inner::before,
|
||||
th.css-users > .th-inner::before,
|
||||
th.css-currency > .th-inner::before,
|
||||
th.css-child-locations > .th-inner::before,
|
||||
th.css-history > .th-inner::before {
|
||||
display: inline-block;
|
||||
font-size: 20px;
|
||||
@@ -778,12 +776,6 @@ th.css-accessory-alt > .th-inner::before {
|
||||
font-size: 19px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
th.css-child-locations > .th-inner::before {
|
||||
content: "\f64f";
|
||||
font-family: "Font Awesome 5 Free";
|
||||
font-size: 19px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
th.css-currency > .th-inner::before {
|
||||
content: "\24";
|
||||
font-family: "Font Awesome 5 Free";
|
||||
@@ -1125,9 +1117,6 @@ caption.tableCaption {
|
||||
white-space: preserve;
|
||||
display: inline-block;
|
||||
}
|
||||
input[name="columnsSearch"] {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
|
||||
/*# sourceMappingURL=overrides.css.map*/
|
||||
File diff suppressed because one or more lines are too long
22
public/css/dist/all.css
vendored
22
public/css/dist/all.css
vendored
@@ -22385,7 +22385,6 @@ th.css-license > .th-inner,
|
||||
th.css-location > .th-inner,
|
||||
th.css-users > .th-inner,
|
||||
th.css-currency > .th-inner,
|
||||
th.css-child-locations > .th-inner,
|
||||
th.css-history > .th-inner {
|
||||
font-size: 0px;
|
||||
line-height: 0.75 !important;
|
||||
@@ -22408,7 +22407,6 @@ th.css-license > .th-inner::before,
|
||||
th.css-location > .th-inner::before,
|
||||
th.css-users > .th-inner::before,
|
||||
th.css-currency > .th-inner::before,
|
||||
th.css-child-locations > .th-inner::before,
|
||||
th.css-history > .th-inner::before {
|
||||
display: inline-block;
|
||||
font-size: 20px;
|
||||
@@ -22490,12 +22488,6 @@ th.css-accessory-alt > .th-inner::before {
|
||||
font-size: 19px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
th.css-child-locations > .th-inner::before {
|
||||
content: "\f64f";
|
||||
font-family: "Font Awesome 5 Free";
|
||||
font-size: 19px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
th.css-currency > .th-inner::before {
|
||||
content: "\24";
|
||||
font-family: "Font Awesome 5 Free";
|
||||
@@ -22837,9 +22829,6 @@ caption.tableCaption {
|
||||
white-space: preserve;
|
||||
display: inline-block;
|
||||
}
|
||||
input[name="columnsSearch"] {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
|
||||
/*# sourceMappingURL=app.css.map*/
|
||||
@@ -24000,7 +23989,6 @@ th.css-license > .th-inner,
|
||||
th.css-location > .th-inner,
|
||||
th.css-users > .th-inner,
|
||||
th.css-currency > .th-inner,
|
||||
th.css-child-locations > .th-inner,
|
||||
th.css-history > .th-inner {
|
||||
font-size: 0px;
|
||||
line-height: 0.75 !important;
|
||||
@@ -24023,7 +24011,6 @@ th.css-license > .th-inner::before,
|
||||
th.css-location > .th-inner::before,
|
||||
th.css-users > .th-inner::before,
|
||||
th.css-currency > .th-inner::before,
|
||||
th.css-child-locations > .th-inner::before,
|
||||
th.css-history > .th-inner::before {
|
||||
display: inline-block;
|
||||
font-size: 20px;
|
||||
@@ -24105,12 +24092,6 @@ th.css-accessory-alt > .th-inner::before {
|
||||
font-size: 19px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
th.css-child-locations > .th-inner::before {
|
||||
content: "\f64f";
|
||||
font-family: "Font Awesome 5 Free";
|
||||
font-size: 19px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
th.css-currency > .th-inner::before {
|
||||
content: "\24";
|
||||
font-family: "Font Awesome 5 Free";
|
||||
@@ -24452,9 +24433,6 @@ caption.tableCaption {
|
||||
white-space: preserve;
|
||||
display: inline-block;
|
||||
}
|
||||
input[name="columnsSearch"] {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
|
||||
/*# sourceMappingURL=overrides.css.map*/
|
||||
@@ -2,8 +2,8 @@
|
||||
"/js/dist/all.js": "/js/dist/all.js?id=76d88f0f91b852f7eecbce357ab5858b",
|
||||
"/css/dist/skins/skin-black-dark.css": "/css/dist/skins/skin-black-dark.css?id=42f97cd5b9ee7521b04a448e7fc16ac9",
|
||||
"/css/dist/skins/_all-skins.css": "/css/dist/skins/_all-skins.css?id=d81a7ed323f68a7c5e3e9115f7fb5404",
|
||||
"/css/build/overrides.css": "/css/build/overrides.css?id=d6ec1f1e36c57f8cd96218d2a59a2580",
|
||||
"/css/build/app.css": "/css/build/app.css?id=d591faf82795dc8151a6d3f84c26f5a4",
|
||||
"/css/build/overrides.css": "/css/build/overrides.css?id=257e65d85ce9cf5a413065df1b131c03",
|
||||
"/css/build/app.css": "/css/build/app.css?id=3dcb1500ec5991cc4058fd5e4d9b8b49",
|
||||
"/css/build/AdminLTE.css": "/css/build/AdminLTE.css?id=ee0ed88465dd878588ed044eefb67723",
|
||||
"/css/dist/skins/skin-yellow.css": "/css/dist/skins/skin-yellow.css?id=3d8a3d2035ea28aaad4a703c2646f515",
|
||||
"/css/dist/skins/skin-yellow-dark.css": "/css/dist/skins/skin-yellow-dark.css?id=3979929a3423ff35b96b1fc84299fdf3",
|
||||
@@ -19,7 +19,7 @@
|
||||
"/css/dist/skins/skin-blue.css": "/css/dist/skins/skin-blue.css?id=b2cd9f59d7e8587939ce27b2d3363d82",
|
||||
"/css/dist/skins/skin-blue-dark.css": "/css/dist/skins/skin-blue-dark.css?id=7277edd636cf46aa7786a4449ce0ead7",
|
||||
"/css/dist/skins/skin-black.css": "/css/dist/skins/skin-black.css?id=cbd06cc1d58197ccc81d4376bbaf0d28",
|
||||
"/css/dist/all.css": "/css/dist/all.css?id=ff957e6cef08b72d32cf28fe50da645a",
|
||||
"/css/dist/all.css": "/css/dist/all.css?id=a6b8969f0f70c07cf740f30bb7139b45",
|
||||
"/css/dist/signature-pad.css": "/css/dist/signature-pad.css?id=6a89d3cd901305e66ced1cf5f13147f7",
|
||||
"/css/dist/signature-pad.min.css": "/css/dist/signature-pad.min.css?id=6a89d3cd901305e66ced1cf5f13147f7",
|
||||
"/js/select2/i18n/af.js": "/js/select2/i18n/af.js?id=4f6fcd73488ce79fae1b7a90aceaecde",
|
||||
|
||||
@@ -746,7 +746,6 @@ th.css-license > .th-inner,
|
||||
th.css-location > .th-inner,
|
||||
th.css-users > .th-inner,
|
||||
th.css-currency > .th-inner,
|
||||
th.css-child-locations > .th-inner,
|
||||
th.css-history > .th-inner
|
||||
{
|
||||
font-size: 0px;
|
||||
@@ -772,7 +771,6 @@ th.css-license > .th-inner::before,
|
||||
th.css-location > .th-inner::before,
|
||||
th.css-users > .th-inner::before,
|
||||
th.css-currency > .th-inner::before,
|
||||
th.css-child-locations > .th-inner::before,
|
||||
th.css-history > .th-inner::before
|
||||
{
|
||||
display: inline-block;
|
||||
@@ -855,13 +853,6 @@ th.css-accessory-alt > .th-inner::before {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
th.css-child-locations > .th-inner::before {
|
||||
content: "\f64f"; // change this to f51e for coins
|
||||
font-family: "Font Awesome 5 Free";
|
||||
font-size: 19px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
th.css-currency > .th-inner::before {
|
||||
content: "\24"; // change this to f51e for coins
|
||||
font-family: "Font Awesome 5 Free";
|
||||
@@ -1260,8 +1251,4 @@ caption.tableCaption {
|
||||
clip: rect(0,0,0,0);
|
||||
white-space: preserve;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
input[name="columnsSearch"] {
|
||||
width: 120px;
|
||||
}
|
||||
@@ -46,7 +46,6 @@ return array(
|
||||
'not_enough_seats' => 'Not enough license seats available for checkout',
|
||||
'mismatch' => 'The license seat provided does not match the license',
|
||||
'unavailable' => 'This seat is not available for checkout.',
|
||||
'license_is_inactive' => 'This license is expired or terminated.',
|
||||
),
|
||||
|
||||
'checkin' => array(
|
||||
|
||||
@@ -3,13 +3,12 @@
|
||||
return array(
|
||||
|
||||
'does_not_exist' => 'Location does not exist.',
|
||||
'assoc_users' => 'This location is not currently deletable because it is the location of record for at least one item or user, has assets assigned to it, or is the parent location of another location. Please update your records to no longer reference this location and try again ',
|
||||
'assoc_users' => 'This location is not currently deletable because it is the location of record for at least one asset or user, has assets assigned to it, or is the parent location of another location. Please update your records to no longer reference this location and try again ',
|
||||
'assoc_assets' => 'This location is currently associated with at least one asset and cannot be deleted. Please update your assets to no longer reference this location and try again. ',
|
||||
'assoc_child_loc' => 'This location is currently the parent of at least one child location and cannot be deleted. Please update your locations to no longer reference this location and try again. ',
|
||||
'assigned_assets' => 'Assigned Assets',
|
||||
'current_location' => 'Current Location',
|
||||
'open_map' => 'Open in :map_provider_icon Maps',
|
||||
'deleted_warning' => 'This location has been deleted. Please restore it before attempting to make any changes.',
|
||||
|
||||
|
||||
'create' => array(
|
||||
|
||||
@@ -12,8 +12,7 @@ return [
|
||||
'create' => 'Create Location',
|
||||
'update' => 'Update Location',
|
||||
'print_assigned' => 'Print Assigned',
|
||||
'print_inventory' => 'Print Inventory',
|
||||
'print_all_assigned' => 'Print Inventory and Assigned',
|
||||
'print_all_assigned' => 'Print All Assigned',
|
||||
'name' => 'Location Name',
|
||||
'address' => 'Address',
|
||||
'address2' => 'Address Line 2',
|
||||
|
||||
@@ -11,6 +11,7 @@ return array(
|
||||
'title' => 'Asset Models',
|
||||
'update' => 'Update Asset Model',
|
||||
'view' => 'View Asset Model',
|
||||
'clone' => 'Clone Model',
|
||||
'edit' => 'Edit Model',
|
||||
'update' => 'Update Asset Model',
|
||||
'clone' => 'Clone Model',
|
||||
'edit' => 'Edit Model',
|
||||
);
|
||||
|
||||
@@ -309,12 +309,10 @@ return [
|
||||
'total_licenses' => 'total licenses',
|
||||
'total_accessories' => 'total accessories',
|
||||
'total_consumables' => 'total consumables',
|
||||
'total_cost' => 'Total Cost',
|
||||
'type' => 'Type',
|
||||
'undeployable' => 'Un-deployable',
|
||||
'unknown_admin' => 'Unknown Admin',
|
||||
'unknown_user' => 'Unknown User',
|
||||
'unit_cost' => 'Unit Cost',
|
||||
'username' => 'Username',
|
||||
'update' => 'Update',
|
||||
'updating_item' => 'Updating :item',
|
||||
@@ -355,11 +353,9 @@ return [
|
||||
'audit_overdue' => 'Overdue for Audit',
|
||||
'accept' => 'Accept :asset',
|
||||
'i_accept' => 'I accept',
|
||||
'i_accept_with_count' => 'I accept :count item|I accept :count items',
|
||||
'i_decline_item' => 'Decline this item|Decline these items',
|
||||
'i_accept_item' => 'Accept this item|Accept these items',
|
||||
'i_decline_item' => 'Decline this item',
|
||||
'i_accept_item' => 'Accept this item',
|
||||
'i_decline' => 'I decline',
|
||||
'i_decline_with_count' => 'I decline :count item|I decline :count items',
|
||||
'accept_decline' => 'Accept/Decline',
|
||||
'sign_tos' => 'Sign below to indicate that you agree to the terms of service:',
|
||||
'clear_signature' => 'Clear Signature',
|
||||
@@ -520,7 +516,6 @@ return [
|
||||
'item_name_var' => ':item Name',
|
||||
'error_user_company' => 'Checkout target company and asset company do not match',
|
||||
'error_user_company_accept_view' => 'An Asset assigned to you belongs to a different company so you can\'t accept nor deny it, please check with your manager',
|
||||
'error_assets_already_checked_out' => 'One or more of the assets are already checked out',
|
||||
'importer' => [
|
||||
'checked_out_to_fullname' => 'Checked Out to: Full Name',
|
||||
'checked_out_to_first_name' => 'Checked Out to: First Name',
|
||||
@@ -592,7 +587,6 @@ return [
|
||||
'components' => ':count Component|:count Components',
|
||||
],
|
||||
|
||||
'show_inactive' => 'Expired or Terminated',
|
||||
'more_info' => 'More Info',
|
||||
'quickscan_bulk_help' => 'Checking this box will edit the asset record to reflect this new location. Leaving it unchecked will simply note the location in the audit log. Note that if this asset is checked out, it will not change the location of the person, asset or location it is checked out to.',
|
||||
'whoops' => 'Whoops!',
|
||||
@@ -618,7 +612,6 @@ return [
|
||||
'footer_credit' => '<a target="_blank" href="https://snipeitapp.com" rel="noopener">Snipe-IT</a> is open source software, made with <i class="fa fa-heart" aria-hidden="true" style="color: #a94442; font-size: 10px" /></i><span class="sr-only">love</span> by <a href="https://bsky.app/profile/snipeitapp.com" rel="noopener">@snipeitapp.com</a>.',
|
||||
'set_password' => 'Set a Password',
|
||||
'upload_deleted' => 'Upload Deleted',
|
||||
'child_locations' => 'Child Locations',
|
||||
|
||||
// Add form placeholders here
|
||||
'placeholders' => [
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
return [
|
||||
|
||||
'Accessory_Checkin_Notification' => 'Accessory checked in',
|
||||
'Accessory_Checkout_Notification' => 'Accessory checked out|:count Accessories checked out',
|
||||
'Accessory_Checkout_Notification' => 'Accessory checked out',
|
||||
'Asset_Checkin_Notification' => 'Asset checked in: :tag',
|
||||
'Asset_Checkout_Notification' => 'Asset checked out: :tag',
|
||||
'Confirm_Accessory_Checkin' => 'Accessory checkin confirmation',
|
||||
@@ -21,8 +21,8 @@ return [
|
||||
'Expected_Checkin_Date' => 'An asset checked out to you is due to be checked back in on :date',
|
||||
'Expected_Checkin_Notification' => 'Reminder: :name checkin deadline approaching',
|
||||
'Expected_Checkin_Report' => 'Expected asset checkin report',
|
||||
'Expiring_Assets_Report' => 'Expiring Assets Report',
|
||||
'Expiring_Licenses_Report' => 'Expiring Licenses Report',
|
||||
'Expiring_Assets_Report' => 'Expiring Assets Report.',
|
||||
'Expiring_Licenses_Report' => 'Expiring Licenses Report.',
|
||||
'Item_Request_Canceled' => 'Item Request Canceled',
|
||||
'Item_Requested' => 'Item Requested',
|
||||
'License_Checkin_Notification' => 'License checked in',
|
||||
@@ -31,7 +31,7 @@ return [
|
||||
'Low_Inventory_Report' => 'Low Inventory Report',
|
||||
'a_user_canceled' => 'A user has canceled an item request on the website',
|
||||
'a_user_requested' => 'A user has requested an item on the website',
|
||||
'acceptance_asset_accepted_to_user' => 'You have accepted an item assigned to you by :site_name|You have accepted :qty items assigned to you by :site_name',
|
||||
'acceptance_asset_accepted_to_user' => 'You have accepted an item assigned to you by :site_name',
|
||||
'acceptance_asset_accepted' => 'A user has accepted an item',
|
||||
'acceptance_asset_declined' => 'A user has declined an item',
|
||||
'send_pdf_copy' => 'Send a copy of this acceptance to my email address',
|
||||
@@ -42,9 +42,8 @@ return [
|
||||
'asset_name' => 'Asset Name',
|
||||
'asset_requested' => 'Asset requested',
|
||||
'asset_tag' => 'Asset Tag',
|
||||
'assets_warrantee_alert' => 'There is :count asset with an expiring warranty or that are reaching their end of life in the next :threshold days.|There are :count assets with expiring warranties or that are reaching their end of life in the next :threshold days.',
|
||||
'assets_warrantee_alert' => 'There is :count asset with a warranty expiring in the next :threshold days.|There are :count assets with warranties expiring in the next :threshold days.',
|
||||
'assigned_to' => 'Assigned To',
|
||||
'eol' => 'EOL',
|
||||
'best_regards' => 'Best regards,',
|
||||
'canceled' => 'Canceled',
|
||||
'checkin_date' => 'Checkin Date',
|
||||
@@ -69,16 +68,16 @@ return [
|
||||
'inventory_report' => 'Inventory Report',
|
||||
'item' => 'Item',
|
||||
'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.',
|
||||
'license_expiring_alert' => 'There is :count license expiring or terminating in the next :threshold days.|There are :count licenses expiring or terminating in the next :threshold days.',
|
||||
'license_expiring_alert' => 'There is :count license expiring in the next :threshold days.|There are :count licenses expiring in the next :threshold days.',
|
||||
'link_to_update_password' => 'Please click on the following link to update your :web password:',
|
||||
'login' => 'Login',
|
||||
'login_first_admin' => 'Login to your new Snipe-IT installation using the credentials below:',
|
||||
'low_inventory_alert' => 'There is :count item that is below minimum inventory or will soon be low.|There are :count items that are below minimum inventory or will soon be low.',
|
||||
'min_QTY' => 'Min QTY',
|
||||
'name' => 'Name',
|
||||
'new_item_checked' => 'A new item has been checked out under your name, details are below.|:count new items have been checked out under your name, details are below.',
|
||||
'new_item_checked_with_acceptance' => 'A new item has been checked out under your name that requires acceptance, details are below.|:count new items have been checked out under your name that requires acceptance, details are below.',
|
||||
'new_item_checked_location' => 'A new item has been checked out to :location, details are below.|:count new items have been checked out to :location, details are below.',
|
||||
'new_item_checked' => 'A new item has been checked out under your name, details are below.',
|
||||
'new_item_checked_with_acceptance' => 'A new item has been checked out under your name that requires acceptance, details are below.',
|
||||
'new_item_checked_location' => 'A new item has been checked out to :location, details are below.',
|
||||
'recent_item_checked' => 'An item was recently checked out under your name that requires acceptance, details are below.',
|
||||
'notes' => 'Notes',
|
||||
'password' => 'Password',
|
||||
|
||||
@@ -16,85 +16,19 @@
|
||||
@section('inputFields')
|
||||
|
||||
@include ('partials.forms.edit.company-select', ['translated_name' => trans('general.company'), 'fieldname' => 'company_id'])
|
||||
<!-- Name -->
|
||||
<x-form-row
|
||||
:label="trans('general.name')"
|
||||
:$item
|
||||
:$errors
|
||||
name="name"
|
||||
/>
|
||||
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/accessories/general.accessory_name')])
|
||||
@include ('partials.forms.edit.category-select', ['translated_name' => trans('general.category'), 'fieldname' => 'category_id', 'required' => 'true','category_type' => 'accessory'])
|
||||
@include ('partials.forms.edit.supplier-select', ['translated_name' => trans('general.supplier'), 'fieldname' => 'supplier_id'])
|
||||
@include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id'])
|
||||
@include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id'])
|
||||
|
||||
<!-- Model Number -->
|
||||
<x-form-row
|
||||
:label="trans('general.model_no')"
|
||||
:$item
|
||||
name="model_number"
|
||||
/>
|
||||
<!-- Order number -->
|
||||
<x-form-row
|
||||
:label="trans('general.order_number')"
|
||||
:$item
|
||||
name="order_number"
|
||||
input_div_class="col-md-5 col-sm-12"
|
||||
/>
|
||||
|
||||
|
||||
<!-- Purchase date -->
|
||||
<x-form-row
|
||||
:label="trans('general.purchase_date')"
|
||||
:$item
|
||||
name="purchase_date"
|
||||
type="date"
|
||||
input_div_class="col-md-4 col-sm-12"
|
||||
:value="old('purchase_date', (($item->purchase_date && $item->purchase_date->format('Y-m-d')) ?? ''))"
|
||||
/>
|
||||
|
||||
<!-- Purchase cost -->
|
||||
<x-form-row
|
||||
:label="trans('general.unit_cost')"
|
||||
:$item
|
||||
name="purchase_cost"
|
||||
type="number"
|
||||
maxlength="25"
|
||||
min="0.00"
|
||||
max="99999999999999999.000"
|
||||
step="0.001"
|
||||
input_div_class="col-md-4 col-sm-12"
|
||||
/>
|
||||
|
||||
<!-- QTY -->
|
||||
<x-form-row
|
||||
:label="trans('general.quantity')"
|
||||
:$item
|
||||
input_div_class="col-md-2"
|
||||
name="qty"
|
||||
/>
|
||||
|
||||
<!-- Min Amount -->
|
||||
<x-form-row
|
||||
:label="trans('general.min_amt')"
|
||||
:$item
|
||||
name="min_amt"
|
||||
input_div_class="col-md-2"
|
||||
minlength="1"
|
||||
maxlength="5"
|
||||
type="number"
|
||||
:info_tooltip_text="trans('general.min_amt_help')"
|
||||
/>
|
||||
|
||||
<!-- Notes -->
|
||||
<x-form-row
|
||||
:label="trans('general.notes')"
|
||||
:$item
|
||||
name="notes"
|
||||
type="textarea"
|
||||
maxlength="65000"
|
||||
placeholder="{{ trans('general.placeholders.notes') }}"
|
||||
/>
|
||||
|
||||
@include ('partials.forms.edit.model_number')
|
||||
@include ('partials.forms.edit.order_number')
|
||||
@include ('partials.forms.edit.datepicker', ['translated_name' => trans('general.purchase_date'),'fieldname' => 'purchase_date'])
|
||||
@include ('partials.forms.edit.purchase_cost', ['currency_type' => $item->location->currency ?? null])
|
||||
@include ('partials.forms.edit.quantity')
|
||||
@include ('partials.forms.edit.minimum_quantity')
|
||||
@include ('partials.forms.edit.notes')
|
||||
@include ('partials.forms.edit.image-upload', ['image_path' => app('accessories_upload_path')])
|
||||
|
||||
|
||||
@stop
|
||||
|
||||
@@ -236,7 +236,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-3" style="padding-bottom: 10px;">
|
||||
<strong>
|
||||
{{ trans('general.unit_cost') }}
|
||||
{{ trans('general.purchase_cost') }}
|
||||
</strong>
|
||||
</div>
|
||||
<div class="col-md-9" style="word-wrap: break-word;">
|
||||
@@ -244,18 +244,6 @@
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@if ($accessory->purchase_cost)
|
||||
<div class="row">
|
||||
<div class="col-md-3" style="padding-bottom: 10px;">
|
||||
<strong>
|
||||
{{ trans('general.total_cost') }}
|
||||
</strong>
|
||||
</div>
|
||||
<div class="col-md-9" style="word-wrap: break-word;">
|
||||
{{ Helper::formatCurrencyOutput($accessory->totalCostSum()) }}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3" style="padding-bottom: 10px;">
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<style>
|
||||
body {
|
||||
font-family:'Dejavu Sans', Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@if ($logo)
|
||||
<center>
|
||||
<img src="{{ $logo }}">
|
||||
<p>{{$company_name}}</p>
|
||||
</center>
|
||||
@endif
|
||||
<br>
|
||||
|
||||
<p>
|
||||
{{ trans('general.date') }}: {{ date($date_settings) }} <br>
|
||||
{{ trans('general.asset_model') }}: {{ $item_model }}<br>
|
||||
</p>
|
||||
|
||||
@if ($eula)
|
||||
<hr>
|
||||
{!! $eula !!}
|
||||
<hr>
|
||||
@endif
|
||||
|
||||
|
||||
<p>
|
||||
{{ trans('general.assigned_date') }}: {{$check_out_date}}<br>
|
||||
{{ trans('general.assignee') }}: {{$assigned_to}}<br>
|
||||
{{ trans('general.accepted_date') }}: {{$accepted_date}}
|
||||
</p>
|
||||
|
||||
|
||||
@if ($signature!='')
|
||||
<img src="{{ $signature }}" style="max-width: 600px; border-bottom: black solid 1px;">
|
||||
@endif
|
||||
</body>
|
||||
</html>
|
||||
57
resources/views/account/accept/accept-asset-eula.blade.php
Normal file
57
resources/views/account/accept/accept-asset-eula.blade.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}"
|
||||
dir="{{ Helper::determineLanguageDirection() }}">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<style>
|
||||
body {
|
||||
font-family:'Dejavu Sans', Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@if ($logo)
|
||||
<center>
|
||||
<img src="{{ $logo }}">
|
||||
<p>{{$company_name}}</p>
|
||||
</center>
|
||||
@endif
|
||||
<br>
|
||||
|
||||
<p>
|
||||
{{ trans('general.date') }}: {{ date($date_settings) }} <br>
|
||||
{{ trans('general.asset_tag') }}: {{ $item_tag }}<br>
|
||||
{{ trans('general.asset_model') }}: {{ $item_model }}<br>
|
||||
{{ trans('admin/hardware/form.serial') }}: {{ $item_serial }}
|
||||
</p>
|
||||
|
||||
|
||||
@if ($eula)
|
||||
<hr>
|
||||
|
||||
{!! $eula !!}
|
||||
|
||||
{!! str_replace('<p>', '<p dir="auto">', $eula) !!}
|
||||
|
||||
{{ str_replace('<p>', '<p dir="auto">', $eula) }}
|
||||
<hr>
|
||||
@endif
|
||||
|
||||
|
||||
<p>
|
||||
{{ trans('general.assigned_date') }}: {{$check_out_date}}<br>
|
||||
{{ trans('general.assignee') }}: {{$assigned_to}}<br>
|
||||
{{ trans('general.accepted_date') }}: {{$accepted_date}}
|
||||
</p>
|
||||
|
||||
|
||||
@if ($signature!='')
|
||||
<img src="{{ $signature }}" style="max-width: 600px; border-bottom: black solid 1px;">
|
||||
@endif
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<style>
|
||||
body {
|
||||
font-family:'Dejavu Sans', Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@if ($logo)
|
||||
<center>
|
||||
<img src="{{ $logo }}">
|
||||
<p>{{$company_name}}</p>
|
||||
</center>
|
||||
@endif
|
||||
<br>
|
||||
|
||||
<p>
|
||||
{{ trans('general.date') }}: {{ date($date_settings) }} <br>
|
||||
{{ trans('general.component') }}: {{ $item_model }}<br>
|
||||
</p>
|
||||
|
||||
@if ($eula)
|
||||
<hr>
|
||||
{!! $eula !!}
|
||||
<hr>
|
||||
@endif
|
||||
|
||||
|
||||
<p>
|
||||
{{ trans('general.assigned_date') }}: {{$check_out_date}}<br>
|
||||
{{ trans('general.assignee') }}: {{$assigned_to}}<br>
|
||||
{{ trans('general.accepted_date') }}: {{$accepted_date}}
|
||||
</p>
|
||||
|
||||
|
||||
@if ($signature!='')
|
||||
<img src="{{ $signature }}" style="max-width: 600px; border-bottom: black solid 1px;">
|
||||
@endif
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<style>
|
||||
body {
|
||||
font-family:'Dejavu Sans', Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@if ($logo)
|
||||
<center>
|
||||
<img src="{{ $logo }}">
|
||||
<p>{{$company_name}}</p>
|
||||
</center>
|
||||
@endif
|
||||
<br>
|
||||
|
||||
<p>
|
||||
{{ trans('general.date') }}: {{ date($date_settings) }} <br>
|
||||
{{ trans('general.consumable') }}: {{ $item_model }}<br>
|
||||
</p>
|
||||
|
||||
@if ($eula)
|
||||
<hr>
|
||||
{!! $eula !!}
|
||||
<hr>
|
||||
@endif
|
||||
|
||||
|
||||
<p>
|
||||
{{ trans('general.assigned_date') }}: {{$check_out_date}}<br>
|
||||
{{ trans('general.assignee') }}: {{$assigned_to}}<br>
|
||||
{{ trans('general.accepted_date') }}: {{$accepted_date}}
|
||||
</p>
|
||||
|
||||
|
||||
@if ($signature!='')
|
||||
<img src="{{ $signature }}" style="max-width: 600px; border-bottom: black solid 1px;">
|
||||
@endif
|
||||
</body>
|
||||
</html>
|
||||
47
resources/views/account/accept/accept-license-eula.blade.php
Normal file
47
resources/views/account/accept/accept-license-eula.blade.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<style>
|
||||
body {
|
||||
font-family:'Dejavu Sans', Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@if ($logo)
|
||||
<center>
|
||||
<img src="{{ $logo }}">
|
||||
<p>{{$company_name}}</p>
|
||||
</center>
|
||||
@endif
|
||||
<br>
|
||||
|
||||
<p>
|
||||
{{ trans('general.date') }}: {{ date($date_settings) }} <br>
|
||||
{{ trans('general.license') }}: {{ $item_model }}<br>
|
||||
</p>
|
||||
|
||||
@if ($eula)
|
||||
<hr>
|
||||
{!! $eula !!}
|
||||
<hr>
|
||||
@endif
|
||||
|
||||
|
||||
<p>
|
||||
{{ trans('general.assigned_date') }}: {{$check_out_date}}<br>
|
||||
{{ trans('general.assignee') }}: {{$assigned_to}}<br>
|
||||
{{ trans('general.accepted_date') }}: {{$accepted_date}}
|
||||
</p>
|
||||
|
||||
|
||||
@if ($signature!='')
|
||||
<img src="{{ $signature }}" style="max-width: 600px; border-bottom: black solid 1px;">
|
||||
@endif
|
||||
</body>
|
||||
</html>
|
||||
@@ -20,21 +20,11 @@
|
||||
}
|
||||
|
||||
.m-signature-pad--body {
|
||||
border-style: dashed;
|
||||
border-style: solid;
|
||||
border-color: grey;
|
||||
border-width: thick;
|
||||
padding-top: 0px;
|
||||
border-width: thin;
|
||||
}
|
||||
|
||||
|
||||
.m-signature-pad {
|
||||
box-shadow: none;
|
||||
background-color: inherit;
|
||||
border: none;
|
||||
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
@@ -49,18 +39,13 @@
|
||||
<div class="box-header with-border">
|
||||
<h2 class="box-title">
|
||||
{{ $acceptance->checkoutable->display_name }}
|
||||
@if ($acceptance->qty > 1)
|
||||
<strong>×{{ $acceptance->qty }}</strong>
|
||||
@endif
|
||||
|
||||
{!! (($acceptance->checkoutable) && ($acceptance->checkoutable->serial)) ? '<br>'.trans('general.serial_number').': '.e($acceptance->checkoutable->serial) : '' !!}
|
||||
|
||||
{{ (($acceptance->checkoutable) && ($acceptance->checkoutable->serial)) ? ' - '.trans('general.serial_number').': '.$acceptance->checkoutable->serial : '' }}
|
||||
</h2>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@if ($acceptance->checkoutable->getEula())
|
||||
<div class="col-md-12" style="padding-top: 5px; padding-bottom: 15px;">
|
||||
<div style="background-color: rgba(211,211,211,0.25); padding: 0px 10px 10px 10px; border: lightgrey 1px solid;">
|
||||
<div class="col-md-12" style="padding-top: 15px; padding-bottom: 15px;">
|
||||
<div style="background-color: rgba(211,211,211,0.25); padding: 10px; border: lightgrey 1px solid;">
|
||||
{!! str_replace('<p>', '<p dir="auto">', Helper::parseEscapedMarkedown($acceptance->checkoutable->getEula())) !!}
|
||||
</div>
|
||||
</div>
|
||||
@@ -68,19 +53,11 @@
|
||||
<div class="col-md-12">
|
||||
<label class="form-control">
|
||||
<input type="radio" name="asset_acceptance" id="accepted" value="accepted">
|
||||
@if ($acceptance->qty)
|
||||
{{trans_choice('general.i_accept_with_count', $acceptance->qty)}}
|
||||
@else
|
||||
{{trans('general.i_accept')}}
|
||||
@endif
|
||||
{{trans('general.i_accept')}}
|
||||
</label>
|
||||
<label class="form-control">
|
||||
<input type="radio" name="asset_acceptance" id="declined" value="declined">
|
||||
@if ($acceptance->qty)
|
||||
{{trans_choice('general.i_decline_with_count', $acceptance->qty)}}
|
||||
@else
|
||||
{{trans('general.i_decline')}}
|
||||
@endif
|
||||
{{trans('general.i_decline')}}
|
||||
</label>
|
||||
|
||||
</div>
|
||||
@@ -100,37 +77,30 @@
|
||||
<canvas style="width:100%;"></canvas>
|
||||
<input type="hidden" name="signature_output" id="signature_output">
|
||||
</div>
|
||||
<div class="col-md-12 col-sm-12 col-lg-12 col-xs-12 text-left">
|
||||
<div class="col-md-12 col-sm-12 col-lg-12 col-xs-12 text-center">
|
||||
<button type="button" class="btn btn-sm btn-default clear" data-action="clear" id="clear_button">{{trans('general.clear_signature')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (auth()->user()->email!='')
|
||||
<div class="col-md-12" style="padding-top: 20px; display: none;" id="showEmailBox">
|
||||
<label class="form-control">
|
||||
<input type="checkbox" value="1" name="send_copy" id="send_copy" checked="checked" aria-label="send_copy">
|
||||
{{ trans('mail.send_pdf_copy') }} ({{ auth()->user()->email }})
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div> <!-- / box-body -->
|
||||
<div class="box-footer" style="display: none;" id="showSubmit">
|
||||
<div class="row">
|
||||
<div class="col-md-7">
|
||||
@if (auth()->user()->email!='')
|
||||
<div class="col-md-12" style="display: none;" id="showEmailBox">
|
||||
<label class="form-control">
|
||||
<input type="checkbox" value="1" name="send_copy" id="send_copy" checked="checked" aria-label="send_copy">
|
||||
{{ trans('mail.send_pdf_copy') }} ({{ auth()->user()->email }})
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-md-5 text-right">
|
||||
<button type="submit" class="btn btn-success" id="submit-button">
|
||||
<i class="fa fa-check icon-white" aria-hidden="true" id="submitIcon"></i>
|
||||
<span id="buttonText">
|
||||
{{ trans_choice('general.i_accept_item', $acceptance->qty ?? null) }}
|
||||
<div class="box-footer text-right" style="display: none;" id="showSubmit">
|
||||
<button type="submit" class="btn btn-success" id="submit-button">
|
||||
<i class="fa fa-check icon-white" aria-hidden="true" id="submitIcon"></i>
|
||||
<span id="buttonText">
|
||||
{{ trans('general.i_accept_item') }}
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</button>
|
||||
</div><!-- /.box-footer -->
|
||||
</div> <!-- / box-default -->
|
||||
</div> <!-- / col -->
|
||||
@@ -191,7 +161,7 @@
|
||||
$("#showSubmit").show();
|
||||
$("#submit-button").removeClass("btn-success").addClass("btn-danger").show();
|
||||
$("#submitIcon").removeClass("fa-check").addClass("fa-times");
|
||||
$("#buttonText").text('{{ trans_choice('general.i_decline_item', $acceptance->qty ?? 1) }}');
|
||||
$("#buttonText").text('{{ trans('general.i_decline_item') }}');
|
||||
$("#note").prop('required', true);
|
||||
|
||||
} else if ($(this).is(':checked') && $(this).attr('id') === 'accepted') {
|
||||
@@ -199,9 +169,16 @@
|
||||
$("#showSubmit").show();
|
||||
$("#submit-button").removeClass("btn-danger").addClass("btn-success").show();
|
||||
$("#submitIcon").removeClass("fa-check").addClass("fa-check");
|
||||
$("#buttonText").text('{{ trans_choice('general.i_accept_item', $acceptance->qty ?? 1) }}');
|
||||
$("#buttonText").text('{{ trans('general.i_accept_item') }}');
|
||||
$("#note").prop('required', false);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
@stop
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
<tr>
|
||||
<th>{{ trans('general.name')}}</th>
|
||||
<th>{{ trans('general.type')}}</th>
|
||||
<th>{{ trans('general.qty') }}</th>
|
||||
<th>{{ trans('general.serial_number')}}</th>
|
||||
<th>{{ trans('table.actions')}}</th>
|
||||
</tr>
|
||||
@@ -42,9 +41,8 @@
|
||||
<tr>
|
||||
@if ($acceptance->checkoutable)
|
||||
<td>{{ ($acceptance->checkoutable) ? $acceptance->checkoutable->present()->name : '' }}</td>
|
||||
<td>{{ $acceptance->checkoutable_item_type }}</td>
|
||||
<td>{{ $acceptance->qty ?? '1' }}</td>
|
||||
<td>{{ ($acceptance->checkoutable) ? $acceptance->checkoutable->serial : '' }}</td>
|
||||
<td>{{ $acceptance->checkoutable_item_type }}</td>
|
||||
<td>{{ ($acceptance->checkoutable) ? $acceptance->checkoutable->serial : '' }}</td>
|
||||
<td><a href="{{ route('account.accept.item', $acceptance) }}" class="btn btn-default btn-sm">{{ trans('general.accept_decline') }}</a></td>
|
||||
@else
|
||||
<td> ----- </td>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
{{-- Account page content --}}
|
||||
@section('content')
|
||||
|
||||
@if ($acceptanceQuantity = \App\Models\CheckoutAcceptance::forUser(Auth::user())->pending()->sum('qty'))
|
||||
@if ($acceptances = \App\Models\CheckoutAcceptance::forUser(Auth::user())->pending()->count())
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert alert-warning fade in">
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<strong>
|
||||
<a href="{{ route('account.accept') }}" style="color: white;">
|
||||
{{ trans_choice('general.unaccepted_profile_warning', $acceptanceQuantity, ['count' => $acceptanceQuantity]) }}
|
||||
{{ trans_choice('general.unaccepted_profile_warning', $acceptances, ['count' => $acceptances]) }}
|
||||
</a>
|
||||
</strong>
|
||||
</div>
|
||||
@@ -446,9 +446,6 @@
|
||||
<th class="col-md-2" data-switchable="true" data-visible="false">
|
||||
{{ trans('general.name') }}
|
||||
</th>
|
||||
<th class="col-md-2" data-switchable="true" data-visible="false">
|
||||
{{ trans('general.status') }}
|
||||
</th>
|
||||
<th class="col-md-2" data-switchable="true" data-visible="true">
|
||||
{{ trans('admin/hardware/table.asset_model') }}
|
||||
</th>
|
||||
@@ -464,6 +461,7 @@
|
||||
<th class="col-md-2" data-switchable="true" data-visible="false">
|
||||
{{ trans('general.location') }}
|
||||
</th>
|
||||
|
||||
@can('self.view_purchase_cost')
|
||||
<th class="col-md-6" data-footer-formatter="sumFormatter" data-fieldname="purchase_cost">
|
||||
{{ trans('general.purchase_cost') }}
|
||||
@@ -510,11 +508,6 @@
|
||||
<td>
|
||||
{{ $asset->name }}
|
||||
</td>
|
||||
<td>
|
||||
<x-icon type="circle-solid" class="text-blue" />
|
||||
{{ $asset->assetstatus->name }}
|
||||
<label class="label label-default">{{ trans('general.deployed') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
{{ $asset->model->name }}
|
||||
</td>
|
||||
|
||||
3
resources/views/blade/example.blade.php
Normal file
3
resources/views/blade/example.blade.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<p>
|
||||
Hi.
|
||||
</p>
|
||||
@@ -4,7 +4,7 @@
|
||||
'object_type' => '',
|
||||
])
|
||||
|
||||
<!-- begin ajaxed file listing table -->
|
||||
<!-- begin non-ajaxed file listing table -->
|
||||
<div class="table-responsive">
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\UploadedFilesPresenter::dataTableLayout() }}"
|
||||
@@ -30,4 +30,6 @@
|
||||
|
||||
</div>
|
||||
|
||||
<!-- end ajaxed file listing table -->
|
||||
|
||||
|
||||
<!-- end non-ajaxed file listing table -->
|
||||
@@ -1,5 +0,0 @@
|
||||
<!-- form-label blade component -->
|
||||
<label {{ $attributes->merge(['class' => 'control-label']) }}>
|
||||
{{ $slot }}
|
||||
</label>
|
||||
|
||||
@@ -1,107 +0,0 @@
|
||||
<!-- form-row blade component -->
|
||||
@props([
|
||||
'checkbox_value' => null,
|
||||
'disabled' => false,
|
||||
'div_style' => null,
|
||||
'error_offset_class' => 'col-md-7 col-md-offset-3',
|
||||
'errors',
|
||||
'help_text' => null,
|
||||
'info_tooltip_text' => null,
|
||||
'input_class' => null,
|
||||
'input_div_class' => 'col-md-8 col-sm-12',
|
||||
'input_group_addon' => null,
|
||||
'input_style' => null,
|
||||
'item' => null,
|
||||
'label' => null,
|
||||
'label_class' => 'col-md-3 col-sm-12 col-xs-12',
|
||||
'label_style' => null,
|
||||
'max' => null,
|
||||
'maxlength' => 191,
|
||||
'min' => null,
|
||||
'minlength' => null,
|
||||
'name' => null,
|
||||
'placeholder' => null,
|
||||
'step' => null,
|
||||
'type' => 'text',
|
||||
'value' => null,
|
||||
'value_text' => null,
|
||||
])
|
||||
|
||||
<div {{ $attributes->merge(['class' => 'form-group']) }}>
|
||||
|
||||
@if (isset($label))
|
||||
<x-form-label
|
||||
:for="$name"
|
||||
:style="$label_style ?? null"
|
||||
class="{{ $label_class }}"
|
||||
>
|
||||
{{ $label }}
|
||||
</x-form-label>
|
||||
@else
|
||||
@php
|
||||
$input_div_class = $input_div_class . ' ' . $error_offset_class;
|
||||
@endphp
|
||||
@endif
|
||||
|
||||
|
||||
<div {{ $attributes->merge(['class' => $input_div_class, 'style' => $div_style]) }}>
|
||||
|
||||
@php
|
||||
$blade_type = in_array($type, ['text', 'email', 'url', 'tel', 'number', 'password']) ? 'text' : $type;
|
||||
@endphp
|
||||
|
||||
<x-dynamic-component
|
||||
:$checkbox_value
|
||||
:$disabled
|
||||
:$input_group_addon
|
||||
:$input_style
|
||||
:$item
|
||||
:$max
|
||||
:$maxlength
|
||||
:$min
|
||||
:$minlength
|
||||
:$name
|
||||
:$placeholder
|
||||
:$step
|
||||
:$type
|
||||
:$value_text
|
||||
:aria-label="$name"
|
||||
:class="$input_class"
|
||||
:component="'input.'.$blade_type"
|
||||
:id="$name"
|
||||
:required="Helper::checkIfRequired($item, $name)"
|
||||
:value="old($name, $item->{$name})"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
@if ($info_tooltip_text)
|
||||
<!-- Info Tooltip -->
|
||||
<div class="col-md-1 text-left" style="padding-left:0; margin-top: 5px;">
|
||||
<x-input.info-tooltip>
|
||||
{{ $info_tooltip_text }}
|
||||
</x-input.info-tooltip>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
@error($name)
|
||||
<!-- Form Error -->
|
||||
<div {{ $attributes->merge(['class' => $error_offset_class]) }}>
|
||||
<span class="alert-msg" role="alert">
|
||||
<i class="fas fa-times" aria-hidden="true"></i>
|
||||
{{ $message }}
|
||||
</span>
|
||||
</div>
|
||||
@enderror
|
||||
|
||||
@if ($help_text)
|
||||
<!-- Help Text -->
|
||||
<div {{ $attributes->merge(['class' => $error_offset_class]) }}>
|
||||
<p class="help-block">
|
||||
{!! $help_text !!}
|
||||
</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
@@ -1,16 +0,0 @@
|
||||
@props([
|
||||
'item' => null,
|
||||
'field_name' => null,
|
||||
'input_style' => null,
|
||||
'required' => false,
|
||||
'disabled' => false,
|
||||
'checkbox_value' => null,
|
||||
'name' => null,
|
||||
'label' => null,
|
||||
'value_text' => null,
|
||||
])
|
||||
|
||||
<label class="form-control{{ $disabled ? ' form-control--disabled' : '' }}">
|
||||
<input type="checkbox" name="{{ $name }}" aria-label="{{ $name }}" value="{{ $checkbox_value }}" @checked(old($name, $item->$name)) {!! $disabled ? 'class="disabled" disabled' : '' !!}>
|
||||
{{ $value_text ?? $label }}
|
||||
</label>
|
||||
@@ -1,12 +0,0 @@
|
||||
@props([
|
||||
'item' => null,
|
||||
'input_style' => null,
|
||||
'end_date' => null,
|
||||
])
|
||||
|
||||
<!-- Datepicker -->
|
||||
<div {{ $attributes->merge(['class' => 'input-group date']) }} data-provide="datepicker" data-date-today-highlight="true" data-date-language="{{ auth()->user()->locale }}" data-date-locale="{{ auth()->user()->locale }}" data-date-format="yyyy-mm-dd" data-date-autoclose="true" data-date-clear-btn="true"{{ $end_date ? ' data-date-end-date=' . $end_date : '' }}>
|
||||
<input type="text" {{ $attributes->merge(['class' => 'form-control']) }}>
|
||||
<span class="input-group-addon"><x-icon type="calendar" /></span>
|
||||
|
||||
</div>
|
||||
@@ -1,4 +0,0 @@
|
||||
<a href="#" data-tooltip="true" title="{{ $slot }}" style="padding-left: 0px;">
|
||||
<x-icon type="more-info" style="font-size: 20px;" />
|
||||
<span class="sr-only">{{ $slot }}</span>
|
||||
</a>
|
||||
@@ -1,15 +0,0 @@
|
||||
@props([
|
||||
'item' => null,
|
||||
'field_name' => null,
|
||||
'input_style' => null,
|
||||
'required' => false,
|
||||
'disabled' => false,
|
||||
'name' => null,
|
||||
'label' => null,
|
||||
'value_text' => null,
|
||||
])
|
||||
|
||||
<label class="form-control{{ $disabled ? ' form-control--disabled' : '' }}">
|
||||
<input type="radio" name="{{ $name }}" aria-label="{{ $name }}" @checked(old($name)) {!! $disabled ? 'class="disabled" disabled' : '' !!}>
|
||||
{{ $value_text ?? $label }}
|
||||
</label>
|
||||
@@ -1,15 +0,0 @@
|
||||
@props([
|
||||
'input_style' => null,
|
||||
'input_group_addon' => null,
|
||||
'required' => false,
|
||||
'item' => null,
|
||||
])
|
||||
<!-- input-text blade component -->
|
||||
<input
|
||||
{{ $attributes->merge(['class' => 'form-control', 'style' => $input_style]) }}
|
||||
@required($required)
|
||||
/>
|
||||
|
||||
@if ($input_group_addon)
|
||||
<span class="input-group-addon">{{ $input_group_addon }}</span>
|
||||
@endif
|
||||
@@ -9,12 +9,7 @@
|
||||
|
||||
@section('inputFields')
|
||||
|
||||
<!-- Name -->
|
||||
<x-form-row
|
||||
:label="trans('general.name')"
|
||||
:$item
|
||||
name="name"
|
||||
/>
|
||||
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/categories/general.name')])
|
||||
|
||||
<!-- Type -->
|
||||
<div class="form-group {{ $errors->has('category_type') ? ' has-error' : '' }}">
|
||||
|
||||
@@ -61,7 +61,6 @@
|
||||
|
||||
@if ($category->category_type=='asset')
|
||||
data-columns="{{ \App\Presenters\AssetPresenter::dataTableLayout() }}"
|
||||
data-show-columns-search="true"
|
||||
data-cookie-id-table="categoryAssetsTable"
|
||||
id="categoryAssetsTable"
|
||||
data-buttons="assetButtons"
|
||||
|
||||
@@ -8,48 +8,26 @@
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('inputFields')
|
||||
<!-- Name -->
|
||||
<x-form-row
|
||||
:label="trans('general.name')"
|
||||
:$item
|
||||
name="name"
|
||||
/>
|
||||
|
||||
<!-- Phone -->
|
||||
<x-form-row
|
||||
:label="trans('general.phone')"
|
||||
:$item
|
||||
name="phone"
|
||||
type="tel"
|
||||
/>
|
||||
|
||||
<!-- Fax -->
|
||||
<x-form-row
|
||||
:label="trans('general.fax')"
|
||||
:$item
|
||||
name="fax"
|
||||
type="tel"
|
||||
/>
|
||||
|
||||
<!-- Email -->
|
||||
<x-form-row
|
||||
:label="trans('general.email')"
|
||||
:$item
|
||||
name="fax"
|
||||
type="email"
|
||||
/>
|
||||
|
||||
|
||||
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/companies/table.name')])
|
||||
@include ('partials.forms.edit.phone')
|
||||
@include ('partials.forms.edit.fax')
|
||||
@include ('partials.forms.edit.email')
|
||||
@include ('partials.forms.edit.image-upload', ['image_path' => app('companies_upload_path')])
|
||||
|
||||
<!-- Notes -->
|
||||
<x-form-row
|
||||
:label="trans('general.notes')"
|
||||
:$item
|
||||
name="notes"
|
||||
type="textarea"
|
||||
maxlength="65000"
|
||||
placeholder="{{ trans('general.placeholders.notes') }}"
|
||||
/>
|
||||
<div class="form-group{!! $errors->has('notes') ? ' has-error' : '' !!}">
|
||||
<label for="notes" class="col-md-3 control-label">{{ trans('general.notes') }}</label>
|
||||
<div class="col-md-8">
|
||||
|
||||
<x-input.textarea
|
||||
name="notes"
|
||||
id="notes"
|
||||
:value="old('notes', $item->notes)"
|
||||
placeholder="{{ trans('general.placeholders.notes') }}"
|
||||
aria-label="notes"
|
||||
rows="5"
|
||||
/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
||||
@@ -94,7 +94,6 @@
|
||||
data-cookie-id-table="assetsListingTable"
|
||||
data-id-table="assetsListingTable"
|
||||
data-side-pagination="server"
|
||||
data-show-columns-search="true"
|
||||
data-sort-order="asc"
|
||||
data-toolbar="#assetsBulkEditToolbar"
|
||||
data-bulk-button-id="#bulkAssetEditButton"
|
||||
|
||||
@@ -16,100 +16,20 @@
|
||||
{{-- Page content --}}
|
||||
@section('inputFields')
|
||||
|
||||
<!-- Name -->
|
||||
<x-form-row
|
||||
:label="trans('general.name')"
|
||||
:$item
|
||||
name="name"
|
||||
/>
|
||||
|
||||
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/components/table.title')])
|
||||
@include ('partials.forms.edit.category-select', ['translated_name' => trans('general.category'), 'fieldname' => 'category_id','category_type' => 'component'])
|
||||
<!-- QTY -->
|
||||
<x-form-row
|
||||
:label="trans('general.quantity')"
|
||||
:$item
|
||||
name="qty"
|
||||
input_div_class="col-md-2"
|
||||
minlength="1"
|
||||
maxlength="5"
|
||||
type="number"
|
||||
/>
|
||||
|
||||
|
||||
<!-- Min Amount -->
|
||||
<x-form-row
|
||||
:label="trans('general.min_amt')"
|
||||
:$item
|
||||
name="min_amt"
|
||||
input_div_class="col-md-2"
|
||||
minlength="1"
|
||||
maxlength="5"
|
||||
type="number"
|
||||
:info_tooltip_text="trans('general.min_amt_help')"
|
||||
/>
|
||||
|
||||
<x-form-row
|
||||
:label="trans('admin/hardware/form.serial')"
|
||||
:$item
|
||||
name="serial"
|
||||
type="text"
|
||||
/>
|
||||
|
||||
@include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id'])
|
||||
|
||||
<!-- Model Number -->
|
||||
<x-form-row
|
||||
:label="trans('general.model_no')"
|
||||
:$item
|
||||
name="model_number"
|
||||
input_div_class="col-md-5 col-sm-12"
|
||||
/>
|
||||
|
||||
@include ('partials.forms.edit.quantity')
|
||||
@include ('partials.forms.edit.minimum_quantity')
|
||||
@include ('partials.forms.edit.serial', ['fieldname' => 'serial'])
|
||||
@include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id'])
|
||||
@include ('partials.forms.edit.model_number')
|
||||
@include ('partials.forms.edit.company-select', ['translated_name' => trans('general.company'), 'fieldname' => 'company_id'])
|
||||
@include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id'])
|
||||
@include ('partials.forms.edit.supplier-select', ['translated_name' => trans('general.supplier'), 'fieldname' => 'supplier_id'])
|
||||
|
||||
<!-- Order number -->
|
||||
<x-form-row
|
||||
:label="trans('general.order_number')"
|
||||
:$item
|
||||
name="order_number"
|
||||
input_div_class="col-md-5 col-sm-12"
|
||||
/>
|
||||
|
||||
<!-- Purchase date -->
|
||||
<x-form-row
|
||||
:label="trans('general.purchase_date')"
|
||||
:$item
|
||||
name="purchase_date"
|
||||
type="date"
|
||||
input_div_class="col-md-4 col-sm-12"
|
||||
:value="old('purchase_date', (($item->purchase_date && $item->purchase_date->format('Y-m-d')) ?? ''))"
|
||||
/>
|
||||
|
||||
<!-- Purchase cost -->
|
||||
<x-form-row
|
||||
:label="trans('general.unit_cost')"
|
||||
:$item
|
||||
name="purchase_cost"
|
||||
type="number"
|
||||
maxlength="25"
|
||||
min="0.00"
|
||||
max="99999999999999999.000"
|
||||
step="0.001"
|
||||
input_div_class="col-md-4 col-sm-12"
|
||||
/>
|
||||
|
||||
<!-- Notes -->
|
||||
<x-form-row
|
||||
:label="trans('general.notes')"
|
||||
:$item
|
||||
name="notes"
|
||||
type="textarea"
|
||||
maxlength="65000"
|
||||
placeholder="{{ trans('general.placeholders.notes') }}"
|
||||
/>
|
||||
|
||||
@include ('partials.forms.edit.order_number')
|
||||
@include ('partials.forms.edit.datepicker', ['translated_name' => trans('general.purchase_date'),'fieldname' => 'purchase_date'])
|
||||
@include ('partials.forms.edit.purchase_cost')
|
||||
@include ('partials.forms.edit.notes')
|
||||
@include ('partials.forms.edit.image-upload', ['image_path' => app('components_upload_path')])
|
||||
|
||||
|
||||
|
||||
@@ -201,19 +201,12 @@
|
||||
@endif
|
||||
|
||||
@if ($component->purchase_cost)
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('general.unit_cost') }}:</strong>
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/components/general.cost') }}:</strong>
|
||||
{{ $snipeSettings->default_currency }}
|
||||
|
||||
{{ Helper::formatCurrencyOutput($component->purchase_cost) }} </div>
|
||||
@endif
|
||||
|
||||
@if ($component->purchase_cost)
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('general.total_cost') }}:</strong>
|
||||
{{ $snipeSettings->default_currency }}
|
||||
|
||||
{{ Helper::formatCurrencyOutput($component->totalCostSum()) }} </div>
|
||||
@endif
|
||||
|
||||
@if ($component->order_number)
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('general.order_number') }}:</strong>
|
||||
{{ $component->order_number }} </div>
|
||||
|
||||
@@ -15,98 +15,19 @@
|
||||
@section('inputFields')
|
||||
|
||||
@include ('partials.forms.edit.company-select', ['translated_name' => trans('general.company'), 'fieldname' => 'company_id'])
|
||||
|
||||
<!-- Name -->
|
||||
<x-form-row
|
||||
:label="trans('general.name')"
|
||||
:$item
|
||||
name="name"
|
||||
/>
|
||||
|
||||
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/consumables/table.title')])
|
||||
@include ('partials.forms.edit.category-select', ['translated_name' => trans('general.category'), 'fieldname' => 'category_id', 'required' => 'true', 'category_type' => 'consumable'])
|
||||
@include ('partials.forms.edit.supplier-select', ['translated_name' => trans('general.supplier'), 'fieldname' => 'supplier_id'])
|
||||
@include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id'])
|
||||
@include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id'])
|
||||
|
||||
<!-- Model Number -->
|
||||
<x-form-row
|
||||
:label="trans('general.model_no')"
|
||||
:$item
|
||||
name="model_number"
|
||||
input_div_class="col-md-5 col-sm-12"
|
||||
/>
|
||||
|
||||
<!-- Model Number -->
|
||||
<x-form-row
|
||||
:label="trans('admin/consumables/general.item_no')"
|
||||
:$item
|
||||
name="item_no"
|
||||
input_div_class="col-md-5 col-sm-12"
|
||||
/>
|
||||
|
||||
<!-- Order number -->
|
||||
<x-form-row
|
||||
:label="trans('general.order_number')"
|
||||
:$item
|
||||
name="order_number"
|
||||
input_div_class="col-md-5 col-sm-12"
|
||||
/>
|
||||
|
||||
<!-- Purchase date -->
|
||||
<x-form-row
|
||||
:label="trans('general.purchase_date')"
|
||||
:$item
|
||||
name="purchase_date"
|
||||
type="date"
|
||||
input_div_class="col-md-4 col-sm-12"
|
||||
:value="old('purchase_date', (($item->purchase_date && $item->purchase_date->format('Y-m-d')) ?? ''))"
|
||||
/>
|
||||
|
||||
<!-- Purchase cost -->
|
||||
<x-form-row
|
||||
:label="trans('general.unit_cost')"
|
||||
:$item
|
||||
name="purchase_cost"
|
||||
type="number"
|
||||
maxlength="25"
|
||||
min="0.00"
|
||||
max="99999999999999999.000"
|
||||
step="0.001"
|
||||
input_div_class="col-md-4 col-sm-12"
|
||||
/>
|
||||
|
||||
|
||||
<!-- QTY -->
|
||||
<x-form-row
|
||||
:label="trans('general.quantity')"
|
||||
:$item
|
||||
name="qty"
|
||||
input_div_class="col-md-2"
|
||||
/>
|
||||
|
||||
|
||||
<!-- Min Amount -->
|
||||
<x-form-row
|
||||
:label="trans('general.min_amt')"
|
||||
:$item
|
||||
name="min_amt"
|
||||
input_div_class="col-md-2"
|
||||
minlength="1"
|
||||
maxlength="5"
|
||||
type="number"
|
||||
:info_tooltip_text="trans('general.min_amt_help')"
|
||||
/>
|
||||
|
||||
<!-- Notes -->
|
||||
<x-form-row
|
||||
:label="trans('general.notes')"
|
||||
:$item
|
||||
name="notes"
|
||||
type="textarea"
|
||||
maxlength="65000"
|
||||
placeholder="{{ trans('general.placeholders.notes') }}"
|
||||
/>
|
||||
|
||||
@include ('partials.forms.edit.model_number')
|
||||
@include ('partials.forms.edit.item_number')
|
||||
@include ('partials.forms.edit.order_number')
|
||||
@include ('partials.forms.edit.datepicker', ['translated_name' => trans('general.purchase_date'),'fieldname' => 'purchase_date'])
|
||||
@include ('partials.forms.edit.purchase_cost')
|
||||
@include ('partials.forms.edit.quantity')
|
||||
@include ('partials.forms.edit.minimum_quantity')
|
||||
@include ('partials.forms.edit.notes')
|
||||
@include ('partials.forms.edit.image-upload', ['image_path' => app('consumables_upload_path')])
|
||||
|
||||
@stop
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user