dev_forge
caicai8 5 years ago
commit 64376df1c5

@ -201,25 +201,16 @@ class PullRequestsController < ApplicationController
issue_files = params[:attachment_ids]
change_files = false
issue_file_ids = []
if issue_files.present?
issue_attachments = @issue&.attachments
issue_file_ids = issue_attachments&.pluck(:id)
left_file_ids = issue_file_ids - issue_files
new_file_ids = issue_files - issue_file_ids
if left_file_ids.size > 0
change_files = true
issue_attachments.where(id: left_file_ids).delete_all
end
if new_file_ids.size > 0
change_files = true
new_file_ids.each do |id|
attachment = Attachment.select(:id, :container_id, :container_type)&.find_by_id(id)
unless attachment.blank?
attachment.container = @issue
attachment.author_id = current_user.id
attachment.description = ""
attachment.save
end
change_files = true
issue_files.each do |id|
attachment = Attachment.select(:id, :container_id, :container_type)&.find_by_id(id)
unless attachment.blank?
attachment.container = @issue
attachment.author_id = current_user.id
attachment.description = ""
attachment.save
end
end
end

@ -68,7 +68,7 @@
"./static/js/158.b8182b3b.chunk.js": "./static/js/158.b8182b3b.chunk.js",
"./static/js/159.853da2bd.chunk.js": "./static/js/159.853da2bd.chunk.js",
"./static/js/16.ec4dcede.chunk.js": "./static/js/16.ec4dcede.chunk.js",
"./static/js/160.24f63c24.chunk.js": "./static/js/160.24f63c24.chunk.js",
"./static/js/160.2c9c9014.chunk.js": "./static/js/160.2c9c9014.chunk.js",
"./static/js/161.1289bb4c.chunk.js": "./static/js/161.1289bb4c.chunk.js",
"./static/js/162.15c1b2d7.chunk.js": "./static/js/162.15c1b2d7.chunk.js",
"./static/js/163.c711c38f.chunk.js": "./static/js/163.c711c38f.chunk.js",
@ -92,7 +92,7 @@
"./static/js/18.105e1eb7.chunk.js": "./static/js/18.105e1eb7.chunk.js",
"./static/js/180.abba8537.chunk.js": "./static/js/180.abba8537.chunk.js",
"./static/js/181.b42edfcd.chunk.js": "./static/js/181.b42edfcd.chunk.js",
"./static/js/182.b7e3a0f2.chunk.js": "./static/js/182.b7e3a0f2.chunk.js",
"./static/js/182.e0676ef7.chunk.js": "./static/js/182.e0676ef7.chunk.js",
"./static/js/183.b34ed057.chunk.js": "./static/js/183.b34ed057.chunk.js",
"./static/js/184.c7d63100.chunk.js": "./static/js/184.c7d63100.chunk.js",
"./static/js/185.9c6c47a4.chunk.js": "./static/js/185.9c6c47a4.chunk.js",
@ -227,7 +227,7 @@
"./static/js/56.31429d59.chunk.js": "./static/js/56.31429d59.chunk.js",
"./static/js/57.d2da64a0.chunk.js": "./static/js/57.d2da64a0.chunk.js",
"./static/js/58.2165cb51.chunk.js": "./static/js/58.2165cb51.chunk.js",
"./static/js/59.d83cf48e.chunk.js": "./static/js/59.d83cf48e.chunk.js",
"./static/js/59.c483fe76.chunk.js": "./static/js/59.c483fe76.chunk.js",
"./static/js/6.bb495cba.chunk.js": "./static/js/6.bb495cba.chunk.js",
"./static/js/60.d0d3ef52.chunk.js": "./static/js/60.d0d3ef52.chunk.js",
"./static/js/61.42df9549.chunk.js": "./static/js/61.42df9549.chunk.js",
@ -247,7 +247,7 @@
"./static/js/74.cfa0f703.chunk.js": "./static/js/74.cfa0f703.chunk.js",
"./static/js/75.385cc133.chunk.js": "./static/js/75.385cc133.chunk.js",
"./static/js/76.5a64bd52.chunk.js": "./static/js/76.5a64bd52.chunk.js",
"./static/js/77.561da811.chunk.js": "./static/js/77.561da811.chunk.js",
"./static/js/77.f491ec5f.chunk.js": "./static/js/77.f491ec5f.chunk.js",
"./static/js/78.2a0a496c.chunk.js": "./static/js/78.2a0a496c.chunk.js",
"./static/js/79.de080f3a.chunk.js": "./static/js/79.de080f3a.chunk.js",
"./static/js/8.e2184916.chunk.js": "./static/js/8.e2184916.chunk.js",
@ -263,7 +263,7 @@
"./static/js/89.b46c0b37.chunk.js": "./static/js/89.b46c0b37.chunk.js",
"./static/js/9.6f9ef4ac.chunk.js": "./static/js/9.6f9ef4ac.chunk.js",
"./static/js/90.ebdbda62.chunk.js": "./static/js/90.ebdbda62.chunk.js",
"./static/js/91.fc359bf8.chunk.js": "./static/js/91.fc359bf8.chunk.js",
"./static/js/91.f276e8e2.chunk.js": "./static/js/91.f276e8e2.chunk.js",
"./static/js/92.9e9e70b1.chunk.js": "./static/js/92.9e9e70b1.chunk.js",
"./static/js/93.8a6c50b0.chunk.js": "./static/js/93.8a6c50b0.chunk.js",
"./static/js/94.fa90d379.chunk.js": "./static/js/94.fa90d379.chunk.js",
@ -273,7 +273,7 @@
"./static/js/98.88d3b919.chunk.js": "./static/js/98.88d3b919.chunk.js",
"./static/js/99.bb3d2c54.chunk.js": "./static/js/99.bb3d2c54.chunk.js",
"main.css": "./static/css/main.c0718fb6.css",
"main.js": "./static/js/main.e069f5e6.js",
"main.js": "./static/js/main.a59b16ab.js",
"static/media/KaTeX_AMS-Regular.ttf": "static/media/KaTeX_AMS-Regular.aaf4eee9.ttf",
"static/media/KaTeX_AMS-Regular.woff": "static/media/KaTeX_AMS-Regular.7f06b4e3.woff",
"static/media/KaTeX_AMS-Regular.woff2": "static/media/KaTeX_AMS-Regular.e78e28b4.woff2",

