Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
myjob-manage
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
angular
myjob-manage
Commits
8b6e0db7
Commit
8b6e0db7
authored
Jul 03, 2025
by
Ooh-Ao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set environtment
parent
ed69c999
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
53 deletions
+14
-53
angular.json
angular.json
+7
-1
login.component.ts
src/app/authentication/login/login.component.ts
+1
-13
firebase.service.ts
src/app/shared/services/firebase.service.ts
+0
-27
environment.prod.ts
src/environments/environment.prod.ts
+4
-10
environment.ts
src/environments/environment.ts
+2
-2
No files found.
angular.json
View file @
8b6e0db7
...
...
@@ -46,7 +46,7 @@
"allowedCommonJsDependencies"
:
[
"dragula"
,
"can-use-dom"
,
"moment"
,
"leaflet"
,
"filepond"
,
"dropzone"
,
"apexcharts"
,
"sweetalert"
],
"outputPath"
:
"dist
/preview
"
,
"outputPath"
:
"dist"
,
"index"
:
"src/index.html"
,
"browser"
:
"src/main.ts"
,
"polyfills"
:
[
...
...
@@ -81,6 +81,12 @@
"maximumError"
:
"5mb"
}
],
"fileReplacements"
:
[
{
"replace"
:
"src/environments/environment.ts"
,
"with"
:
"src/environments/environment.prod.ts"
}
],
"outputHashing"
:
"all"
},
"development"
:
{
...
...
src/app/authentication/login/login.component.ts
View file @
8b6e0db7
...
...
@@ -5,7 +5,6 @@ import { AngularFireModule, FIREBASE_OPTIONS } from '@angular/fire/compat';
import
{
AngularFirestoreModule
}
from
'@angular/fire/compat/firestore'
;
import
{
AngularFireDatabaseModule
}
from
'@angular/fire/compat/database'
;
import
{
environment
}
from
'../../../environments/environment'
;
import
{
FirebaseService
}
from
'../../shared/services/firebase.service'
;
import
{
ToastrModule
,
ToastrService
}
from
'ngx-toastr'
;
import
{
CommonModule
,
DOCUMENT
}
from
'@angular/common'
;
import
{
CarouselModule
,
OwlOptions
,
SlidesOutputData
}
from
'ngx-owl-carousel-o'
;
...
...
@@ -122,19 +121,8 @@ export class LoginComponent {
this
.
authService
.
login
(
this
.
loginForm
.
controls
[
'username'
].
value
,
this
.
loginForm
.
controls
[
'password'
].
value
).
subscribe
(
result
=>
{
console
.
log
(
result
)
this
.
tokenService
.
saveToken
(
result
.
accessToken
);
// this.tokenService.saveRefreshToken(result.refreshToken);
this
.
tokenService
.
saveUser
(
result
);
this
.
routes
.
navigate
([
'/admin/member-manage'
])
// if (result.member.status == 1) {
// if (result.member.role == 99) {
// this.routes.navigate(['/admin/member-manage'])
// } else {
// this.adminCompanyList(result.member.memberId)
// }
// } else {
// this.error = 'ไม่สามารถใช้งานได้กรุณาติดต่อผู้ให้บริการ'
// }
// this.routes.navigate(['/admin/member-manage'])
this
.
routes
.
navigate
([
'/admin/member-manage'
])
},
(
error
)
=>
{
this
.
showLoader
=
false
;
this
.
error
=
'Username หรือ Password ไม่ถูกต้อง'
;
...
...
src/app/shared/services/firebase.service.ts
deleted
100644 → 0
View file @
ed69c999
import
{
Injectable
}
from
'@angular/core'
;
import
{
AngularFireModule
}
from
'@angular/fire/compat'
;
import
{
AngularFirestoreModule
}
from
'@angular/fire/compat/firestore'
;
import
{
AngularFireDatabaseModule
}
from
'@angular/fire/compat/database'
;
import
{
AngularFireAuthModule
}
from
'@angular/fire/compat/auth'
;
import
{
environment
}
from
'../../../environments/environment'
;
@
Injectable
({
providedIn
:
'root'
,
})
export
class
FirebaseService
{
constructor
()
{
AngularFireModule
.
initializeApp
(
environment
.
firebase
);
}
getFirestore
()
{
return
AngularFirestoreModule
;
}
getDatabase
()
{
return
AngularFireDatabaseModule
;
}
getAuth
()
{
return
AngularFireAuthModule
;
}
}
src/environments/environment.prod.ts
View file @
8b6e0db7
export
const
environment
=
{
production
:
true
,
firebase
:
{
apiKey
:
"************************************"
,
authDomain
:
"**********************************************"
,
projectId
:
"**********************************************"
,
storageBucket
:
"**********************************************"
,
messagingSenderId
:
"**********************************************"
,
appId
:
"**********************************************"
,
measurementId
:
"**********************************************"
},
};
baseUrl
:
window
.
location
.
origin
+
'/api'
,
googleMapsApiKey
:
window
.
location
.
origin
.
includes
(
"-uat"
)
?
'AIzaSyAZRyv6aSLDeNffbU7ObFolluUdvTMnA-Q'
:
'AIzaSyCUlaZdILvqCw5WoVsHWYREPDBrCkOfv3I'
}
src/environments/environment.ts
View file @
8b6e0db7
...
...
@@ -2,8 +2,8 @@
// `ng build` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.
export
const
environment
=
{
production
:
tru
e
,
baseUrl
:
'http
://192.168.10.85:8090
'
,
production
:
fals
e
,
baseUrl
:
'http
s://myjob.myhr.co.th/api
'
,
firebase
:
{
apiKey
:
"***************************************"
,
authDomain
:
"************************"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment