diff --git a/gulpfile.js b/gulpfile.js index 7151067..fc8be98 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -2,53 +2,21 @@ var gulp = require('gulp'); -/** - * Load the sample in src/app/index - */ -gulp.task('start', ['compile'], function(done) { - var browserSync = require('browser-sync'); - var bs = browserSync.create('Essential JS 2'); - var options = { - server: { - baseDir: ['./src', './'] - }, - ui: false - }; - bs.init(options, done); - - /** - * Watching typescript file changes - */ - gulp.watch('src/**/*.ts', ['compile', bs.reload]).on('change', reportChanges); -}); - /** * Compile TypeScript to JS */ -gulp.task('compile', function(done) { - var ts = require('gulp-typescript'); - // Default typescript config - var defaultConfig = { - typescript: require('typescript') - }; - var tsProject, tsResult; - // Create the typescript project - tsProject = ts.createProject('tsconfig.json', defaultConfig); - // Get typescript result - tsResult = gulp.src(['./src/**/*.ts'], { base: '.' }) - .pipe(ts(tsProject)) - .pipe(gulp.dest('./')) - .on('error', function(e) { - done(e); - process.exit(1); - }).on('end', function() { +gulp.task('compile', function (done) { + var webpack = require('webpack'); + var webpackStream = require('webpack-stream'); + gulp.src(['./src/app/app.ts']).pipe(webpackStream({ + config: require('./webpack.config.js') + }, webpack)) + .pipe(gulp.dest('./dist')) + .on('end', function () { done(); }); }); -function reportChanges(event) { - console.log('File ' + event.path + ' was ' + event.type + ', running tasks...'); -} /** * Testing spec files */ @@ -62,15 +30,13 @@ gulp.task('e2e-webdriver-update', webdriver_update({ webdriverManagerArgs: ['--ie', '--edge'] })); -gulp.task('e2e-test', ['compile'], function(done) { +gulp.task('e2e-test', gulp.series('compile', function (done) { var browserSync = require('browser-sync'); var bs = browserSync.create('Essential JS 2'); var options = { server: { baseDir: [ - './src/app/', - './src/resource/', - './node_modules/@syncfusion/ej2/' + './dist/', ], directory: true }, @@ -78,19 +44,19 @@ gulp.task('e2e-test', ['compile'], function(done) { open: false, notify: false }; - bs.init(options, function() { + bs.init(options, function () { gulp.src(['./spec/**/*.spec.js']) .pipe(protractor({ configFile: 'e2e/protractor.conf.js' })) - .on('error', function(e) { + .on('error', function (e) { console.error('Error: ' + e.message); done(); process.exit(1); }) - .on('end', function() { + .on('end', function () { done(); process.exit(0); }); }); -}); \ No newline at end of file +})); \ No newline at end of file diff --git a/package.json b/package.json index c6bac31..03a5252 100644 --- a/package.json +++ b/package.json @@ -1,29 +1,38 @@ { - "name": "ej2-quickstart", - "version": "0.0.1", - "description": "Essential JS 2 typescript quick start application", - "author": "Syncfusion Inc.", - "license": "SEE LICENSE IN license", - "repository": { - "type": "git", - "url": "https://github.com/syncfusion/ej2-quickstart.git" - }, - "dependencies": { - "@syncfusion/ej2": "*" - }, - "devDependencies": { - "browser-sync": "^2.18.12", - "gulp": "^3.9.1", - "gulp-protractor": "^4.1.0", - "gulp-typescript": "^2.13.0", - "jasmine": "^2.6.0", - "systemjs": "^0.20.14", - "typescript": "2.3.4" - }, - "scripts": { - "start": "gulp start", - "serve": "gulp e2e-serve", - "test": "gulp e2e-test", - "update-webdriver": "gulp e2e-webdriver-update" - } + "name": "ej2-quickstart", + "version": "0.0.1", + "description": "Essential JS 2 typescript quick start application", + "author": "Syncfusion Inc.", + "license": "SEE LICENSE IN license", + "repository": { + "type": "git", + "url": "https://github.com/syncfusion/ej2-quickstart.git" + }, + "scripts": { + "start": "webpack-dev-server --mode development", + "build": "webpack --mode production", + "serve": "gulp e2e-serve", + "test": "gulp e2e-test", + "update-webdriver": "gulp e2e-webdriver-update" + }, + "devDependencies": { + "ajv": "^8.11.2", + "browser-sync": "^2.18.12", + "gulp": "*", + "typescript": "*", + "gulp-protractor": "*", + "gulp-typescript": "*", + "jasmine": "^2.6.0", + "css-loader": "^6.7.2", + "ts-loader": "^9.4.1", + "mini-css-extract-plugin": "^2.7.0", + "html-webpack-plugin": "^5.5.0", + "webpack": "^5.75.0", + "webpack-cli": "^5.0.0", + "webpack-dev-server": "^4.11.1", + "webpack-stream": "^7.0.0" + }, + "dependencies": { + "@syncfusion/ej2": "*" + } } diff --git a/src/app/app.ts b/src/app/app.ts index 16bda24..fffda1c 100644 --- a/src/app/app.ts +++ b/src/app/app.ts @@ -15,7 +15,7 @@ interface TemplateFunction extends Window { } let isReadOnly: Function = (endDate: Date): boolean => { - return (endDate < new Date(2018, 6, 31, 0, 0)); + return (endDate < new Date(2024, 6, 31, 0, 0)); }; let data: Object[] = extend([], roomData, null, true); @@ -23,7 +23,7 @@ let scheduleOptions: ScheduleModel = { width: '100%', height: '850px', currentView: "Day", - selectedDate: new Date(2018, 6, 31), + selectedDate: new Date(2024, 6, 31), resourceHeaderTemplate: '#resourceTemplate', showWeekend: false, group: { @@ -58,13 +58,14 @@ let scheduleOptions: ScheduleModel = { endTime: { title: 'To', name: 'EndTime' } } }, - popupOpen: (args: PopupOpenEventArgs) => { + popupOpen: (args: PopupOpenEventArgs) => { let data: any = args.data; - if(args.type === "QuickInfo" || args.type === "Editor" || args.type === "RecurrenceAlert" || args.type === "DeleteAlert"){ - let target: HTMLElement = (args.type == "RecurrenceAlert" || args.type == "DeleteAlert") ? data.element[0] : args.target; + if (args.type === "QuickInfo" || args.type === "Editor" || args.type === "RecurrenceAlert" || args.type === "DeleteAlert") { + + let target: Element = (args.type == "RecurrenceAlert" || args.type == "DeleteAlert") ? args.element : args.target; if(!isNullOrUndefined(target) && target.classList.contains('e-work-cells')){ - let endDate = data.endTime as Date; - let startDate = data.startTime as Date; + let endDate = data.EndTime as Date; + let startDate = data.StartTime as Date; let groupIndex = data.groupIndex as number; if ((target.classList.contains('e-read-only-cells')) || (!scheduleObj.isSlotAvailable(startDate as Date, endDate as Date, groupIndex as number))) { args.cancel = true; @@ -78,7 +79,7 @@ let scheduleOptions: ScheduleModel = { renderCell: (args: RenderCellEventArgs) => { if (args.element.classList.contains('e-work-cells')) { // To disable the past date cells - if(args.date < new Date(2018, 6, 31, 0, 0)) { + if(args.date < new Date(2024, 6, 31, 0, 0)) { args.element.setAttribute('aria-readonly', 'true'); args.element.classList.add('e-read-only-cells'); } @@ -99,11 +100,17 @@ let scheduleOptions: ScheduleModel = { }, actionBegin: (args: ActionEventArgs) => { if(args.requestType == "eventCreate" || args.requestType == "eventChange"){ - let data: any = args.data; - let groupIndex = scheduleObj.eventBase.getGroupIndexFromEvent(data); - if(!scheduleObj.isSlotAvailable(data.StartTime as Date, data.EndTime as Date, groupIndex as number)) { - args.cancel = true; + if (args.requestType === "eventCreate") { + if(!scheduleObj.isSlotAvailable(args.addedRecords[0].StartTime as Date, args.addedRecords[0].EndTime as Date)) { + args.cancel = true; + } + } + else if (args.requestType === "eventChange") { + if(!scheduleObj.isSlotAvailable(args.changedRecords[0].StartTime as Date, args.changedRecords[0].EndTime as Date)) { + args.cancel = true; + } } + } } }; diff --git a/src/app/datasource.ts b/src/app/datasource.ts index e97a1bf..064a942 100644 --- a/src/app/datasource.ts +++ b/src/app/datasource.ts @@ -1,50 +1,50 @@ export let roomData: Object[] = [ - { Id: 1, Subject: "Board Meeting", Location: "Office", Description: "Meeting to discuss business goal of 2018.", StartTime: new Date(2018, 6, 30, 9, 0), EndTime: new Date(2018, 6, 30, 11, 0), RoomId: 1 }, - { Id: 2, Subject: "Training session on JSP", Location: "Office", Description: "Knowledge sharing on JSP topics.", StartTime: new Date(2018, 6, 30, 14, 0), EndTime: new Date(2018, 6, 30, 17, 0), RoomId: 1 }, - { Id: 3, Subject: "Sprint Planning with Team members", Location: "Office", Description: "Planning tasks for sprint.", StartTime: new Date(2018, 6, 30, 9, 30), EndTime: new Date(2018, 6, 30, 11, 0), RoomId: 2 }, - { Id: 4, Subject: "Meeting with Client", Location: "Office", Description: "Customer meeting to discuss features.", StartTime: new Date(2018, 6, 30, 11, 0), EndTime: new Date(2018, 6, 30, 13, 0), RoomId: 2 }, - { Id: 5, Subject: "Support Meeting with Managers", Location: "Office", Description: "Meeting to discuss support plan.", StartTime: new Date(2018, 6, 30, 16, 0), EndTime: new Date(2018, 6, 30, 17, 30), RoomId: 2 }, - { Id: 6, Subject: "Client Meeting", Location: "Office", Description: "Meeting to discuss client requirements.", StartTime: new Date(2018, 6, 30, 10, 30), EndTime: new Date(2018, 6, 30, 13, 0), RoomId: 3 }, - { Id: 7, Subject: "Appraisal Meeting", Location: "Office", Description: "Meeting to discuss employee appraisals.", StartTime: new Date(2018, 6, 30, 15, 0), EndTime: new Date(2018, 6, 30, 16, 30), RoomId: 3 }, - { Id: 8, Subject: "HR Meeting", Location: "Office", Description: "Meeting to discuss HR plans.", StartTime: new Date(2018, 6, 30, 8, 0), EndTime: new Date(2018, 6, 30, 9, 0), RoomId: 4 }, - { Id: 9, Subject: "Customer Meeting", Location: "Office", Description: "Meeting to discuss customer reported issues.", StartTime: new Date(2018, 6, 30, 10, 0), EndTime: new Date(2018, 6, 30, 12, 0), RoomId: 4 }, - { Id: 10, Subject: "Board Meeting", Location: "Office", Description: "Meeting to discuss business plans.", StartTime: new Date(2018, 6, 30, 14, 30), EndTime: new Date(2018, 6, 30, 17, 0), RoomId: 4 }, - { Id: 11, Subject: "Training session on Vue", Location: "Office", Description: "Knowledge sharing on Vue concepts.", StartTime: new Date(2018, 6, 30, 9, 0), EndTime: new Date(2018, 6, 30, 10, 30), RoomId: 5 }, - { Id: 12, Subject: "Meeting with Team members", Location: "Office", Description: "Meeting to discuss on work report.", StartTime: new Date(2018, 6, 30, 11, 30), EndTime: new Date(2018, 6, 30, 12, 0), RoomId: 5 }, - { Id: 13, Subject: "Meeting with General Manager", Location: "Office", Description: "Meeting to discuss support plan.", StartTime: new Date(2018, 6, 30, 14, 0), EndTime: new Date(2018, 6, 30, 16, 0), RoomId: 5 }, + { Id: 1, Subject: "Board Meeting", Location: "Office", Description: "Meeting to discuss business goal of 2024.", StartTime: new Date(2024, 6, 30, 9, 0), EndTime: new Date(2024, 6, 30, 11, 0), RoomId: 1 }, + { Id: 2, Subject: "Training session on JSP", Location: "Office", Description: "Knowledge sharing on JSP topics.", StartTime: new Date(2024, 6, 30, 14, 0), EndTime: new Date(2024, 6, 30, 17, 0), RoomId: 1 }, + { Id: 3, Subject: "Sprint Planning with Team members", Location: "Office", Description: "Planning tasks for sprint.", StartTime: new Date(2024, 6, 30, 9, 30), EndTime: new Date(2024, 6, 30, 11, 0), RoomId: 2 }, + { Id: 4, Subject: "Meeting with Client", Location: "Office", Description: "Customer meeting to discuss features.", StartTime: new Date(2024, 6, 30, 11, 0), EndTime: new Date(2024, 6, 30, 13, 0), RoomId: 2 }, + { Id: 5, Subject: "Support Meeting with Managers", Location: "Office", Description: "Meeting to discuss support plan.", StartTime: new Date(2024, 6, 30, 16, 0), EndTime: new Date(2024, 6, 30, 17, 30), RoomId: 2 }, + { Id: 6, Subject: "Client Meeting", Location: "Office", Description: "Meeting to discuss client requirements.", StartTime: new Date(2024, 6, 30, 10, 30), EndTime: new Date(2024, 6, 30, 13, 0), RoomId: 3 }, + { Id: 7, Subject: "Appraisal Meeting", Location: "Office", Description: "Meeting to discuss employee appraisals.", StartTime: new Date(2024, 6, 30, 15, 0), EndTime: new Date(2024, 6, 30, 16, 30), RoomId: 3 }, + { Id: 8, Subject: "HR Meeting", Location: "Office", Description: "Meeting to discuss HR plans.", StartTime: new Date(2024, 6, 30, 8, 0), EndTime: new Date(2024, 6, 30, 9, 0), RoomId: 4 }, + { Id: 9, Subject: "Customer Meeting", Location: "Office", Description: "Meeting to discuss customer reported issues.", StartTime: new Date(2024, 6, 30, 10, 0), EndTime: new Date(2024, 6, 30, 12, 0), RoomId: 4 }, + { Id: 10, Subject: "Board Meeting", Location: "Office", Description: "Meeting to discuss business plans.", StartTime: new Date(2024, 6, 30, 14, 30), EndTime: new Date(2024, 6, 30, 17, 0), RoomId: 4 }, + { Id: 11, Subject: "Training session on Vue", Location: "Office", Description: "Knowledge sharing on Vue concepts.", StartTime: new Date(2024, 6, 30, 9, 0), EndTime: new Date(2024, 6, 30, 10, 30), RoomId: 5 }, + { Id: 12, Subject: "Meeting with Team members", Location: "Office", Description: "Meeting to discuss on work report.", StartTime: new Date(2024, 6, 30, 11, 30), EndTime: new Date(2024, 6, 30, 12, 0), RoomId: 5 }, + { Id: 13, Subject: "Meeting with General Manager", Location: "Office", Description: "Meeting to discuss support plan.", StartTime: new Date(2024, 6, 30, 14, 0), EndTime: new Date(2024, 6, 30, 16, 0), RoomId: 5 }, - { Id: 42, Subject: "Lunch Break", Location: "", Description: "Lunch time.", StartTime: new Date(2018, 6, 1, 13, 0), EndTime: new Date(2018, 6, 1, 14, 0), RoomId: [1,2,3,4,5], RecurrenceRule: "FREQ=DAILY;INTERVAL=1;", EventType: "Lunch" }, - { Id: 43, Subject: "Maintenance", Location: "", Description: "Maintenance", StartTime: new Date(2018, 6, 1, 8, 0), EndTime: new Date(2018, 6, 1, 8, 30), RoomId: [1,3,5], RecurrenceRule: "FREQ=DAILY;INTERVAL=1;", EventType: "Maintenance" }, - { Id: 44, Subject: "Maintenance", Location: "", Description: "Maintenance", StartTime: new Date(2018, 6, 1, 14, 0), EndTime: new Date(2018, 6, 1, 14, 30), RoomId: [2,4], RecurrenceRule: "FREQ=DAILY;INTERVAL=1;", EventType: "Maintenance" }, - { Id: 45, Subject: "Maintenance", Location: "", Description: "Maintenance", StartTime: new Date(2018, 6, 1, 17, 0), EndTime: new Date(2018, 6, 1, 17, 30), RoomId: [3,5], RecurrenceRule: "FREQ=DAILY;INTERVAL=1;", EventType: "Maintenance" }, + { Id: 42, Subject: "Lunch Break", Location: "", Description: "Lunch time.", StartTime: new Date(2024, 6, 1, 13, 0), EndTime: new Date(2024, 6, 1, 14, 0), RoomId: [1,2,3,4,5], RecurrenceRule: "FREQ=DAILY;INTERVAL=1;", EventType: "Lunch" }, + { Id: 43, Subject: "Maintenance", Location: "", Description: "Maintenance", StartTime: new Date(2024, 6, 1, 8, 0), EndTime: new Date(2024, 6, 1, 8, 30), RoomId: [1,3,5], RecurrenceRule: "FREQ=DAILY;INTERVAL=1;", EventType: "Maintenance" }, + { Id: 44, Subject: "Maintenance", Location: "", Description: "Maintenance", StartTime: new Date(2024, 6, 1, 14, 0), EndTime: new Date(2024, 6, 1, 14, 30), RoomId: [2,4], RecurrenceRule: "FREQ=DAILY;INTERVAL=1;", EventType: "Maintenance" }, + { Id: 45, Subject: "Maintenance", Location: "", Description: "Maintenance", StartTime: new Date(2024, 6, 1, 17, 0), EndTime: new Date(2024, 6, 1, 17, 30), RoomId: [3,5], RecurrenceRule: "FREQ=DAILY;INTERVAL=1;", EventType: "Maintenance" }, - { Id: 14, Subject: "Board Meeting", Location: "Office", Description: "Meeting to discuss business goal of 2018.", StartTime: new Date(2018, 6, 31, 9, 0), EndTime: new Date(2018, 6, 31, 11, 0), RoomId: 1 }, - { Id: 15, Subject: "Training session on JSP", Location: "Office", Description: "Knowledge sharing on JSP topics.", StartTime: new Date(2018, 6, 31, 14, 0), EndTime: new Date(2018, 6, 31, 17, 0), RoomId: 1 }, - { Id: 16, Subject: "Sprint Planning with Team members", Location: "Office", Description: "Planning tasks for sprint.", StartTime: new Date(2018, 6, 31, 9, 30), EndTime: new Date(2018, 6, 31, 11, 0), RoomId: 2 }, - { Id: 17, Subject: "Meeting with Client", Location: "Office", Description: "Customer meeting to discuss features.", StartTime: new Date(2018, 6, 31, 11, 0), EndTime: new Date(2018, 6, 31, 13, 0), RoomId: 2 }, - { Id: 18, Subject: "Support Meeting with Managers", Location: "Office", Description: "Meeting to discuss support plan.", StartTime: new Date(2018, 6, 31, 16, 0), EndTime: new Date(2018, 6, 31, 17, 30), RoomId: 2 }, - { Id: 19, Subject: "Training session on C#", Location: "Office", Description: "Training session", StartTime: new Date(2018, 6, 31, 14, 30), EndTime: new Date(2018, 6, 31, 16, 0), RoomId: 2 }, - { Id: 20, Subject: "Client Meeting", Location: "Office", Description: "Meeting to discuss client requirements.", StartTime: new Date(2018, 6, 31, 10, 30), EndTime: new Date(2018, 6, 31, 13, 0), RoomId: 3 }, - { Id: 21, Subject: "Appraisal Meeting", Location: "Office", Description: "Meeting to discuss employee appraisals.", StartTime: new Date(2018, 6, 31, 15, 0), EndTime: new Date(2018, 6, 31, 16, 30), RoomId: 3 }, - { Id: 22, Subject: "HR Meeting", Location: "Office", Description: "Meeting to discuss HR plans.", StartTime: new Date(2018, 6, 31, 8, 0), EndTime: new Date(2018, 6, 31, 9, 0), RoomId: 4 }, - { Id: 23, Subject: "Customer Meeting", Location: "Office", Description: "Meeting to discuss customer reported issues.", StartTime: new Date(2018, 6, 31, 10, 0), EndTime: new Date(2018, 6, 31, 12, 0), RoomId: 4 }, - { Id: 24, Subject: "Board Meeting", Location: "Office", Description: "Meeting to discuss business plans.", StartTime: new Date(2018, 6, 31, 14, 30), EndTime: new Date(2018, 6, 31, 17, 0), RoomId: 4 }, - { Id: 25, Subject: "Training session on Vue", Location: "Office", Description: "Knowledge sharing on Vue concepts.", StartTime: new Date(2018, 6, 31, 9, 0), EndTime: new Date(2018, 6, 31, 10, 30), RoomId: 5 }, - { Id: 26, Subject: "Meeting with Team members", Location: "Office", Description: "Meeting to discuss on work report.", StartTime: new Date(2018, 6, 31, 11, 30), EndTime: new Date(2018, 6, 31, 12, 0), RoomId: 5 }, - { Id: 27, Subject: "Meeting with General Manager", Location: "Office", Description: "Meeting to discuss support plan.", StartTime: new Date(2018, 6, 31, 14, 0), EndTime: new Date(2018, 6, 31, 16, 0), RoomId: 5 }, + { Id: 14, Subject: "Board Meeting", Location: "Office", Description: "Meeting to discuss business goal of 2024.", StartTime: new Date(2024, 6, 31, 9, 0), EndTime: new Date(2024, 6, 31, 11, 0), RoomId: 1 }, + { Id: 15, Subject: "Training session on JSP", Location: "Office", Description: "Knowledge sharing on JSP topics.", StartTime: new Date(2024, 6, 31, 14, 0), EndTime: new Date(2024, 6, 31, 17, 0), RoomId: 1 }, + { Id: 16, Subject: "Sprint Planning with Team members", Location: "Office", Description: "Planning tasks for sprint.", StartTime: new Date(2024, 6, 31, 9, 30), EndTime: new Date(2024, 6, 31, 11, 0), RoomId: 2 }, + { Id: 17, Subject: "Meeting with Client", Location: "Office", Description: "Customer meeting to discuss features.", StartTime: new Date(2024, 6, 31, 11, 0), EndTime: new Date(2024, 6, 31, 13, 0), RoomId: 2 }, + { Id: 18, Subject: "Support Meeting with Managers", Location: "Office", Description: "Meeting to discuss support plan.", StartTime: new Date(2024, 6, 31, 16, 0), EndTime: new Date(2024, 6, 31, 17, 30), RoomId: 2 }, + { Id: 19, Subject: "Training session on C#", Location: "Office", Description: "Training session", StartTime: new Date(2024, 6, 31, 14, 30), EndTime: new Date(2024, 6, 31, 16, 0), RoomId: 2 }, + { Id: 20, Subject: "Client Meeting", Location: "Office", Description: "Meeting to discuss client requirements.", StartTime: new Date(2024, 6, 31, 10, 30), EndTime: new Date(2024, 6, 31, 13, 0), RoomId: 3 }, + { Id: 21, Subject: "Appraisal Meeting", Location: "Office", Description: "Meeting to discuss employee appraisals.", StartTime: new Date(2024, 6, 31, 15, 0), EndTime: new Date(2024, 6, 31, 16, 30), RoomId: 3 }, + { Id: 22, Subject: "HR Meeting", Location: "Office", Description: "Meeting to discuss HR plans.", StartTime: new Date(2024, 6, 31, 8, 0), EndTime: new Date(2024, 6, 31, 9, 0), RoomId: 4 }, + { Id: 23, Subject: "Customer Meeting", Location: "Office", Description: "Meeting to discuss customer reported issues.", StartTime: new Date(2024, 6, 31, 10, 0), EndTime: new Date(2024, 6, 31, 12, 0), RoomId: 4 }, + { Id: 24, Subject: "Board Meeting", Location: "Office", Description: "Meeting to discuss business plans.", StartTime: new Date(2024, 6, 31, 14, 30), EndTime: new Date(2024, 6, 31, 17, 0), RoomId: 4 }, + { Id: 25, Subject: "Training session on Vue", Location: "Office", Description: "Knowledge sharing on Vue concepts.", StartTime: new Date(2024, 6, 31, 9, 0), EndTime: new Date(2024, 6, 31, 10, 30), RoomId: 5 }, + { Id: 26, Subject: "Meeting with Team members", Location: "Office", Description: "Meeting to discuss on work report.", StartTime: new Date(2024, 6, 31, 11, 30), EndTime: new Date(2024, 6, 31, 12, 0), RoomId: 5 }, + { Id: 27, Subject: "Meeting with General Manager", Location: "Office", Description: "Meeting to discuss support plan.", StartTime: new Date(2024, 6, 31, 14, 0), EndTime: new Date(2024, 6, 31, 16, 0), RoomId: 5 }, - { Id: 28, Subject: "Board Meeting", Location: "Office", Description: "Meeting to discuss business goal of 2018.", StartTime: new Date(2018, 7, 1, 9, 0), EndTime: new Date(2018, 7, 1, 11, 0), RoomId: 1 }, - { Id: 29, Subject: "Training session on JSP", Location: "Office", Description: "Knowledge sharing on JSP topics.", StartTime: new Date(2018, 7, 1, 14, 0), EndTime: new Date(2018, 7, 1, 17, 0), RoomId: 1 }, - { Id: 30, Subject: "Sprint Planning with Team members", Location: "Office", Description: "Planning tasks for sprint.", StartTime: new Date(2018, 7, 1, 9, 30), EndTime: new Date(2018, 7, 1, 11, 0), RoomId: 2 }, - { Id: 31, Subject: "Meeting with Client", Location: "Office", Description: "Customer meeting to discuss features.", StartTime: new Date(2018, 7, 1, 11, 0), EndTime: new Date(2018, 7, 1, 13, 0), RoomId: 2 }, - { Id: 32, Subject: "Support Meeting with Managers", Location: "Office", Description: "Meeting to discuss support plan.", StartTime: new Date(2018, 7, 1, 16, 0), EndTime: new Date(2018, 7, 1, 17, 30), RoomId: 2 }, - { Id: 33, Subject: "Training session on C#", Location: "Office", Description: "Training session", StartTime: new Date(2018, 7, 1, 14, 30), EndTime: new Date(2018, 7, 1, 16, 0), RoomId: 2 }, - { Id: 34, Subject: "Client Meeting", Location: "Office", Description: "Meeting to discuss client requirements.", StartTime: new Date(2018, 7, 1, 10, 30), EndTime: new Date(2018, 7, 1, 13, 0), RoomId: 3 }, - { Id: 35, Subject: "Appraisal Meeting", Location: "Office", Description: "Meeting to discuss employee appraisals.", StartTime: new Date(2018, 7, 1, 15, 0), EndTime: new Date(2018, 7, 1, 16, 30), RoomId: 3 }, - { Id: 36, Subject: "HR Meeting", Location: "Office", Description: "Meeting to discuss HR plans.", StartTime: new Date(2018, 7, 1, 8, 0), EndTime: new Date(2018, 7, 1, 9, 0), RoomId: 4 }, - { Id: 37, Subject: "Customer Meeting", Location: "Office", Description: "Meeting to discuss customer reported issues.", StartTime: new Date(2018, 7, 1, 10, 0), EndTime: new Date(2018, 7, 1, 12, 0), RoomId: 4 }, - { Id: 38, Subject: "Board Meeting", Location: "Office", Description: "Meeting to discuss business plans.", StartTime: new Date(2018, 7, 1, 14, 30), EndTime: new Date(2018, 7, 1, 17, 0), RoomId: 4 }, - { Id: 39, Subject: "Training session on Vue", Location: "Office", Description: "Knowledge sharing on Vue concepts.", StartTime: new Date(2018, 7, 1, 9, 0), EndTime: new Date(2018, 7, 1, 10, 30), RoomId: 5 }, - { Id: 40, Subject: "Meeting with Team members", Location: "Office", Description: "Meeting to discuss on work report.", StartTime: new Date(2018, 7, 1, 11, 30), EndTime: new Date(2018, 7, 1, 12, 0), RoomId: 5 }, - { Id: 41, Subject: "Meeting with General Manager", Location: "Office", Description: "Meeting to discuss support plan.", StartTime: new Date(2018, 7, 1, 14, 0), EndTime: new Date(2018, 7, 1, 16, 0), RoomId: 5 } + { Id: 28, Subject: "Board Meeting", Location: "Office", Description: "Meeting to discuss business goal of 2024.", StartTime: new Date(2024, 7, 1, 9, 0), EndTime: new Date(2024, 7, 1, 11, 0), RoomId: 1 }, + { Id: 29, Subject: "Training session on JSP", Location: "Office", Description: "Knowledge sharing on JSP topics.", StartTime: new Date(2024, 7, 1, 14, 0), EndTime: new Date(2024, 7, 1, 17, 0), RoomId: 1 }, + { Id: 30, Subject: "Sprint Planning with Team members", Location: "Office", Description: "Planning tasks for sprint.", StartTime: new Date(2024, 7, 1, 9, 30), EndTime: new Date(2024, 7, 1, 11, 0), RoomId: 2 }, + { Id: 31, Subject: "Meeting with Client", Location: "Office", Description: "Customer meeting to discuss features.", StartTime: new Date(2024, 7, 1, 11, 0), EndTime: new Date(2024, 7, 1, 13, 0), RoomId: 2 }, + { Id: 32, Subject: "Support Meeting with Managers", Location: "Office", Description: "Meeting to discuss support plan.", StartTime: new Date(2024, 7, 1, 16, 0), EndTime: new Date(2024, 7, 1, 17, 30), RoomId: 2 }, + { Id: 33, Subject: "Training session on C#", Location: "Office", Description: "Training session", StartTime: new Date(2024, 7, 1, 14, 30), EndTime: new Date(2024, 7, 1, 16, 0), RoomId: 2 }, + { Id: 34, Subject: "Client Meeting", Location: "Office", Description: "Meeting to discuss client requirements.", StartTime: new Date(2024, 7, 1, 10, 30), EndTime: new Date(2024, 7, 1, 13, 0), RoomId: 3 }, + { Id: 35, Subject: "Appraisal Meeting", Location: "Office", Description: "Meeting to discuss employee appraisals.", StartTime: new Date(2024, 7, 1, 15, 0), EndTime: new Date(2024, 7, 1, 16, 30), RoomId: 3 }, + { Id: 36, Subject: "HR Meeting", Location: "Office", Description: "Meeting to discuss HR plans.", StartTime: new Date(2024, 7, 1, 8, 0), EndTime: new Date(2024, 7, 1, 9, 0), RoomId: 4 }, + { Id: 37, Subject: "Customer Meeting", Location: "Office", Description: "Meeting to discuss customer reported issues.", StartTime: new Date(2024, 7, 1, 10, 0), EndTime: new Date(2024, 7, 1, 12, 0), RoomId: 4 }, + { Id: 38, Subject: "Board Meeting", Location: "Office", Description: "Meeting to discuss business plans.", StartTime: new Date(2024, 7, 1, 14, 30), EndTime: new Date(2024, 7, 1, 17, 0), RoomId: 4 }, + { Id: 39, Subject: "Training session on Vue", Location: "Office", Description: "Knowledge sharing on Vue concepts.", StartTime: new Date(2024, 7, 1, 9, 0), EndTime: new Date(2024, 7, 1, 10, 30), RoomId: 5 }, + { Id: 40, Subject: "Meeting with Team members", Location: "Office", Description: "Meeting to discuss on work report.", StartTime: new Date(2024, 7, 1, 11, 30), EndTime: new Date(2024, 7, 1, 12, 0), RoomId: 5 }, + { Id: 41, Subject: "Meeting with General Manager", Location: "Office", Description: "Meeting to discuss support plan.", StartTime: new Date(2024, 7, 1, 14, 0), EndTime: new Date(2024, 7, 1, 16, 0), RoomId: 5 } ]; diff --git a/src/index.html b/src/index.html index b4a66f2..659caf4 100644 --- a/src/index.html +++ b/src/index.html @@ -2,20 +2,17 @@ - Essential JS 2 + Schedule Meeting Room Calendar - + - - - - + @@ -171,3 +168,5 @@ } + + diff --git a/src/system.config.js b/src/system.config.js deleted file mode 100644 index 3cc8364..0000000 --- a/src/system.config.js +++ /dev/null @@ -1,28 +0,0 @@ -System.config({ - paths: { - 'npm:': './node_modules/', - 'syncfusion:': 'npm:@syncfusion/' - - }, - map: { - app: 'app', - - //Syncfusion packages mapping - "@syncfusion/ej2-base": "syncfusion:ej2-base/dist/ej2-base.umd.min.js", - "@syncfusion/ej2-data": "syncfusion:ej2-data/dist/ej2-data.umd.min.js", - "@syncfusion/ej2-inputs": "syncfusion:ej2-inputs/dist/ej2-inputs.umd.min.js", - "@syncfusion/ej2-buttons": "syncfusion:ej2-buttons/dist/ej2-buttons.umd.min.js", - "@syncfusion/ej2-splitbuttons": "syncfusion:ej2-splitbuttons/dist/ej2-splitbuttons.umd.min.js", - "@syncfusion/ej2-lists": "syncfusion:ej2-lists/dist/ej2-lists.umd.min.js", - "@syncfusion/ej2-navigations": "syncfusion:ej2-navigations/dist/ej2-navigations.umd.min.js", - "@syncfusion/ej2-popups": "syncfusion:ej2-popups/dist/ej2-popups.umd.min.js", - "@syncfusion/ej2-dropdowns": "syncfusion:ej2-dropdowns/dist/ej2-dropdowns.umd.min.js", - "@syncfusion/ej2-calendars": "syncfusion:ej2-calendars/dist/ej2-calendars.umd.min.js", - "@syncfusion/ej2-schedule": "syncfusion:ej2-schedule/dist/ej2-schedule.umd.min.js" - }, - packages: { - 'app': { main: 'app', defaultExtension: 'js' } - } -}); - -System.import('app'); diff --git a/tsconfig.json b/tsconfig.json index c670efe..733de1d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,22 +1,12 @@ { - "compilerOptions": { - "target": "es5", - "module": "amd", - "removeComments": true, - "noLib": false, - "sourceMap": true, - "pretty": true, - "allowUnreachableCode": false, - "allowUnusedLabels": false, - "noImplicitAny": true, - "noImplicitReturns": true, - "noImplicitUseStrict": false, - "noFallthroughCasesInSwitch": true, - "allowJs": false, - "noEmitOnError": true, - "forceConsistentCasingInFileNames": true, - "moduleResolution": "node", - "suppressImplicitAnyIndexErrors": true - }, - "compileOnSave": false -} \ No newline at end of file + "compilerOptions": { + "target": "es2016", + "module": "ES6", + "sourceMap": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": false, + "skipLibCheck": true, + "moduleResolution": "node" + } +} diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000..f61e596 --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,41 @@ +const HtmlWebpackPlugin = require("html-webpack-plugin"); +const MiniCssExtractPlugin = require("mini-css-extract-plugin"); +const path = require('path'); + +module.exports = { + entry: ['./src/app/app.ts', './src/styles/styles.css'], + module: { + rules: [ + { + test: /\.ts?$/, + use: 'ts-loader', + exclude: /node_modules/, + }, + { + test: /\.css$/, + use: [ MiniCssExtractPlugin.loader, "css-loader" ] + }, + ], + }, + resolve: { + extensions: ['.ts', '.js'], + }, + output: { + filename: 'bundle.js', + path: path.resolve(__dirname, 'dist'), + }, + plugins: [ + new HtmlWebpackPlugin({ + template: 'src/index.html' + }), + new MiniCssExtractPlugin({ + filename: "bundle.css" + }) + ], + devServer: { + static: path.join(__dirname, "dist"), + compress: true, + port: 4000, + open: true + }, +};