@ -24,7 +24,7 @@
_host = 'https://ali-cdn.educoder.net/react/build/'
}
document.write('<script type="text/javascript" src="' + _host + 'js/js_min_all.js"><\/script>');
document.write('<script type="text/javascript" src="' + _host + 'static/js/main.e069f5e6.js"><\/script>');
document.write('<script type="text/javascript" src="' + _host + 'static/js/main.a59b16ab.js"><\/script>');
})()
</script>
<script>!function(){var t=location.href;"3007"===window.location.port?-1!=t.indexOf("/tasks/")?(document.write('<script type="text/javascript" src="https://newweb.educoder.net/assets/kindeditor/kindeditor.js"><\/script>'),document.write('<script type="text/javascript" src="/react/build/js/create_kindeditor.js?v=1.1.1"><\/script>'),document.write('<script type="text/javascript" src="https://newweb.educoder.net/javascripts/educoder/edu_application.js"><\/script>')):-1!=t.indexOf("/paths/")&&document.write('<script type="text/javascript" src="https://newweb.educoder.net/javascripts/educoder/edu_application.js"><\/script>'):-1!=t.indexOf("/tasks/")?(document.write('<script type="text/javascript" src="/assets/kindeditor/kindeditor.js"><\/script>'),document.write('<script type="text/javascript" src="/react/build/js/create_kindeditor.js?v=1.1.1"><\/script>'),document.write('<script type="text/javascript" src="/javascripts/educoder/edu_application.js"><\/script>')):-1!=t.indexOf("/paths/")&&document.write('<script type="text/javascript" src="/javascripts/educoder/edu_application.js"><\/script>')}()</script><script type="text/javascript" src="https://cdn.bootcss.com/quill/1.3.7/quill.core.min.js"></script></body></html>

File diff suppressed because one or more lines are too long

@ -875,7 +875,7 @@ exports = module.exports = __webpack_require__(312)(true);
// module
exports.push([module.i, ".mergediv{height:65px;width:100%;padding:15px;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;border:1px solid #eee;-ms-flex-wrap:wrap;flex-wrap:wrap;text-align:center;border-radius:4px;margin-left:15px}.topmerge_btn{background:#21ba45;color:#fff!important;padding:0 14px;text-align:center;height:36px;line-height:32px;border-radius:4px}", "", {"version":3,"sources":["/Users/hs/edu/educoder/public/react/src/forge/Merge/merge.css"],"names":[],"mappings":"AAAA,UACI,YAAa,AACb,WAAY,AACZ,aAAc,AACd,8BAA+B,AACvB,sBAAuB,AAC/B,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,8BAA+B,AACnC,sBAA0B,AAC1B,mBAAoB,AAChB,eAAgB,AACpB,kBAAmB,AACnB,kBAAkB,AAClB,gBAAkB,CACnB,AACD,cACE,mBAAoB,AACpB,qBAAyB,AACzB,eAAiB,AACjB,kBAAmB,AACnB,YAAa,AACb,iBAAkB,AAClB,iBAAmB,CACpB","file":"merge.css","sourcesContent":[".mergediv{\n height: 65px;\n width: 100%;\n padding: 15px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-pack: justify;\n justify-content: space-between;\n border: 1px solid #EEEEEE;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n text-align: center;\n border-radius:4px;\n margin-left: 15px;\n }\n .topmerge_btn{\n background: #21ba45;\n color: #FFFFFF!important;\n padding:0px 14px;\n text-align: center;\n height: 36px;\n line-height: 32px;\n border-radius: 4px;\n }"],"sourceRoot":""}]);
exports.push([module.i, ".mergediv{height:65px;width:100%;padding:15px;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;border:1px solid #eee;-ms-flex-wrap:wrap;flex-wrap:wrap;text-align:center;border-radius:4px;margin-left:15px}.topmerge_btn{background:#21ba45;padding:0 14px;height:36px}.prdetail,.topmerge_btn{color:#fff!important;text-align:center;line-height:32px;border-radius:4px}.prdetail{display:inline-block;background:#a333c8;padding:0 12px;height:32px}", "", {"version":3,"sources":["/Users/hs/edu/educoder/public/react/src/forge/Merge/merge.css"],"names":[],"mappings":"AAAA,UACI,YAAa,AACb,WAAY,AACZ,aAAc,AACd,8BAA+B,AACvB,sBAAuB,AAC/B,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,8BAA+B,AACnC,sBAA0B,AAC1B,mBAAoB,AAChB,eAAgB,AACpB,kBAAmB,AACnB,kBAAkB,AAClB,gBAAkB,CACnB,AACD,cACE,mBAAoB,AAEpB,eAAiB,AAEjB,WAAa,CAGd,AAED,wBARE,qBAAyB,AAEzB,kBAAmB,AAEnB,iBAAkB,AAClB,iBAAmB,CAapB,AAVD,UACE,qBAAsB,AACtB,mBAAoB,AAEpB,eAAiB,AAEjB,WAAa,CAId","file":"merge.css","sourcesContent":[".mergediv{\n height: 65px;\n width: 100%;\n padding: 15px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-pack: justify;\n justify-content: space-between;\n border: 1px solid #EEEEEE;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n text-align: center;\n border-radius:4px;\n margin-left: 15px;\n }\n .topmerge_btn{\n background: #21ba45;\n color: #FFFFFF!important;\n padding:0px 14px;\n text-align: center;\n height: 36px;\n line-height: 32px;\n border-radius: 4px;\n }\n\n .prdetail{\n display: inline-block;\n background: #a333c8;\n color: #ffffff!important;\n padding:0px 12px;\n text-align: center;\n height: 32px;\n /*width: 110px;*/\n border-radius: 4px;\n line-height: 32px;\n }"],"sourceRoot":""}]);
// exports

@ -86,7 +86,7 @@
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
/******/ }
/******/ script.src = __webpack_require__.p + "./static/js/" + ({}[chunkId]||chunkId) + "." + {"0":"1bc3d7df","1":"976094c3","2":"bc3d8cf1","3":"87056bcb","4":"baba45fe","5":"7c4b83e5","6":"bb495cba","7":"231bff40","8":"e2184916","9":"6f9ef4ac","10":"e6f0d5df","11":"d878a337","12":"fb20694d","13":"891a29d9","14":"3129051e","15":"044bdca2","16":"ec4dcede","17":"3fcd4df4","18":"105e1eb7","19":"4d5ee4fc","20":"f22140b1","21":"397df705","22":"4c8bb333","23":"aebb159d","24":"22ef380a","25":"77a31c58","26":"4a47b24f","27":"0f0040a9","28":"d40ce852","29":"4131983c","30":"54f7104f","31":"6880ce04","32":"fedb209c","33":"100ad33d","34":"4291681f","35":"32a9f338","36":"cc9fadd2","37":"f93f5966","38":"7efa37da","39":"e36275c9","40":"a2782e03","41":"ec116e1a","42":"dbcf1df2","43":"4cdbff5f","44":"9be18220","45":"7b58fdd3","46":"c1e7062a","47":"9301a210","48":"5417c295","49":"a66e9054","50":"49a23628","51":"4eb1ce58","52":"f17e0e11","53":"cef5fcb3","54":"74e62ba5","55":"abe23415","56":"31429d59","57":"d2da64a0","58":"2165cb51","59":"d83cf48e","60":"d0d3ef52","61":"42df9549","62":"88296aa0","63":"3bac03de","64":"5eccd94a","65":"88707d5e","66":"908242da","67":"0f65cd89","68":"792bbdc2","69":"ad66f4c7","70":"adb8d0da","71":"7a76b045","72":"45dc0ea4","73":"227e2efb","74":"cfa0f703","75":"385cc133","76":"5a64bd52","77":"561da811","78":"2a0a496c","79":"de080f3a","80":"625007b9","81":"c2fc7f34","82":"3f3fb911","83":"b75fac03","84":"d215a611","85":"28e659a5","86":"c4fa328e","87":"3c551684","88":"4e63f179","89":"b46c0b37","90":"ebdbda62","91":"fc359bf8","92":"9e9e70b1","93":"8a6c50b0","94":"fa90d379","95":"f1ba604f","96":"46e744a4","97":"eb363f34","98":"88d3b919","99":"bb3d2c54","100":"83f3df30","101":"0c87bf65","102":"0ce6fecf","103":"cedaeca4","104":"2169c06b","105":"929a96f0","106":"d798b463","107":"b0d826f1","108":"ec1d356b","109":"41a33a1a","110":"057de435","111":"48228f82","112":"ffd52d92","113":"dcb2ee6d","114":"c6a6e101","115":"f156a00f","116":"a317fe46","117":"ead206c4","118":"d552e90d","119":"e184d9db","120":"384d526a","121":"3b8227c6","122":"186f854f","123":"8c68d28a","124":"408ebb33","125":"991269bf","126":"7167d483","127":"cd709423","128":"0f3f6907","129":"6615f7e4","130":"9bf98449","131":"255c7c43","132":"36844213","133":"9f06d0a5","134":"b8a3ed43","135":"a5093954","136":"9cd53ce0","137":"689cbd5d","138":"e8e1273e","139":"80419667","140":"7c2e7a32","141":"09f4d1b2","142":"0d52a9f3","143":"cb69da0b","144":"34ac3654","145":"f92c8ac0","146":"25c24567","147":"b1b48fca","148":"8847fe03","149":"96790f46","150":"2d8568a9","151":"9b55bafe","152":"235dc8d0","153":"cc337346","154":"6661c864","155":"ed22d6b2","156":"a71c0de3","157":"01fef202","158":"b8182b3b","159":"853da2bd","160":"24f63c24","161":"1289bb4c","162":"15c1b2d7","163":"c711c38f","164":"7d91d358","165":"dec54504","166":"3ff355b5","167":"7a30e1c2","168":"471f4346","169":"2649e466","170":"2de996df","171":"51f475db","172":"4764b871","173":"2709a7bb","174":"9c9c4f81","175":"1c50cd8c","176":"6ccf4497","177":"916a43d7","178":"e41d6fc9","179":"d9a714d5","180":"abba8537","181":"b42edfcd","182":"b7e3a0f2","183":"b34ed057","184":"c7d63100","185":"9c6c47a4","186":"ddb826e1","187":"5bb529c2","188":"c0498792","189":"8748b741","190":"b38f13e9","191":"23a85f14","192":"0f28a588","193":"4d2aadc1","194":"996d34c8","195":"f5b10b42","196":"c1938f28","197":"f187b9d8","198":"3f1fe6b4","199":"cdc117e7","200":"263ef8f9","201":"67de5466","202":"8dd9f7bd","203":"319c605d","204":"7dd26258","205":"e7b43efe","206":"0f428fc7","207":"b05232b2","208":"0f479a47","209":"45fb7894","210":"f9ead356","211":"dec10650","212":"1489d5e6","213":"41b93d37","214":"8b4e638e","215":"3f681e33","216":"1c11ff4a","217":"331d5d41","218":"d4e6c6c8","219":"8f881b85","220":"476d3205","221":"70a965d5","222":"6ff7c3b7","223":"da42fdf1","224":"8708dc05","225":"9d766db6","226":"c94ba386","227":"8318eb70","228":"be14e4ee","229":"d874d46d","230":"bacab125","231":"6bd1e3d6","232":"fab381d0","233":"4ca8923d","234":"da34a632","235":"ab39b18d","236":"4dc0b9dd","237":"c530e223","238":"fb04bcb0","239":"b524e5cf","240":"3b04fce4","241":"354099b6","242":"998125ba","243":"e1cdabfb","244":"141ea9dc","245":"66f26241","246":"e601a6c2","247":"7f43425c","248":"01a6e2ea","249":"1e8c844a","250":"27527155","251":"0b6b226f","252":"7bad99e9","253":"d9a942c0","254":"ca00cced","255":"5b01c41a","256":"6270e17d","257":"019f789a","258":"d512f87d","259":"c0a0fa96","260":"6f4efb64","261":"33c50e68","262":"e53199b9","263":"593b6526","264":"676040ff","265":"36b21858","266":"1c5a5491","267":"49d847d6","268":"ed711356","269":"97095b2d","270":"e1428571","271":"398770f4","272":"f6c4eaad"}[chunkId] + ".chunk.js";
/******/ script.src = __webpack_require__.p + "./static/js/" + ({}[chunkId]||chunkId) + "." + {"0":"1bc3d7df","1":"976094c3","2":"bc3d8cf1","3":"87056bcb","4":"baba45fe","5":"7c4b83e5","6":"bb495cba","7":"231bff40","8":"e2184916","9":"6f9ef4ac","10":"e6f0d5df","11":"d878a337","12":"fb20694d","13":"891a29d9","14":"3129051e","15":"044bdca2","16":"ec4dcede","17":"3fcd4df4","18":"105e1eb7","19":"4d5ee4fc","20":"f22140b1","21":"397df705","22":"4c8bb333","23":"aebb159d","24":"22ef380a","25":"77a31c58","26":"4a47b24f","27":"0f0040a9","28":"d40ce852","29":"4131983c","30":"54f7104f","31":"6880ce04","32":"fedb209c","33":"100ad33d","34":"4291681f","35":"32a9f338","36":"cc9fadd2","37":"f93f5966","38":"7efa37da","39":"e36275c9","40":"a2782e03","41":"ec116e1a","42":"dbcf1df2","43":"4cdbff5f","44":"9be18220","45":"7b58fdd3","46":"c1e7062a","47":"9301a210","48":"5417c295","49":"a66e9054","50":"49a23628","51":"4eb1ce58","52":"f17e0e11","53":"cef5fcb3","54":"74e62ba5","55":"abe23415","56":"31429d59","57":"d2da64a0","58":"2165cb51","59":"c483fe76","60":"d0d3ef52","61":"42df9549","62":"88296aa0","63":"3bac03de","64":"5eccd94a","65":"88707d5e","66":"908242da","67":"0f65cd89","68":"792bbdc2","69":"ad66f4c7","70":"adb8d0da","71":"7a76b045","72":"45dc0ea4","73":"227e2efb","74":"cfa0f703","75":"385cc133","76":"5a64bd52","77":"f491ec5f","78":"2a0a496c","79":"de080f3a","80":"625007b9","81":"c2fc7f34","82":"3f3fb911","83":"b75fac03","84":"d215a611","85":"28e659a5","86":"c4fa328e","87":"3c551684","88":"4e63f179","89":"b46c0b37","90":"ebdbda62","91":"f276e8e2","92":"9e9e70b1","93":"8a6c50b0","94":"fa90d379","95":"f1ba604f","96":"46e744a4","97":"eb363f34","98":"88d3b919","99":"bb3d2c54","100":"83f3df30","101":"0c87bf65","102":"0ce6fecf","103":"cedaeca4","104":"2169c06b","105":"929a96f0","106":"d798b463","107":"b0d826f1","108":"ec1d356b","109":"41a33a1a","110":"057de435","111":"48228f82","112":"ffd52d92","113":"dcb2ee6d","114":"c6a6e101","115":"f156a00f","116":"a317fe46","117":"ead206c4","118":"d552e90d","119":"e184d9db","120":"384d526a","121":"3b8227c6","122":"186f854f","123":"8c68d28a","124":"408ebb33","125":"991269bf","126":"7167d483","127":"cd709423","128":"0f3f6907","129":"6615f7e4","130":"9bf98449","131":"255c7c43","132":"36844213","133":"9f06d0a5","134":"b8a3ed43","135":"a5093954","136":"9cd53ce0","137":"689cbd5d","138":"e8e1273e","139":"80419667","140":"7c2e7a32","141":"09f4d1b2","142":"0d52a9f3","143":"cb69da0b","144":"34ac3654","145":"f92c8ac0","146":"25c24567","147":"b1b48fca","148":"8847fe03","149":"96790f46","150":"2d8568a9","151":"9b55bafe","152":"235dc8d0","153":"cc337346","154":"6661c864","155":"ed22d6b2","156":"a71c0de3","157":"01fef202","158":"b8182b3b","159":"853da2bd","160":"2c9c9014","161":"1289bb4c","162":"15c1b2d7","163":"c711c38f","164":"7d91d358","165":"dec54504","166":"3ff355b5","167":"7a30e1c2","168":"471f4346","169":"2649e466","170":"2de996df","171":"51f475db","172":"4764b871","173":"2709a7bb","174":"9c9c4f81","175":"1c50cd8c","176":"6ccf4497","177":"916a43d7","178":"e41d6fc9","179":"d9a714d5","180":"abba8537","181":"b42edfcd","182":"e0676ef7","183":"b34ed057","184":"c7d63100","185":"9c6c47a4","186":"ddb826e1","187":"5bb529c2","188":"c0498792","189":"8748b741","190":"b38f13e9","191":"23a85f14","192":"0f28a588","193":"4d2aadc1","194":"996d34c8","195":"f5b10b42","196":"c1938f28","197":"f187b9d8","198":"3f1fe6b4","199":"cdc117e7","200":"263ef8f9","201":"67de5466","202":"8dd9f7bd","203":"319c605d","204":"7dd26258","205":"e7b43efe","206":"0f428fc7","207":"b05232b2","208":"0f479a47","209":"45fb7894","210":"f9ead356","211":"dec10650","212":"1489d5e6","213":"41b93d37","214":"8b4e638e","215":"3f681e33","216":"1c11ff4a","217":"331d5d41","218":"d4e6c6c8","219":"8f881b85","220":"476d3205","221":"70a965d5","222":"6ff7c3b7","223":"da42fdf1","224":"8708dc05","225":"9d766db6","226":"c94ba386","227":"8318eb70","228":"be14e4ee","229":"d874d46d","230":"bacab125","231":"6bd1e3d6","232":"fab381d0","233":"4ca8923d","234":"da34a632","235":"ab39b18d","236":"4dc0b9dd","237":"c530e223","238":"fb04bcb0","239":"b524e5cf","240":"3b04fce4","241":"354099b6","242":"998125ba","243":"e1cdabfb","244":"141ea9dc","245":"66f26241","246":"e601a6c2","247":"7f43425c","248":"01a6e2ea","249":"1e8c844a","250":"27527155","251":"0b6b226f","252":"7bad99e9","253":"d9a942c0","254":"ca00cced","255":"5b01c41a","256":"6270e17d","257":"019f789a","258":"d512f87d","259":"c0a0fa96","260":"6f4efb64","261":"33c50e68","262":"e53199b9","263":"593b6526","264":"676040ff","265":"36b21858","266":"1c5a5491","267":"49d847d6","268":"ed711356","269":"97095b2d","270":"e1428571","271":"398770f4","272":"f6c4eaad"}[chunkId] + ".chunk.js";
/******/ var timeout = setTimeout(onScriptComplete, 120000);
/******/ script.onerror = script.onload = onScriptComplete;
/******/ function onScriptComplete() {

@ -2,6 +2,21 @@ import React , { Component } from 'react';
import { Link } from 'react-router-dom';
class MergeItem extends Component{
set_issue_tags =(issue_tags)=>{
if(issue_tags && issue_tags.length > 0){
return(
issue_tags.map((item,key)=>{
return(
<span className="issue-tag-show" style={{background: item.color}}>{item.name}</span>
)
})
)
}else{
return("--")
}
}
render(){
const { issues , search_count , page , limit } = this.props;
const { projectsId } = this.props.match.params;
@ -20,7 +35,14 @@ class MergeItem extends Component{
<span>{item.created_at}</span>
{ item.journals_count ? <span className="ml20"><i className="iconfont icon-pinglun1 mr3 font-16"></i>{item.journals_count}</span> : "" }
</p>
</div>
</div>
<ul className="topWrapper_select">
<li>{this.set_issue_tags(item.issue_tags)}</li>
{/*<li>{item.issue_type || "--"}</li>*/}
<li>{item.version || "--"}</li>
<li>{item.author_name || "--"}</li>
<li>{ item.journals_count ? <span><i className="iconfont icon-pinglun1 mr3 font-16"></i>{item.journals_count}</span> : "" }</li>
</ul>
</div>
)
})

@ -134,23 +134,23 @@ class UpdateMerge extends Component{
const { fileList } = this.state;
this.props.form.validateFieldsAndScroll((err, values) => {
if(!err){
const { projectsId} = this.props.match.params;
const { projectsId,mergeId} = this.props.match.params;
const { subject ,data} = this.state;
const url = `/projects/${projectsId}/issues/${data.issue.id}.json`;
if(values.issue_tag_ids===0){
values.issue_tag_ids = ""
const url = `/projects/${projectsId}/pull_requests/${mergeId}.json`;
if(values.issue_tag_ids===''){
values.issue_tag_ids = []
}else{
values.issue_tag_ids = [values.issue_tag_ids]
}
if(values.assigned_to_id===0){
values.assigned_to_id = ""
}
axios.put(url,{
project_id:projectsId,
subject:subject,
id: data.issue.id,
description:this.state.textcount,
attachment_ids:fileList,
...values
}).then(result=>{
@ -184,7 +184,7 @@ class UpdateMerge extends Component{
<Link to={``}><img class="user_img" src={getImageUrl(`images/${current_user && current_user.image_url}`)} alt=""/></Link>
<div className="new_context">
<Form.Item>
{getFieldDecorator('subject', {
{getFieldDecorator('title', {
rules: [{
required: true, message: '请填写工单标题'
}],
@ -194,7 +194,7 @@ class UpdateMerge extends Component{
)}
</Form.Item>
<Form.Item>
{getFieldDecorator('description', {
{getFieldDecorator('body', {
rules: [],
initialValue: textcount
})(

@ -43,6 +43,11 @@ class merge extends Component{
//设置选择高亮
openselect:1,
closeselect:undefined,
issue_tag_ids:'标签筛选',
issue_versions:'里程碑筛选',
assigned_to_ids:'指派人筛选',
paix:'排序'
}
}
@ -67,12 +72,12 @@ class merge extends Component{
}
// 获取列表数据
getIssueList=(page,limit,search,author_id,assigned_to_id,id,value,status_type)=>{
getIssueList=(page,limit,search,author_id,assigned_to_id,id,value,status_type,order_type,order_name)=>{
const { projectsId } = this.props.match.params;
const url = `/projects/${projectsId}/pull_requests.json`;
axios.get(url,{
params:{
page,limit,search,author_id,assigned_to_id,status_type,
page,limit,search,author_id,assigned_to_id,status_type,order_type,order_name,
[id]:value
}
}).then((result)=>{
@ -89,7 +94,25 @@ class merge extends Component{
})
}
getOption=(e,id)=>{
getOption=(e,id,name)=>{
if(id+'s'==="issue_tag_ids"){
this.setState({
[id]:e.key,
issue_tag_ids:name
})
}
if(id+'s'==="issue_versions"){
this.setState({
[id]:e.key,
issue_versions:name
})
}
if(id+'s'==="assigned_to_ids"){
this.setState({
[id]:e.key,
assigned_to_ids:name
})
}
this.setState({
[id]:e.key
})
@ -104,11 +127,11 @@ class merge extends Component{
renderMenu =(array,name,id)=>{
return(
<Menu>
<Menu.Item key={"all"} onClick={(e)=>this.getOption(e,id)}>{name}</Menu.Item>
<Menu.Item key={"all"} onClick={(e)=>this.getOption(e,id,name)}>{name}</Menu.Item>
{
array && array.length > 0 && array.map((item,key)=>{
return(
<Menu.Item key={item.id} onClick={(e)=>this.getOption(e,id)}>{item.name}</Menu.Item>
<Menu.Item key={item.id} onClick={(e)=>this.getOption(e,id,item.name)}>{item.name}</Menu.Item>
)
})
}
@ -160,39 +183,35 @@ class merge extends Component{
}
// 筛选:全部、指派给我、由我创建
ChangeAssign=(type)=>{
arrayList=(e)=>{
const { limit, search} = this.state;
this.setState({
isSpin:true
})
if(type){
const { current_user } = this.props;
if(type===1){
if(e.key==='created_on'){
if(e.item.props.value==="desc"){
this.setState({
page:1,
author_id:undefined,
assigned_to_id:current_user.user_id
paix:'到期日从近到远'
})
this.getIssueList(1,limit,search,undefined,current_user.user_id);
}else{
this.setState({
page:1,
author_id:current_user.user_id,
assigned_to_id:undefined
paix:'到期日从远到近'
})
this.getIssueList(1,limit,search,current_user.user_id,undefined);
}
}else{
this.setState({
page:1,
author_id:undefined,
assigned_to_id:undefined
})
this.getIssueList(1,limit,search,undefined,undefined);
if(e.item.props.value==="desc"){
this.setState({
paix:'完成度从低到高'
})
}else{
this.setState({
paix:'完成度从高到低'
})
}
}
this.setState({
order_name:e.key,
order_type:e.item.props.value
})
this.getIssueList(1,limit,search,undefined,undefined,undefined,undefined,undefined, e.item.props.value,e.key);
}
render(){
@ -202,12 +221,10 @@ class merge extends Component{
const menu = (
<Menu onClick={this.arrayList}>
<Menu.Item key={'created_at'} value="desc">到期日从近到远</Menu.Item>
<Menu.Item key={'created_at'} value="asc">到期日从远到近</Menu.Item>
<Menu.Item key={'issues_count'} value="desc">完成度从低到高</Menu.Item>
<Menu.Item key={'issues_count'} value="asc">完成度从高到低</Menu.Item>
<Menu.Item key={'issues_count'} value="asc">工单从多到少</Menu.Item>
<Menu.Item key={'issues_count'} value="asc">工单从少到多</Menu.Item>
<Menu.Item key={'created_on'} value="desc">到期日从近到远</Menu.Item>
<Menu.Item key={'created_on'} value="asc">到期日从远到近</Menu.Item>
<Menu.Item key={'updated_on'} value="desc">完成度从低到高</Menu.Item>
<Menu.Item key={'updated_on'} value="asc">完成度从高到低</Menu.Item>
</Menu>
)
@ -251,27 +268,23 @@ class merge extends Component{
<ul className="topWrapper_select">
<li>
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.issue_tag,'标签','issue_tag_id')} trigger={['click']} placement="bottomCenter">
<span>标签筛选<Icon type="caret-down" className="ml5" /></span>
<span>{this.state.issue_tag_ids}<Icon type="caret-down" className="ml5" /></span>
</Dropdown>
</li>
<li>
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.issue_version,'里程碑','issue_version')} trigger={['click']} placement="bottomCenter">
<span>里程碑筛选<Icon type="caret-down" className="ml5" /></span>
<span>{this.state.issue_versions}<Icon type="caret-down" className="ml5" /></span>
</Dropdown>
</li>
<li>
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.assign_user,'指派人','assigned_to_id')} trigger={['click']} placement="bottomCenter">
<span>指派人筛选<Icon type="caret-down" className="ml5" /></span>
</Dropdown>
</li>
<li>
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.issue_type,'类型','issue_type')} trigger={['click']} placement="bottomCenter">
<span>类型筛选<Icon type="caret-down" className="ml5" /></span>
<span>{this.state.assigned_to_ids}<Icon type="caret-down" className="ml5" /></span>
</Dropdown>
</li>
<li>
<Dropdown className="topWrapperSelect" overlay={menu} trigger={['click']} placement="bottomCenter">
<span>排序<Icon type="caret-down" className="ml5" /></span>
<span>{this.state.paix}<Icon type="caret-down" className="ml5" /></span>
</Dropdown>
</li>
</ul>

Loading…
Cancel
Save